diff options
author | Ben Greear <greearb@candelatech.com> | 2010-12-07 05:13:49 (GMT) |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-12-08 20:38:43 (GMT) |
commit | a9927ba3c5f3c5f6b0e8fa7557452335edeaf5fa (patch) | |
tree | 08c666e1edd25b64ebad8163682c8d3df003f663 /drivers/net/wireless/ath | |
parent | 80d7e403c97b712e302ec37e9beceff1dbdc9402 (diff) | |
download | linux-a9927ba3c5f3c5f6b0e8fa7557452335edeaf5fa.tar.xz |
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/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/xmit.c | 5 |
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 16d83d0..bce313e 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; |