summaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2017-08-05 04:44:32 -0400
committerJohannes Berg <johannes.berg@intel.com>2017-09-21 05:41:58 -0400
commita7f26d8050c4f172d2dc523aabf45c5cbd9558ac (patch)
tree10cd12a753c012c73e70ae367c9237a01993b024 /net/mac80211/mlme.c
parent2512b1b18d0748d867bb22387db7c86b903291ad (diff)
mac80211: simplify and clarify IE splitting
There's no need to split off IEs from the ones obtained from userspace, if they were already split off, so for example IEs that went before HT don't have to be listed again to go before VHT. Simplify the code here so it's clearer. While at it, also clarify the comments regarding the DMG (60 GHz) elements. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 3b8e2709d8de..ee5ca1bc5a20 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -780,11 +780,12 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata)
780 WLAN_EID_SUPPORTED_REGULATORY_CLASSES, 780 WLAN_EID_SUPPORTED_REGULATORY_CLASSES,
781 WLAN_EID_HT_CAPABILITY, 781 WLAN_EID_HT_CAPABILITY,
782 WLAN_EID_BSS_COEX_2040, 782 WLAN_EID_BSS_COEX_2040,
783 /* luckily this is almost always there */
783 WLAN_EID_EXT_CAPABILITY, 784 WLAN_EID_EXT_CAPABILITY,
784 WLAN_EID_QOS_TRAFFIC_CAPA, 785 WLAN_EID_QOS_TRAFFIC_CAPA,
785 WLAN_EID_TIM_BCAST_REQ, 786 WLAN_EID_TIM_BCAST_REQ,
786 WLAN_EID_INTERWORKING, 787 WLAN_EID_INTERWORKING,
787 /* 60GHz doesn't happen right now */ 788 /* 60 GHz (Multi-band, DMG, MMS) can't happen */
788 WLAN_EID_VHT_CAPABILITY, 789 WLAN_EID_VHT_CAPABILITY,
789 WLAN_EID_OPMODE_NOTIF, 790 WLAN_EID_OPMODE_NOTIF,
790 }; 791 };
@@ -811,22 +812,16 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata)
811 /* if present, add any custom IEs that go before VHT */ 812 /* if present, add any custom IEs that go before VHT */
812 if (assoc_data->ie_len) { 813 if (assoc_data->ie_len) {
813 static const u8 before_vht[] = { 814 static const u8 before_vht[] = {
814 WLAN_EID_SSID, 815 /*
815 WLAN_EID_SUPP_RATES, 816 * no need to list the ones split off before HT
816 WLAN_EID_EXT_SUPP_RATES, 817 * or generated here
817 WLAN_EID_PWR_CAPABILITY, 818 */
818 WLAN_EID_SUPPORTED_CHANNELS,
819 WLAN_EID_RSN,
820 WLAN_EID_QOS_CAPA,
821 WLAN_EID_RRM_ENABLED_CAPABILITIES,
822 WLAN_EID_MOBILITY_DOMAIN,
823 WLAN_EID_SUPPORTED_REGULATORY_CLASSES,
824 WLAN_EID_HT_CAPABILITY,
825 WLAN_EID_BSS_COEX_2040, 819 WLAN_EID_BSS_COEX_2040,
826 WLAN_EID_EXT_CAPABILITY, 820 WLAN_EID_EXT_CAPABILITY,
827 WLAN_EID_QOS_TRAFFIC_CAPA, 821 WLAN_EID_QOS_TRAFFIC_CAPA,
828 WLAN_EID_TIM_BCAST_REQ, 822 WLAN_EID_TIM_BCAST_REQ,
829 WLAN_EID_INTERWORKING, 823 WLAN_EID_INTERWORKING,
824 /* 60 GHz (Multi-band, DMG, MMS) can't happen */
830 }; 825 };
831 826
832 /* RIC already taken above, so no need to handle here anymore */ 827 /* RIC already taken above, so no need to handle here anymore */