diff options
author | Beni Lev <beni.lev@intel.com> | 2016-07-19 19:28:56 +0300 |
---|---|---|
committer | iwlwifi publisher <> | 2016-11-11 15:45:35 +0200 |
commit | cbc5b5f08d3103d3d266154a3c1d21836b60daae (patch) | |
tree | ac8b565a1bfa1ac6a5bc03f52ad374e77b148317 | |
parent | 7f88b82f7e04ca4afbae6ce36e4e96aee12b71d6 (diff) | |
download | backport-iwlwifi-release/LinuxCore22.tar.gz |
[BUGFIX] cfg80211: consider VHT opmode on station updaterelease/LinuxCore22
Currently, this attribute is only fetched on station addition, but
not on station change. Since this info is only present in the assoc
request, with full station state support in the driver it cannot be
present when the station is added.
Thus, add support for changing the VHT opmode on station update if
done before (or while) the station is marked as associated. After
this, ignore it, since it used to be ignored.
type=bugfix
bug=cq:MWG100262392
fixes=I293fb1ab836cac910b057ae4147606ecd8c32309
Change-Id: I2f7402fbfb56295ebf8fcf097b58bf7aa45f10b5
Signed-off-by: Beni Lev <beni.lev@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-on: https://git-amr-3.devtools.intel.com/gerrit/45919
Tested-by: ec ger unix iil jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM>
Reviewed-by: Coelho, Luciano <luciano.coelho@intel.com>
(cherry picked from commit b26334ee222974b424c837eea203a5d142c8e266)
Reviewed-on: https://git-amr-3.devtools.intel.com/gerrit/68813
x-iwlwifi-stack-dev: e419fec186fe71949c8eb3855beab97bfd81ede6
-rw-r--r-- | include/uapi/linux/nl80211.h | 4 | ||||
-rw-r--r-- | net/wireless/nl80211.c | 15 | ||||
-rw-r--r-- | versions | 2 |
3 files changed, 19 insertions, 2 deletions
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index da6660cae3..9249829cd7 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -1757,7 +1757,9 @@ enum nl80211_commands { * * @NL80211_ATTR_OPMODE_NOTIF: Operating mode field from Operating Mode * Notification Element based on association request when used with - * %NL80211_CMD_NEW_STATION; u8 attribute. + * %NL80211_CMD_NEW_STATION or %NL80211_CMD_SET_STATION (only when + * %NL80211_FEATURE_FULL_AP_CLIENT_STATE is supported, or with TDLS); + * u8 attribute. * * @NL80211_ATTR_VENDOR_ID: The vendor ID, either a 24-bit OUI or, if * %NL80211_VENDOR_ID_IS_LINUX is set, a special Linux ID (not used yet) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index da8d389df1..715a65e649 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -4273,6 +4273,15 @@ int cfg80211_check_station_change(struct wiphy *wiphy, break; } + /* + * Older kernel versions ignored this attribute entirely, so don't + * reject attempts to update it but mark it as unused instead so the + * driver won't look at the data. + */ + if (statype != CFG80211_STA_AP_CLIENT_UNASSOC && + statype != CFG80211_STA_TDLS_PEER_SETUP) + params->opmode_notif_used = false; + return 0; } EXPORT_SYMBOL(cfg80211_check_station_change); @@ -4506,6 +4515,12 @@ static int nl80211_set_station(struct sk_buff *skb, struct genl_info *info) params.local_pm = pm; } + if (info->attrs[NL80211_ATTR_OPMODE_NOTIF]) { + params.opmode_notif_used = true; + params.opmode_notif = + nla_get_u8(info->attrs[NL80211_ATTR_OPMODE_NOTIF]); + } + /* Include parameters for TDLS peer (will check later) */ err = nl80211_set_station_tdls(info, ¶ms); if (err) @@ -2,5 +2,5 @@ BACKPORTS_VERSION="(see git)" BACKPORTED_KERNEL_VERSION="(see git)" BACKPORTED_KERNEL_NAME="iwlwifi" BACKPORTS_BUILD_TSTAMP=__DATE__ \" \" __TIME__ -BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:release/LinuxCore22:5626:2b0d6c5b" +BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:release/LinuxCore22:5627:e419fec1" BACKPORTS_BRANCH_TSTAMP="Jul 26 2016 10:50:29" |