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

Commit a71e28dc authored by Ming-yi Lin's avatar Ming-yi Lin
Browse files

net/wireless: Fix kernel crash while doing iwlist scan



Remove the code that extracts the information of the rates without
the check for the corresponding bands. Also , this part of the code
is redundant as the following code checks for the same, which also
prevents a possible crash.

Change-Id: I1b4d243cd65f8890f4f7ab4cddf72aad261d7bb0
Signed-off-by: default avatarMing-yi Lin <mylin@codeaurora.org>
parent ce71070e
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -1152,8 +1152,6 @@ int cfg80211_wext_siwscan(struct net_device *dev,
		if (wreq->scan_type == IW_SCAN_TYPE_PASSIVE)
			creq->n_ssids = 0;
	}
	for (i = 0; i < IEEE80211_NUM_BANDS; i++)
		creq->rates[i] = (1 << wiphy->bands[i]->n_bitrates) - 1;

	for (i = 0; i < IEEE80211_NUM_BANDS; i++)
		if (wiphy->bands[i])