summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBen Greear <greearb@candelatech.com>2010-12-06 21:13:49 -0800
committerJohn W. Linville <linville@tuxdriver.com>2010-12-08 15:38:43 -0500
commita9927ba3c5f3c5f6b0e8fa7557452335edeaf5fa (patch)
tree08c666e1edd25b64ebad8163682c8d3df003f663 /drivers
parent80d7e403c97b712e302ec37e9beceff1dbdc9402 (diff)
downloadlinux-a9927ba3c5f3c5f6b0e8fa7557452335edeaf5fa.tar.gz
linux-a9927ba3c5f3c5f6b0e8fa7557452335edeaf5fa.tar.bz2
linux-a9927ba3c5f3c5f6b0e8fa7557452335edeaf5fa.zip
ath9k: Check for NULL sta in ath_tx_start
It can be NULL according to docs, and logging showed it to be NULL in practice. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 16d83d0c0959..bce313e85cff 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1740,7 +1740,10 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
int frmlen = skb->len + FCS_LEN;
int q;
- txctl->an = (struct ath_node *)sta->drv_priv;
+ /* NOTE: sta can be NULL according to net/mac80211.h */
+ if (sta)
+ txctl->an = (struct ath_node *)sta->drv_priv;
+
if (info->control.hw_key)
frmlen += info->control.hw_key->icv_len;