Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a9927ba3 authored by Ben Greear's avatar Ben Greear Committed by John W. Linville
Browse files

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: default avatarBen Greear <greearb@candelatech.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 80d7e403
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1740,7 +1740,10 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
	int frmlen = skb->len + FCS_LEN;
	int q;

	/* 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;