linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFCv3 1/4] mac80211: ibss/mesh move bw checking
@ 2015-01-20 12:35 Janusz Dziedzic
  2015-01-20 12:35 ` [RFCv3 2/4] cfg80211: add VHT support for IBSS Janusz Dziedzic
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Janusz Dziedzic @ 2015-01-20 12:35 UTC (permalink / raw)
  To: linux-wireless; +Cc: johannes, Janusz Dziedzic

We will need this as a preparetion for VHT.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
---
 net/mac80211/ht.c         | 2 --
 net/mac80211/ibss.c       | 4 ++++
 net/mac80211/mesh_plink.c | 4 ++++
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index ff630be..7a76ce6 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -252,8 +252,6 @@ bool ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_sub_if_data *sdata,
 		break;
 	}
 
-	if (bw != sta->sta.bandwidth)
-		changed = true;
 	sta->sta.bandwidth = bw;
 
 	sta->cur_max_bandwidth =
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index b606b53..9fe045f 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -1048,6 +1048,7 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
 			/* we both use HT */
 			struct ieee80211_ht_cap htcap_ie;
 			struct cfg80211_chan_def chandef;
+			enum ieee80211_sta_rx_bandwidth bw = sta->sta.bandwidth;
 
 			ieee80211_ht_oper_to_chandef(channel,
 						     elems->ht_operation,
@@ -1066,6 +1067,9 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
 
 			rates_updated |= ieee80211_ht_cap_ie_to_sta_ht_cap(
 						sdata, sband, &htcap_ie, sta);
+
+			if (bw != sta->sta.bandwidth)
+				rates_updated |= true;
 		}
 
 		if (sta && rates_updated) {
diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index b488e18..9875d82 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -382,6 +382,7 @@ static void mesh_sta_info_init(struct ieee80211_sub_if_data *sdata,
 	enum ieee80211_band band = ieee80211_get_sdata_band(sdata);
 	struct ieee80211_supported_band *sband;
 	u32 rates, basic_rates = 0, changed = 0;
+	enum ieee80211_sta_rx_bandwidth bw = sta->sta.bandwidth;
 
 	sband = local->hw.wiphy->bands[band];
 	rates = ieee80211_sta_get_rates(sdata, elems, band, &basic_rates);
@@ -401,6 +402,9 @@ static void mesh_sta_info_init(struct ieee80211_sub_if_data *sdata,
 					      elems->ht_cap_elem, sta))
 		changed |= IEEE80211_RC_BW_CHANGED;
 
+	if (bw != sta->sta.bandwidth)
+		changed |= IEEE80211_RC_BW_CHANGED;
+
 	/* HT peer is operating 20MHz-only */
 	if (elems->ht_operation &&
 	    !(elems->ht_operation->ht_param &
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2015-01-26 10:01 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-20 12:35 [RFCv3 1/4] mac80211: ibss/mesh move bw checking Janusz Dziedzic
2015-01-20 12:35 ` [RFCv3 2/4] cfg80211: add VHT support for IBSS Janusz Dziedzic
2015-01-23 10:02   ` Johannes Berg
2015-01-20 12:35 ` [RFCv3 3/4] mac80211: IBSS fix scan request Janusz Dziedzic
2015-01-20 12:35 ` [RFCv3 4/4] mac80211: add VHT support for IBSS Janusz Dziedzic
2015-01-23 10:04   ` Johannes Berg
2015-01-25 10:25     ` Arik Nemtsov
2015-01-26  8:26       ` Johannes Berg
2015-01-25 10:30   ` Arik Nemtsov
2015-01-26  8:26     ` Johannes Berg
2015-01-26  8:37       ` Arik Nemtsov
2015-01-26  9:00         ` Johannes Berg
2015-01-26  9:19           ` Janusz Dziedzic
2015-01-26  9:25             ` Johannes Berg
2015-01-26  9:49               ` Janusz Dziedzic
2015-01-26 10:01                 ` Janusz Dziedzic
2015-01-23 10:01 ` [RFCv3 1/4] mac80211: ibss/mesh move bw checking Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).