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

Commit 09b029b6 authored by Luis R. Rodriguez's avatar Luis R. Rodriguez Committed by John W. Linville
Browse files

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: default avatarRajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: default avatarLuis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 94e7876d
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -2006,6 +2006,9 @@ static void setup_frame_info(struct ieee80211_hw *hw,
		fi->keyix = ATH9K_TXKEYIX_INVALID;
		fi->keyix = ATH9K_TXKEYIX_INVALID;
	fi->keytype = keytype;
	fi->keytype = keytype;
	fi->framelen = framelen;
	fi->framelen = framelen;

	if (!rate)
		return;
	fi->rtscts_rate = rate->hw_value;
	fi->rtscts_rate = rate->hw_value;
	if (short_preamble)
	if (short_preamble)
		fi->rtscts_rate |= rate->hw_value_short;
		fi->rtscts_rate |= rate->hw_value_short;