diff options
author | Luis R. Rodriguez <mcgrof@do-not-panic.com> | 2013-10-15 00:42:10 (GMT) |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-10-18 18:04:41 (GMT) |
commit | 09b029b6b68daa4b961841173d90f267cee9c117 (patch) | |
tree | f9da20b6e4d6c86a5b2714262695e813a2266f8a /drivers/net/wireless | |
parent | 94e7876daa4396d7a997d57dfcceaab6851bd017 (diff) | |
download | linux-09b029b6b68daa4b961841173d90f267cee9c117.tar.xz |
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>
Diffstat (limited to 'drivers/net/wireless')
-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 fc76052..6bcf62f 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; |