From 4ced3f74dae18715920cb680098ec7ff4345d0a3 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Mon, 19 Jul 2010 16:39:04 +0200 Subject: mac80211: move QoS-enable to BSS info Ever since commit e1b3ec1a2a336c328c336cfa5485a5f0484cc90d Author: Stanislaw Gruszka Date: Mon Mar 29 12:18:34 2010 +0200 mac80211: explicitly disable/enable QoS mac80211 is telling drivers, in particular iwlwifi, whether QoS is enabled or not. However, this is only relevant for station mode, since only then will any device send nullfunc frames and need to know whether they should be QoS frames or not. In other modes, there are (currently) no frames the device is supposed to send. When you now consider virtual interfaces, it becomes apparent that the current mechanism is inadequate since it enables/disables QoS on a global scale, where for nullfunc frames it has to be on a per-interface scale. Due to the above considerations, we can change the way mac80211 advertises the QoS state to drivers to only ever advertise it as "off" in station mode, and make it a per-BSS setting. Tested-by: Stanislaw Gruszka Signed-off-by: Johannes Berg Signed-off-by: John W. Linville --- include/net/mac80211.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'include/net') diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 7f256e23c57f..20d372edec29 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -147,6 +147,8 @@ struct ieee80211_low_level_stats { * @BSS_CHANGED_CQM: Connection quality monitor config changed * @BSS_CHANGED_IBSS: IBSS join status changed * @BSS_CHANGED_ARP_FILTER: Hardware ARP filter address list or state changed. + * @BSS_CHANGED_QOS: QoS for this association was enabled/disabled. Note + * that it is only ever disabled for station mode. */ enum ieee80211_bss_change { BSS_CHANGED_ASSOC = 1<<0, @@ -162,6 +164,7 @@ enum ieee80211_bss_change { BSS_CHANGED_CQM = 1<<10, BSS_CHANGED_IBSS = 1<<11, BSS_CHANGED_ARP_FILTER = 1<<12, + BSS_CHANGED_QOS = 1<<13, /* when adding here, make sure to change ieee80211_reconfig */ }; @@ -217,6 +220,7 @@ enum ieee80211_bss_change { * filter ARP queries based on the @arp_addr_list, if disabled, the * hardware must not perform any ARP filtering. Note, that the filter will * be enabled also in promiscuous mode. + * @qos: This is a QoS-enabled BSS. */ struct ieee80211_bss_conf { const u8 *bssid; @@ -240,6 +244,7 @@ struct ieee80211_bss_conf { __be32 arp_addr_list[IEEE80211_BSS_ARP_ADDR_LIST_LEN]; u8 arp_addr_cnt; bool arp_filter_enabled; + bool qos; }; /** @@ -620,15 +625,11 @@ struct ieee80211_rx_status { * may turn the device off as much as possible. Typically, this flag will * be set when an interface is set UP but not associated or scanning, but * it can also be unset in that case when monitor interfaces are active. - * @IEEE80211_CONF_QOS: Enable 802.11e QoS also know as WMM (Wireless - * Multimedia). On some drivers (iwlwifi is one of know) we have - * to enable/disable QoS explicitly. */ enum ieee80211_conf_flags { IEEE80211_CONF_MONITOR = (1<<0), IEEE80211_CONF_PS = (1<<1), IEEE80211_CONF_IDLE = (1<<2), - IEEE80211_CONF_QOS = (1<<3), }; @@ -643,7 +644,6 @@ enum ieee80211_conf_flags { * @IEEE80211_CONF_CHANGE_RETRY_LIMITS: retry limits changed * @IEEE80211_CONF_CHANGE_IDLE: Idle flag changed * @IEEE80211_CONF_CHANGE_SMPS: Spatial multiplexing powersave mode changed - * @IEEE80211_CONF_CHANGE_QOS: Quality of service was enabled or disabled */ enum ieee80211_conf_changed { IEEE80211_CONF_CHANGE_SMPS = BIT(1), @@ -654,7 +654,6 @@ enum ieee80211_conf_changed { IEEE80211_CONF_CHANGE_CHANNEL = BIT(6), IEEE80211_CONF_CHANGE_RETRY_LIMITS = BIT(7), IEEE80211_CONF_CHANGE_IDLE = BIT(8), - IEEE80211_CONF_CHANGE_QOS = BIT(9), }; /** -- cgit v1.2.3 From 4f366c5dabcb936dd5754a35188bd699181fe1ce Mon Sep 17 00:00:00 2001 From: "John W. Linville" Date: Thu, 15 Jul 2010 14:57:33 -0400 Subject: wireless: only use alpha2 regulatory information from country IE The meaning and/or usage of the country IE is somewhat poorly defined. In practice, this means that regulatory rulesets in a country IE are often incomplete and might be untrustworthy. This removes the code associated with interpreting those rulesets while preserving respect for country "alpha2" codes also contained in the country IE. Signed-off-by: John W. Linville --- include/net/regulatory.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/net') diff --git a/include/net/regulatory.h b/include/net/regulatory.h index f873ee37f7e4..9e103a4e91ee 100644 --- a/include/net/regulatory.h +++ b/include/net/regulatory.h @@ -54,7 +54,6 @@ struct regulatory_request { enum nl80211_reg_initiator initiator; char alpha2[2]; bool intersect; - u32 country_ie_checksum; enum environment_cap country_ie_env; struct list_head list; }; -- cgit v1.2.3 From c28991a02caec1f3bfe4638ccf4e494c3e9418a3 Mon Sep 17 00:00:00 2001 From: "John W. Linville" Date: Tue, 20 Jul 2010 12:22:40 -0400 Subject: wireless: correct sparse warning in wext-compat.c CHECK net/wireless/wext-compat.c net/wireless/wext-compat.c:1434:5: warning: symbol 'cfg80211_wext_siwpmksa' was not declared. Should it be static? Add declaration in cfg80211.h. Also add an EXPORT_SYMBOL_GPL, since all the peer functions have it. Signed-off-by: John W. Linville --- include/net/cfg80211.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/net') diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 9b8b3f486ec8..f68ae54cdae6 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -1963,6 +1963,10 @@ int cfg80211_wext_giwap(struct net_device *dev, struct iw_request_info *info, struct sockaddr *ap_addr, char *extra); +int cfg80211_wext_siwpmksa(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *data, char *extra); + /* * callbacks for asynchronous cfg80211 methods, notification * functions and BSS handling helpers -- cgit v1.2.3