From: Ben Greear Date: Tue, 7 Dec 2010 05:13:49 +0000 (-0800) Subject: ath9k: Check for NULL sta in ath_tx_start X-Git-Tag: MMI-PSA29.97-13-9~21446^2~169^2^2~15 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a9927ba3c5f3c5f6b0e8fa7557452335edeaf5fa;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Signed-off-by: John W. Linville --- 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;