aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorAyala Beker <ayala.beker@intel.com>2015-09-21 08:49:53 -0400
committerJohannes Berg <johannes.berg@intel.com>2015-09-29 09:56:50 -0400
commit47edb11b522561658fe719e56aa69a3c3098a3fe (patch)
treeca2fa8237db5227617276d5e2bd041f356805683 /net/wireless
parentd0a77c6569abe29d921148c45f598bc796084226 (diff)
cfg80211: allow changing station capabilities for unassociated stations
Currently, cfg80211 rejects capability updates for existing entries and as a result it's impossible to update entries that were added unassociated, but that is necessary to go through the full station states from userspace, adding a station before authentication etc. Fix this by allowing updates to capabilities for stations that the driver (or mac80211) assigned unassociated state. Drivers setting the full station state support flag must use the new station type for proper operation. Signed-off-by: Ayala Beker <ayala.beker@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/nl80211.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 50cd7707040c..f05ba8b7af61 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -4009,7 +4009,8 @@ int cfg80211_check_station_change(struct wiphy *wiphy,
4009 params->sta_flags_mask &= ~BIT(NL80211_STA_FLAG_TDLS_PEER); 4009 params->sta_flags_mask &= ~BIT(NL80211_STA_FLAG_TDLS_PEER);
4010 } 4010 }
4011 4011
4012 if (statype != CFG80211_STA_TDLS_PEER_SETUP) { 4012 if (statype != CFG80211_STA_TDLS_PEER_SETUP &&
4013 statype != CFG80211_STA_AP_CLIENT_UNASSOC) {
4013 /* reject other things that can't change */ 4014 /* reject other things that can't change */
4014 if (params->sta_modify_mask & STATION_PARAM_APPLY_UAPSD) 4015 if (params->sta_modify_mask & STATION_PARAM_APPLY_UAPSD)
4015 return -EINVAL; 4016 return -EINVAL;
@@ -4021,7 +4022,8 @@ int cfg80211_check_station_change(struct wiphy *wiphy,
4021 return -EINVAL; 4022 return -EINVAL;
4022 } 4023 }
4023 4024
4024 if (statype != CFG80211_STA_AP_CLIENT) { 4025 if (statype != CFG80211_STA_AP_CLIENT &&
4026 statype != CFG80211_STA_AP_CLIENT_UNASSOC) {
4025 if (params->vlan) 4027 if (params->vlan)
4026 return -EINVAL; 4028 return -EINVAL;
4027 } 4029 }
@@ -4033,6 +4035,7 @@ int cfg80211_check_station_change(struct wiphy *wiphy,
4033 return -EOPNOTSUPP; 4035 return -EOPNOTSUPP;
4034 break; 4036 break;
4035 case CFG80211_STA_AP_CLIENT: 4037 case CFG80211_STA_AP_CLIENT:
4038 case CFG80211_STA_AP_CLIENT_UNASSOC:
4036 /* accept only the listed bits */ 4039 /* accept only the listed bits */
4037 if (params->sta_flags_mask & 4040 if (params->sta_flags_mask &
4038 ~(BIT(NL80211_STA_FLAG_AUTHORIZED) | 4041 ~(BIT(NL80211_STA_FLAG_AUTHORIZED) |