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

Commit 76f27364 authored by Stanislaw Gruszka's avatar Stanislaw Gruszka Committed by John W. Linville
Browse files

mac80211: fix supported rates IE if AP doesn't give us it's rates



If AP do not provide us supported rates before assiociation, send
all rates we are supporting instead of empty information element.

v1 -> v2: Add comment.

Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent f0b058b6
Loading
Loading
Loading
Loading
+19 −9
Original line number Diff line number Diff line
@@ -212,6 +212,7 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata,

	sband = local->hw.wiphy->bands[wk->chan->band];

	if (wk->assoc.supp_rates_len) {
		/*
		 * Get all rates supported by the device and the AP as
		 * some APs don't like getting a superset of their rates
@@ -221,6 +222,15 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata,
		rates_len = ieee80211_compatible_rates(wk->assoc.supp_rates,
						       wk->assoc.supp_rates_len,
						       sband, &rates);
	} else {
		/*
		 * In case AP not provide any supported rates information
		 * before association, we send information element(s) with
		 * all rates that we support.
		 */
		rates = ~0;
		rates_len = sband->n_bitrates;
	}

	skb = alloc_skb(local->hw.extra_tx_headroom +
			sizeof(*mgmt) + /* bit too much but doesn't matter */