diff options
author | Luis R. Rodriguez <mcgrof@do-not-panic.com> | 2013-10-14 17:42:10 -0700 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-10-18 14:04:41 -0400 |
commit | 09b029b6b68daa4b961841173d90f267cee9c117 (patch) | |
tree | f9da20b6e4d6c86a5b2714262695e813a2266f8a | |
parent | 94e7876daa4396d7a997d57dfcceaab6851bd017 (diff) |
ath9k: check for NULL rate when using ieee80211_get_rts_cts_rate()
ieee80211_get_rts_cts_rate() can return NULL, so don't rely
on its members when it does return NULL.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/xmit.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index fc76052c0721..6bcf62fd3da8 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c @@ -2006,6 +2006,9 @@ static void setup_frame_info(struct ieee80211_hw *hw, fi->keyix = ATH9K_TXKEYIX_INVALID; fi->keytype = keytype; fi->framelen = framelen; + + if (!rate) + return; fi->rtscts_rate = rate->hw_value; if (short_preamble) fi->rtscts_rate |= rate->hw_value_short; |