diff options
-rw-r--r-- | drivers/net/wireless/p54/main.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/base.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/core.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/wl1251/main.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 3 | ||||
-rw-r--r-- | include/net/mac80211.h | 29 | ||||
-rw-r--r-- | net/mac80211/debugfs.c | 2 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 2 |
8 files changed, 29 insertions, 16 deletions
diff --git a/drivers/net/wireless/p54/main.c b/drivers/net/wireless/p54/main.c index af2ca1a9c7d3..40f4eb7da7b2 100644 --- a/drivers/net/wireless/p54/main.c +++ b/drivers/net/wireless/p54/main.c | |||
@@ -228,6 +228,8 @@ static int p54_add_interface(struct ieee80211_hw *dev, | |||
228 | { | 228 | { |
229 | struct p54_common *priv = dev->priv; | 229 | struct p54_common *priv = dev->priv; |
230 | 230 | ||
231 | vif->driver_flags |= IEEE80211_VIF_BEACON_FILTER; | ||
232 | |||
231 | mutex_lock(&priv->conf_mutex); | 233 | mutex_lock(&priv->conf_mutex); |
232 | if (priv->mode != NL80211_IFTYPE_MONITOR) { | 234 | if (priv->mode != NL80211_IFTYPE_MONITOR) { |
233 | mutex_unlock(&priv->conf_mutex); | 235 | mutex_unlock(&priv->conf_mutex); |
@@ -734,7 +736,6 @@ struct ieee80211_hw *p54_init_common(size_t priv_data_len) | |||
734 | IEEE80211_HW_SIGNAL_DBM | | 736 | IEEE80211_HW_SIGNAL_DBM | |
735 | IEEE80211_HW_SUPPORTS_PS | | 737 | IEEE80211_HW_SUPPORTS_PS | |
736 | IEEE80211_HW_PS_NULLFUNC_STACK | | 738 | IEEE80211_HW_PS_NULLFUNC_STACK | |
737 | IEEE80211_HW_BEACON_FILTER | | ||
738 | IEEE80211_HW_REPORTS_TX_ACK_STATUS; | 739 | IEEE80211_HW_REPORTS_TX_ACK_STATUS; |
739 | 740 | ||
740 | dev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | | 741 | dev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | |
diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c index 6f80142580fd..ff3e393bc104 100644 --- a/drivers/net/wireless/rtlwifi/base.c +++ b/drivers/net/wireless/rtlwifi/base.c | |||
@@ -309,7 +309,6 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw) | |||
309 | /* <5> set hw caps */ | 309 | /* <5> set hw caps */ |
310 | hw->flags = IEEE80211_HW_SIGNAL_DBM | | 310 | hw->flags = IEEE80211_HW_SIGNAL_DBM | |
311 | IEEE80211_HW_RX_INCLUDES_FCS | | 311 | IEEE80211_HW_RX_INCLUDES_FCS | |
312 | IEEE80211_HW_BEACON_FILTER | | ||
313 | IEEE80211_HW_AMPDU_AGGREGATION | | 312 | IEEE80211_HW_AMPDU_AGGREGATION | |
314 | IEEE80211_HW_CONNECTION_MONITOR | | 313 | IEEE80211_HW_CONNECTION_MONITOR | |
315 | /* IEEE80211_HW_SUPPORTS_CQM_RSSI | */ | 314 | /* IEEE80211_HW_SUPPORTS_CQM_RSSI | */ |
diff --git a/drivers/net/wireless/rtlwifi/core.c b/drivers/net/wireless/rtlwifi/core.c index d6e37e6a1d53..0ee01ab2e4f6 100644 --- a/drivers/net/wireless/rtlwifi/core.c +++ b/drivers/net/wireless/rtlwifi/core.c | |||
@@ -112,6 +112,8 @@ static int rtl_op_add_interface(struct ieee80211_hw *hw, | |||
112 | struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); | 112 | struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); |
113 | int err = 0; | 113 | int err = 0; |
114 | 114 | ||
115 | vif->driver_flags |= IEEE80211_VIF_BEACON_FILTER; | ||
116 | |||
115 | if (mac->vif) { | 117 | if (mac->vif) { |
116 | RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, | 118 | RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING, |
117 | "vif has been set!! mac->vif = 0x%p\n", mac->vif); | 119 | "vif has been set!! mac->vif = 0x%p\n", mac->vif); |
diff --git a/drivers/net/wireless/wl1251/main.c b/drivers/net/wireless/wl1251/main.c index ba3268ea81fe..86540db6f1a8 100644 --- a/drivers/net/wireless/wl1251/main.c +++ b/drivers/net/wireless/wl1251/main.c | |||
@@ -514,6 +514,8 @@ static int wl1251_op_add_interface(struct ieee80211_hw *hw, | |||
514 | struct wl1251 *wl = hw->priv; | 514 | struct wl1251 *wl = hw->priv; |
515 | int ret = 0; | 515 | int ret = 0; |
516 | 516 | ||
517 | vif->driver_flags |= IEEE80211_VIF_BEACON_FILTER; | ||
518 | |||
517 | wl1251_debug(DEBUG_MAC80211, "mac80211 add interface type %d mac %pM", | 519 | wl1251_debug(DEBUG_MAC80211, "mac80211 add interface type %d mac %pM", |
518 | vif->type, vif->addr); | 520 | vif->type, vif->addr); |
519 | 521 | ||
@@ -1338,7 +1340,6 @@ int wl1251_init_ieee80211(struct wl1251 *wl) | |||
1338 | 1340 | ||
1339 | wl->hw->flags = IEEE80211_HW_SIGNAL_DBM | | 1341 | wl->hw->flags = IEEE80211_HW_SIGNAL_DBM | |
1340 | IEEE80211_HW_SUPPORTS_PS | | 1342 | IEEE80211_HW_SUPPORTS_PS | |
1341 | IEEE80211_HW_BEACON_FILTER | | ||
1342 | IEEE80211_HW_SUPPORTS_UAPSD | | 1343 | IEEE80211_HW_SUPPORTS_UAPSD | |
1343 | IEEE80211_HW_SUPPORTS_CQM_RSSI; | 1344 | IEEE80211_HW_SUPPORTS_CQM_RSSI; |
1344 | 1345 | ||
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index d5f55a149de5..afc5381f2870 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -2060,6 +2060,8 @@ static int wl1271_op_add_interface(struct ieee80211_hw *hw, | |||
2060 | u8 role_type; | 2060 | u8 role_type; |
2061 | bool booted = false; | 2061 | bool booted = false; |
2062 | 2062 | ||
2063 | vif->driver_flags |= IEEE80211_VIF_BEACON_FILTER; | ||
2064 | |||
2063 | wl1271_debug(DEBUG_MAC80211, "mac80211 add interface type %d mac %pM", | 2065 | wl1271_debug(DEBUG_MAC80211, "mac80211 add interface type %d mac %pM", |
2064 | ieee80211_vif_type_p2p(vif), vif->addr); | 2066 | ieee80211_vif_type_p2p(vif), vif->addr); |
2065 | 2067 | ||
@@ -4898,7 +4900,6 @@ static int wl1271_init_ieee80211(struct wl1271 *wl) | |||
4898 | wl->hw->max_listen_interval = wl->conf.conn.max_listen_interval; | 4900 | wl->hw->max_listen_interval = wl->conf.conn.max_listen_interval; |
4899 | 4901 | ||
4900 | wl->hw->flags = IEEE80211_HW_SIGNAL_DBM | | 4902 | wl->hw->flags = IEEE80211_HW_SIGNAL_DBM | |
4901 | IEEE80211_HW_BEACON_FILTER | | ||
4902 | IEEE80211_HW_SUPPORTS_PS | | 4903 | IEEE80211_HW_SUPPORTS_PS | |
4903 | IEEE80211_HW_SUPPORTS_UAPSD | | 4904 | IEEE80211_HW_SUPPORTS_UAPSD | |
4904 | IEEE80211_HW_HAS_RATE_CONTROL | | 4905 | IEEE80211_HW_HAS_RATE_CONTROL | |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index d49928ba5d09..ae8db247bdeb 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -852,6 +852,16 @@ struct ieee80211_channel_switch { | |||
852 | }; | 852 | }; |
853 | 853 | ||
854 | /** | 854 | /** |
855 | * enum ieee80211_vif_flags - virtual interface flags | ||
856 | * | ||
857 | * @IEEE80211_VIF_BEACON_FILTER: the device performs beacon filtering | ||
858 | * on this virtual interface to avoid unnecessary CPU wakeups | ||
859 | */ | ||
860 | enum ieee80211_vif_flags { | ||
861 | IEEE80211_VIF_BEACON_FILTER = BIT(0), | ||
862 | }; | ||
863 | |||
864 | /** | ||
855 | * struct ieee80211_vif - per-interface data | 865 | * struct ieee80211_vif - per-interface data |
856 | * | 866 | * |
857 | * Data in this structure is continually present for driver | 867 | * Data in this structure is continually present for driver |
@@ -863,6 +873,10 @@ struct ieee80211_channel_switch { | |||
863 | * @addr: address of this interface | 873 | * @addr: address of this interface |
864 | * @p2p: indicates whether this AP or STA interface is a p2p | 874 | * @p2p: indicates whether this AP or STA interface is a p2p |
865 | * interface, i.e. a GO or p2p-sta respectively | 875 | * interface, i.e. a GO or p2p-sta respectively |
876 | * @driver_flags: flags/capabilities the driver has for this interface, | ||
877 | * these need to be set (or cleared) when the interface is added | ||
878 | * or, if supported by the driver, the interface type is changed | ||
879 | * at runtime, mac80211 will never touch this field | ||
866 | * @drv_priv: data area for driver use, will always be aligned to | 880 | * @drv_priv: data area for driver use, will always be aligned to |
867 | * sizeof(void *). | 881 | * sizeof(void *). |
868 | */ | 882 | */ |
@@ -871,6 +885,7 @@ struct ieee80211_vif { | |||
871 | struct ieee80211_bss_conf bss_conf; | 885 | struct ieee80211_bss_conf bss_conf; |
872 | u8 addr[ETH_ALEN]; | 886 | u8 addr[ETH_ALEN]; |
873 | bool p2p; | 887 | bool p2p; |
888 | u32 driver_flags; | ||
874 | /* must be last */ | 889 | /* must be last */ |
875 | u8 drv_priv[0] __attribute__((__aligned__(sizeof(void *)))); | 890 | u8 drv_priv[0] __attribute__((__aligned__(sizeof(void *)))); |
876 | }; | 891 | }; |
@@ -1079,10 +1094,6 @@ enum sta_notify_cmd { | |||
1079 | * @IEEE80211_HW_MFP_CAPABLE: | 1094 | * @IEEE80211_HW_MFP_CAPABLE: |
1080 | * Hardware supports management frame protection (MFP, IEEE 802.11w). | 1095 | * Hardware supports management frame protection (MFP, IEEE 802.11w). |
1081 | * | 1096 | * |
1082 | * @IEEE80211_HW_BEACON_FILTER: | ||
1083 | * Hardware supports dropping of irrelevant beacon frames to | ||
1084 | * avoid waking up cpu. | ||
1085 | * | ||
1086 | * @IEEE80211_HW_SUPPORTS_STATIC_SMPS: | 1097 | * @IEEE80211_HW_SUPPORTS_STATIC_SMPS: |
1087 | * Hardware supports static spatial multiplexing powersave, | 1098 | * Hardware supports static spatial multiplexing powersave, |
1088 | * ie. can turn off all but one chain even on HT connections | 1099 | * ie. can turn off all but one chain even on HT connections |
@@ -1150,7 +1161,7 @@ enum ieee80211_hw_flags { | |||
1150 | IEEE80211_HW_PS_NULLFUNC_STACK = 1<<11, | 1161 | IEEE80211_HW_PS_NULLFUNC_STACK = 1<<11, |
1151 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS = 1<<12, | 1162 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS = 1<<12, |
1152 | IEEE80211_HW_MFP_CAPABLE = 1<<13, | 1163 | IEEE80211_HW_MFP_CAPABLE = 1<<13, |
1153 | IEEE80211_HW_BEACON_FILTER = 1<<14, | 1164 | /* reuse bit 14 */ |
1154 | IEEE80211_HW_SUPPORTS_STATIC_SMPS = 1<<15, | 1165 | IEEE80211_HW_SUPPORTS_STATIC_SMPS = 1<<15, |
1155 | IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS = 1<<16, | 1166 | IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS = 1<<16, |
1156 | IEEE80211_HW_SUPPORTS_UAPSD = 1<<17, | 1167 | IEEE80211_HW_SUPPORTS_UAPSD = 1<<17, |
@@ -1446,8 +1457,8 @@ void ieee80211_free_txskb(struct ieee80211_hw *hw, struct sk_buff *skb); | |||
1446 | * way the host will only receive beacons where some relevant information | 1457 | * way the host will only receive beacons where some relevant information |
1447 | * (for example ERP protection or WMM settings) have changed. | 1458 | * (for example ERP protection or WMM settings) have changed. |
1448 | * | 1459 | * |
1449 | * Beacon filter support is advertised with the %IEEE80211_HW_BEACON_FILTER | 1460 | * Beacon filter support is advertised with the %IEEE80211_VIF_BEACON_FILTER |
1450 | * hardware capability. The driver needs to enable beacon filter support | 1461 | * interface capability. The driver needs to enable beacon filter support |
1451 | * whenever power save is enabled, that is %IEEE80211_CONF_PS is set. When | 1462 | * whenever power save is enabled, that is %IEEE80211_CONF_PS is set. When |
1452 | * power save is enabled, the stack will not check for beacon loss and the | 1463 | * power save is enabled, the stack will not check for beacon loss and the |
1453 | * driver needs to notify about loss of beacons with ieee80211_beacon_loss(). | 1464 | * driver needs to notify about loss of beacons with ieee80211_beacon_loss(). |
@@ -3316,7 +3327,7 @@ struct sk_buff *ieee80211_ap_probereq_get(struct ieee80211_hw *hw, | |||
3316 | * | 3327 | * |
3317 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. | 3328 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
3318 | * | 3329 | * |
3319 | * When beacon filtering is enabled with %IEEE80211_HW_BEACON_FILTER and | 3330 | * When beacon filtering is enabled with %IEEE80211_VIF_BEACON_FILTER and |
3320 | * %IEEE80211_CONF_PS is set, the driver needs to inform whenever the | 3331 | * %IEEE80211_CONF_PS is set, the driver needs to inform whenever the |
3321 | * hardware is not receiving beacons with this function. | 3332 | * hardware is not receiving beacons with this function. |
3322 | */ | 3333 | */ |
@@ -3327,7 +3338,7 @@ void ieee80211_beacon_loss(struct ieee80211_vif *vif); | |||
3327 | * | 3338 | * |
3328 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. | 3339 | * @vif: &struct ieee80211_vif pointer from the add_interface callback. |
3329 | * | 3340 | * |
3330 | * When beacon filtering is enabled with %IEEE80211_HW_BEACON_FILTER, and | 3341 | * When beacon filtering is enabled with %IEEE80211_VIF_BEACON_FILTER, and |
3331 | * %IEEE80211_CONF_PS and %IEEE80211_HW_CONNECTION_MONITOR are set, the driver | 3342 | * %IEEE80211_CONF_PS and %IEEE80211_HW_CONNECTION_MONITOR are set, the driver |
3332 | * needs to inform if the connection to the AP has been lost. | 3343 | * needs to inform if the connection to the AP has been lost. |
3333 | * | 3344 | * |
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c index 90baea53e7c5..e8868dae1c01 100644 --- a/net/mac80211/debugfs.c +++ b/net/mac80211/debugfs.c | |||
@@ -247,8 +247,6 @@ static ssize_t hwflags_read(struct file *file, char __user *user_buf, | |||
247 | sf += snprintf(buf + sf, mxln - sf, "SUPPORTS_DYNAMIC_PS\n"); | 247 | sf += snprintf(buf + sf, mxln - sf, "SUPPORTS_DYNAMIC_PS\n"); |
248 | if (local->hw.flags & IEEE80211_HW_MFP_CAPABLE) | 248 | if (local->hw.flags & IEEE80211_HW_MFP_CAPABLE) |
249 | sf += snprintf(buf + sf, mxln - sf, "MFP_CAPABLE\n"); | 249 | sf += snprintf(buf + sf, mxln - sf, "MFP_CAPABLE\n"); |
250 | if (local->hw.flags & IEEE80211_HW_BEACON_FILTER) | ||
251 | sf += snprintf(buf + sf, mxln - sf, "BEACON_FILTER\n"); | ||
252 | if (local->hw.flags & IEEE80211_HW_SUPPORTS_STATIC_SMPS) | 250 | if (local->hw.flags & IEEE80211_HW_SUPPORTS_STATIC_SMPS) |
253 | sf += snprintf(buf + sf, mxln - sf, "SUPPORTS_STATIC_SMPS\n"); | 251 | sf += snprintf(buf + sf, mxln - sf, "SUPPORTS_STATIC_SMPS\n"); |
254 | if (local->hw.flags & IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS) | 252 | if (local->hw.flags & IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS) |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 95d3964fc080..b51eb49d8525 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -127,7 +127,7 @@ static void run_again(struct ieee80211_if_managed *ifmgd, | |||
127 | 127 | ||
128 | void ieee80211_sta_reset_beacon_monitor(struct ieee80211_sub_if_data *sdata) | 128 | void ieee80211_sta_reset_beacon_monitor(struct ieee80211_sub_if_data *sdata) |
129 | { | 129 | { |
130 | if (sdata->local->hw.flags & IEEE80211_HW_BEACON_FILTER) | 130 | if (sdata->vif.driver_flags & IEEE80211_VIF_BEACON_FILTER) |
131 | return; | 131 | return; |
132 | 132 | ||
133 | mod_timer(&sdata->u.mgd.bcn_mon_timer, | 133 | mod_timer(&sdata->u.mgd.bcn_mon_timer, |