linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath9k:  Check for NULL sta in ath_tx_start
@ 2010-12-07  5:13 greearb
  2010-12-07  5:21 ` Luis R. Rodriguez
  0 siblings, 1 reply; 9+ messages in thread
From: greearb @ 2010-12-07  5:13 UTC (permalink / raw)
  To: linux-wireless; +Cc: ath9k-devel, Ben Greear

From: Ben Greear <greearb@candelatech.com>

It can be NULL according to docs, and logging showed it
to be NULL in practice.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
:100644 100644 8b0b076... 5ddca08... M	drivers/net/wireless/ath/ath9k/xmit.c
 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 8b0b076..5ddca08 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1764,7 +1764,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;
 
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-12-08 15:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-07  5:13 [PATCH] ath9k: Check for NULL sta in ath_tx_start greearb
2010-12-07  5:21 ` Luis R. Rodriguez
2010-12-07  5:36   ` Ben Greear
2010-12-07  7:42     ` Vasanthakumar Thiagarajan
2010-12-07  7:49       ` Ben Greear
2010-12-07  8:31         ` Vasanthakumar Thiagarajan
2010-12-07 17:13           ` Ben Greear
2010-12-08  5:17             ` Vasanthakumar Thiagarajan
2010-12-08 15:40               ` Ben Greear

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).