linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org, Eyal Shapira <eyal@wizery.com>,
	Eyal Shapira <eyalx.shapira@intel.com>,
	Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Subject: [PATCH 6/9] mac80211: handle width changes from opmode notification IE in beacon
Date: Tue,  8 Dec 2015 16:04:36 +0200	[thread overview]
Message-ID: <1449583479-26658-7-git-send-email-emmanuel.grumbach@intel.com> (raw)
In-Reply-To: <1449583479-26658-1-git-send-email-emmanuel.grumbach@intel.com>

From: Eyal Shapira <eyal@wizery.com>

An AP can send an operating channel width change in a beacon
opmode notification IE as long as there's a change in the nss as
well (See 802.11ac-2013 section 10.41).
So don't limit updating to nss only from an opmode notification IE.

Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
 net/mac80211/cfg.c         |  3 +--
 net/mac80211/ieee80211_i.h |  4 ++--
 net/mac80211/mlme.c        |  2 +-
 net/mac80211/rx.c          |  3 +--
 net/mac80211/vht.c         | 10 +++-------
 5 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index b9e2c2f..a90d875 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1198,8 +1198,7 @@ static int sta_apply_parameters(struct ieee80211_local *local,
 		 * rc isn't initialized here yet, so ignore it
 		 */
 		__ieee80211_vht_handle_opmode(sdata, sta,
-					      params->opmode_notif,
-					      band, false);
+					      params->opmode_notif, band);
 	}
 
 	if (ieee80211_vif_is_mesh(&sdata->vif))
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 582ea86..747402d 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1718,10 +1718,10 @@ void ieee80211_process_mu_groups(struct ieee80211_sub_if_data *sdata,
 				 struct ieee80211_mgmt *mgmt);
 u32 __ieee80211_vht_handle_opmode(struct ieee80211_sub_if_data *sdata,
                                   struct sta_info *sta, u8 opmode,
-                                  enum ieee80211_band band, bool nss_only);
+				  enum ieee80211_band band);
 void ieee80211_vht_handle_opmode(struct ieee80211_sub_if_data *sdata,
 				 struct sta_info *sta, u8 opmode,
-				 enum ieee80211_band band, bool nss_only);
+				 enum ieee80211_band band);
 void ieee80211_apply_vhtcap_overrides(struct ieee80211_sub_if_data *sdata,
 				      struct ieee80211_sta_vht_cap *vht_cap);
 void ieee80211_get_vht_mask_from_cap(__le16 vht_cap,
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 1e6b337..62c8e4f 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -3584,7 +3584,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
 
 	if (sta && elems.opmode_notif)
 		ieee80211_vht_handle_opmode(sdata, sta, *elems.opmode_notif,
-					    rx_status->band, true);
+					    rx_status->band);
 	mutex_unlock(&local->sta_mtx);
 
 	changed |= ieee80211_handle_pwr_constr(sdata, chan, mgmt,
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 901c72b..fe675d7 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2738,8 +2738,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
 			opmode = mgmt->u.action.u.vht_opmode_notif.operating_mode;
 
 			ieee80211_vht_handle_opmode(rx->sdata, rx->sta,
-						    opmode, status->band,
-						    false);
+						    opmode, status->band);
 			goto handled;
 		}
 		case WLAN_VHT_ACTION_GROUPID_MGMT: {
diff --git a/net/mac80211/vht.c b/net/mac80211/vht.c
index d2f2ff6..a02525a 100644
--- a/net/mac80211/vht.c
+++ b/net/mac80211/vht.c
@@ -399,7 +399,7 @@ void ieee80211_sta_set_rx_nss(struct sta_info *sta)
 
 u32 __ieee80211_vht_handle_opmode(struct ieee80211_sub_if_data *sdata,
 				  struct sta_info *sta, u8 opmode,
-				  enum ieee80211_band band, bool nss_only)
+				  enum ieee80211_band band)
 {
 	struct ieee80211_local *local = sdata->local;
 	struct ieee80211_supported_band *sband;
@@ -422,9 +422,6 @@ u32 __ieee80211_vht_handle_opmode(struct ieee80211_sub_if_data *sdata,
 		changed |= IEEE80211_RC_NSS_CHANGED;
 	}
 
-	if (nss_only)
-		return changed;
-
 	switch (opmode & IEEE80211_OPMODE_NOTIF_CHANWIDTH_MASK) {
 	case IEEE80211_OPMODE_NOTIF_CHANWIDTH_20MHZ:
 		sta->cur_max_bandwidth = IEEE80211_STA_RX_BW_20;
@@ -473,13 +470,12 @@ void ieee80211_process_mu_groups(struct ieee80211_sub_if_data *sdata,
 
 void ieee80211_vht_handle_opmode(struct ieee80211_sub_if_data *sdata,
 				 struct sta_info *sta, u8 opmode,
-				 enum ieee80211_band band, bool nss_only)
+				 enum ieee80211_band band)
 {
 	struct ieee80211_local *local = sdata->local;
 	struct ieee80211_supported_band *sband = local->hw.wiphy->bands[band];
 
-	u32 changed = __ieee80211_vht_handle_opmode(sdata, sta, opmode,
-						    band, nss_only);
+	u32 changed = __ieee80211_vht_handle_opmode(sdata, sta, opmode, band);
 
 	if (changed > 0)
 		rate_control_rate_update(local, sband, sta, changed);
-- 
2.5.0


  parent reply	other threads:[~2015-12-08 14:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-08 14:04 [PATCH 0/9] various mac80211 / cfg80211 patches Emmanuel Grumbach
2015-12-08 14:04 ` [PATCH 1/9] mac80211: process and save VHT MU-MIMO group frame Emmanuel Grumbach
2015-12-08 14:04 ` [PATCH 2/9] mac80211: limit the A-MSDU Tx based on peer's capabilities Emmanuel Grumbach
2015-12-08 16:02   ` Krishna Chaitanya
2015-12-08 16:31     ` Grumbach, Emmanuel
     [not found]       ` <CABPxzYKp-97mNgtZZubiQ3Ew2VjOh-hFRPRwLY5WLvac9kU32g@mail.gmail.com>
2015-12-08 16:43         ` Grumbach, Emmanuel
     [not found]           ` <CABPxzYKZ8k1HvkygEuEy4dhc4xcc2ss9Bt8jJKcQ98DWZK9pvw@mail.gmail.com>
2015-12-08 19:06             ` Grumbach, Emmanuel
     [not found]               ` <CABPxzYJ445Xb1-znpG8w_8cUbZ1OVtBCCpgY9gOTPTpcs66DAQ@mail.gmail.com>
2015-12-08 19:22                 ` Grumbach, Emmanuel
2015-12-09  7:00                   ` Krishna Chaitanya
2015-12-08 14:04 ` [PATCH 3/9] mac80211: add flag for duplication check Emmanuel Grumbach
2015-12-08 14:04 ` [PATCH 4/9] mac80211: pass aggregation window size to lower level Emmanuel Grumbach
2015-12-08 14:04 ` [PATCH 5/9] mac80211: document status.freq restrictions Emmanuel Grumbach
2015-12-08 14:04 ` Emmanuel Grumbach [this message]
2015-12-08 15:38   ` [PATCH 6/9] mac80211: handle width changes from opmode notification IE in beacon Krishna Chaitanya
2015-12-08 15:42     ` Johannes Berg
2015-12-08 15:47       ` Krishna Chaitanya
2015-12-08 15:53         ` Johannes Berg
2015-12-08 15:55           ` Krishna Chaitanya
2015-12-08 15:58             ` Johannes Berg
2015-12-08 16:03               ` Krishna Chaitanya
2015-12-08 14:04 ` [PATCH 7/9] mac80211: suppress unchanged "limiting TX power" messages Emmanuel Grumbach
2015-12-08 14:04 ` [PATCH 8/9] mac80211: run scan completed work on reconfig failure Emmanuel Grumbach
2015-12-08 14:04 ` [PATCH 9/9] mac80211: reprogram in interface order Emmanuel Grumbach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1449583479-26658-7-git-send-email-emmanuel.grumbach@intel.com \
    --to=emmanuel.grumbach@intel.com \
    --cc=eyal@wizery.com \
    --cc=eyalx.shapira@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).