Merge remote-tracking branch 'wireless-next/master' into mac80211-next
authorJohannes Berg <johannes.berg@intel.com>
Thu, 28 Jun 2012 11:45:58 +0000 (13:45 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 28 Jun 2012 11:45:58 +0000 (13:45 +0200)
16 files changed:
drivers/net/wireless/ath/ath6kl/cfg80211.c
drivers/net/wireless/ti/wlcore/main.c
include/linux/ieee80211.h
include/linux/nl80211.h
include/net/cfg80211.h
include/net/mac80211.h
net/mac80211/cfg.c
net/mac80211/ieee80211_i.h
net/mac80211/iface.c
net/mac80211/main.c
net/mac80211/mesh_plink.c
net/mac80211/mlme.c
net/mac80211/tx.c
net/mac80211/util.c
net/wireless/core.c
net/wireless/nl80211.c

index fd7dbd4609df3c6da9595a7bf5239cd7932d57fd..aca1d2689e907fce2d5a9841e5acfad515c3ee50 100644 (file)
@@ -3627,6 +3627,7 @@ int ath6kl_cfg80211_init(struct ath6kl *ar)
        wiphy->cipher_suites = cipher_suites;
        wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites);
 
+#ifdef CONFIG_PM
        wiphy->wowlan.flags = WIPHY_WOWLAN_MAGIC_PKT |
                              WIPHY_WOWLAN_DISCONNECT |
                              WIPHY_WOWLAN_GTK_REKEY_FAILURE  |
@@ -3636,6 +3637,7 @@ int ath6kl_cfg80211_init(struct ath6kl *ar)
        wiphy->wowlan.n_patterns = WOW_MAX_FILTERS_PER_LIST;
        wiphy->wowlan.pattern_min_len = 1;
        wiphy->wowlan.pattern_max_len = WOW_PATTERN_SIZE;
+#endif
 
        wiphy->max_sched_scan_ssids = MAX_PROBED_SSIDS;
 
index 2240cca597acf812d87a4291aa855d4e39272f90..0cc9a0240220bdc4c5fb3bb05ff8ad064548d891 100644 (file)
@@ -5504,6 +5504,7 @@ int __devinit wlcore_probe(struct wl1271 *wl, struct platform_device *pdev)
                goto out_free_hw;
        }
 
+#ifdef CONFIG_PM
        ret = enable_irq_wake(wl->irq);
        if (!ret) {
                wl->irq_wake_enabled = true;
@@ -5517,6 +5518,7 @@ int __devinit wlcore_probe(struct wl1271 *wl, struct platform_device *pdev)
                                WL1271_RX_FILTER_MAX_PATTERN_SIZE;
                }
        }
+#endif
        disable_irq(wl->irq);
 
        ret = wl12xx_get_hw_info(wl);
index 318fc1f705b1f1cebe481af87660f63071aa25ab..abf0e5fe6d24ff4ba84622294b0c86ff5913b4a7 100644 (file)
@@ -1092,6 +1092,73 @@ struct ieee80211_ht_operation {
 #define WLAN_HT_SMPS_CONTROL_STATIC    1
 #define WLAN_HT_SMPS_CONTROL_DYNAMIC   3
 
+#define VHT_MCS_SUPPORTED_SET_SIZE      8
+
+struct ieee80211_vht_capabilities {
+       __le32 vht_capabilities_info;
+       u8 vht_supported_mcs_set[VHT_MCS_SUPPORTED_SET_SIZE];
+} __packed;
+
+struct ieee80211_vht_operation {
+       u8 vht_op_info_chwidth;
+       u8 vht_op_info_chan_center_freq_seg1_idx;
+       u8 vht_op_info_chan_center_freq_seg2_idx;
+       __le16 vht_basic_mcs_set;
+} __packed;
+
+/**
+ * struct ieee80211_vht_mcs_info - VHT MCS information
+ * @rx_mcs_map: RX MCS map 2 bits for each stream, total 8 streams
+ * @rx_highest: Indicates highest long GI VHT PPDU data rate
+ *     STA can receive. Rate expressed in units of 1 Mbps.
+ *     If this field is 0 this value should not be used to
+ *     consider the highest RX data rate supported.
+ * @tx_mcs_map: TX MCS map 2 bits for each stream, total 8 streams
+ * @tx_highest: Indicates highest long GI VHT PPDU data rate
+ *     STA can transmit. Rate expressed in units of 1 Mbps.
+ *     If this field is 0 this value should not be used to
+ *     consider the highest TX data rate supported.
+ */
+struct ieee80211_vht_mcs_info {
+       __le16 rx_mcs_map;
+       __le16 rx_highest;
+       __le16 tx_mcs_map;
+       __le16 tx_highest;
+} __packed;
+
+#define IEEE80211_VHT_MCS_ZERO_TO_SEVEN_SUPPORT 0
+#define IEEE80211_VHT_MCS_ZERO_TO_EIGHT_SUPPORT 1
+#define IEEE80211_VHT_MCS_ZERO_TO_NINE_SUPPORT  2
+#define IEEE80211_VHT_MCS_NOT_SUPPORTED 3
+
+/* 802.11ac VHT Capabilities */
+#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895                0x00000000
+#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991                0x00000001
+#define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454               0x00000002
+#define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ              0x00000004
+#define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ     0x00000008
+#define IEEE80211_VHT_CAP_RXLDPC                              0x00000010
+#define IEEE80211_VHT_CAP_SHORT_GI_80                         0x00000020
+#define IEEE80211_VHT_CAP_SHORT_GI_160                        0x00000040
+#define IEEE80211_VHT_CAP_TXSTBC                              0x00000080
+#define IEEE80211_VHT_CAP_RXSTBC_1                            0x00000100
+#define IEEE80211_VHT_CAP_RXSTBC_2                            0x00000200
+#define IEEE80211_VHT_CAP_RXSTBC_3                            0x00000300
+#define IEEE80211_VHT_CAP_RXSTBC_4                            0x00000400
+#define IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE               0x00000800
+#define IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE               0x00001000
+#define IEEE80211_VHT_CAP_BEAMFORMER_ANTENNAS_MAX             0x00006000
+#define IEEE80211_VHT_CAP_SOUNDING_DIMENTION_MAX              0x00030000
+#define IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE               0x00080000
+#define IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE               0x00100000
+#define IEEE80211_VHT_CAP_VHT_TXOP_PS                         0x00200000
+#define IEEE80211_VHT_CAP_HTC_VHT                             0x00400000
+#define IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT          0x00800000
+#define IEEE80211_VHT_CAP_VHT_LINK_ADAPTATION_VHT_UNSOL_MFB   0x08000000
+#define IEEE80211_VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB     0x0c000000
+#define IEEE80211_VHT_CAP_RX_ANTENNA_PATTERN                  0x10000000
+#define IEEE80211_VHT_CAP_TX_ANTENNA_PATTERN                  0x20000000
+
 /* Authentication algorithms */
 #define WLAN_AUTH_OPEN 0
 #define WLAN_AUTH_SHARED_KEY 1
@@ -1352,6 +1419,9 @@ enum ieee80211_eid {
        WLAN_EID_DSE_REGISTERED_LOCATION = 58,
        WLAN_EID_SUPPORTED_REGULATORY_CLASSES = 59,
        WLAN_EID_EXT_CHANSWITCH_ANN = 60,
+
+       WLAN_EID_VHT_CAPABILITY = 191,
+       WLAN_EID_VHT_OPERATION = 192,
 };
 
 /* Action category code */
index c0fc5d2773388fd2083f1d2b977b1088f67b2018..23003272c70ed1f862f087145c6c07b9328c0122 100644 (file)
@@ -1813,6 +1813,9 @@ enum nl80211_mpath_info {
  * @NL80211_BAND_ATTR_HT_CAPA: HT capabilities, as in the HT information IE
  * @NL80211_BAND_ATTR_HT_AMPDU_FACTOR: A-MPDU factor, as in 11n
  * @NL80211_BAND_ATTR_HT_AMPDU_DENSITY: A-MPDU density, as in 11n
+ * @NL80211_BAND_ATTR_VHT_MCS_SET: 32-byte attribute containing the MCS set as
+ *     defined in 802.11ac
+ * @NL80211_BAND_ATTR_VHT_CAPA: VHT capabilities, as in the HT information IE
  * @NL80211_BAND_ATTR_MAX: highest band attribute currently defined
  * @__NL80211_BAND_ATTR_AFTER_LAST: internal use
  */
@@ -1826,6 +1829,9 @@ enum nl80211_band_attr {
        NL80211_BAND_ATTR_HT_AMPDU_FACTOR,
        NL80211_BAND_ATTR_HT_AMPDU_DENSITY,
 
+       NL80211_BAND_ATTR_VHT_MCS_SET,
+       NL80211_BAND_ATTR_VHT_CAPA,
+
        /* keep last */
        __NL80211_BAND_ATTR_AFTER_LAST,
        NL80211_BAND_ATTR_MAX = __NL80211_BAND_ATTR_AFTER_LAST - 1
index 061c01957e54bae76f1bd7e2ba6bd33ca0916576..1fc89c4f930c7bfabc3a2d911f9850ca0166f406 100644 (file)
@@ -210,6 +210,22 @@ struct ieee80211_sta_ht_cap {
        struct ieee80211_mcs_info mcs;
 };
 
+/**
+ * struct ieee80211_sta_vht_cap - STA's VHT capabilities
+ *
+ * This structure describes most essential parameters needed
+ * to describe 802.11ac VHT capabilities for an STA.
+ *
+ * @vht_supported: is VHT supported by the STA
+ * @cap: VHT capabilities map as described in 802.11ac spec
+ * @vht_mcs: Supported VHT MCS rates
+ */
+struct ieee80211_sta_vht_cap {
+       bool vht_supported;
+       u32 cap; /* use IEEE80211_VHT_CAP_ */
+       struct ieee80211_vht_mcs_info vht_mcs;
+};
+
 /**
  * struct ieee80211_supported_band - frequency band definition
  *
@@ -233,6 +249,7 @@ struct ieee80211_supported_band {
        int n_channels;
        int n_bitrates;
        struct ieee80211_sta_ht_cap ht_cap;
+       struct ieee80211_sta_vht_cap vht_cap;
 };
 
 /*
@@ -2153,7 +2170,9 @@ struct wiphy {
        char fw_version[ETHTOOL_BUSINFO_LEN];
        u32 hw_version;
 
+#ifdef CONFIG_PM
        struct wiphy_wowlan_support wowlan;
+#endif
 
        u16 max_remain_on_channel_duration;
 
index 670a58ba8a41a52d832b7237cc552ef631177f2a..b5da094468f17e20f6097fc7e9983ccb4bdc1165 100644 (file)
@@ -3832,12 +3832,6 @@ void ieee80211_enable_rssi_reports(struct ieee80211_vif *vif,
 
 void ieee80211_disable_rssi_reports(struct ieee80211_vif *vif);
 
-int ieee80211_add_srates_ie(struct ieee80211_vif *vif,
-                           struct sk_buff *skb, bool need_basic);
-
-int ieee80211_add_ext_srates_ie(struct ieee80211_vif *vif,
-                               struct sk_buff *skb, bool need_basic);
-
 /**
  * ieee80211_ave_rssi - report the average rssi for the specified interface
  *
index c2a2dcbfdf017abc788b58dd3744e3e7a390a18e..0f02c8b77e1c8f95769d738b0b32cce482768675 100644 (file)
@@ -2668,8 +2668,8 @@ ieee80211_prep_tdls_encap_data(struct wiphy *wiphy, struct net_device *dev,
                tf->u.setup_req.capability =
                        cpu_to_le16(ieee80211_get_tdls_sta_capab(sdata));
 
-               ieee80211_add_srates_ie(&sdata->vif, skb, false);
-               ieee80211_add_ext_srates_ie(&sdata->vif, skb, false);
+               ieee80211_add_srates_ie(sdata, skb, false);
+               ieee80211_add_ext_srates_ie(sdata, skb, false);
                ieee80211_tdls_add_ext_capab(skb);
                break;
        case WLAN_TDLS_SETUP_RESPONSE:
@@ -2682,8 +2682,8 @@ ieee80211_prep_tdls_encap_data(struct wiphy *wiphy, struct net_device *dev,
                tf->u.setup_resp.capability =
                        cpu_to_le16(ieee80211_get_tdls_sta_capab(sdata));
 
-               ieee80211_add_srates_ie(&sdata->vif, skb, false);
-               ieee80211_add_ext_srates_ie(&sdata->vif, skb, false);
+               ieee80211_add_srates_ie(sdata, skb, false);
+               ieee80211_add_ext_srates_ie(sdata, skb, false);
                ieee80211_tdls_add_ext_capab(skb);
                break;
        case WLAN_TDLS_SETUP_CONFIRM:
@@ -2743,8 +2743,8 @@ ieee80211_prep_tdls_direct(struct wiphy *wiphy, struct net_device *dev,
                mgmt->u.action.u.tdls_discover_resp.capability =
                        cpu_to_le16(ieee80211_get_tdls_sta_capab(sdata));
 
-               ieee80211_add_srates_ie(&sdata->vif, skb, false);
-               ieee80211_add_ext_srates_ie(&sdata->vif, skb, false);
+               ieee80211_add_srates_ie(sdata, skb, false);
+               ieee80211_add_ext_srates_ie(sdata, skb, false);
                ieee80211_tdls_add_ext_capab(skb);
                break;
        default:
index f834a005e1c5e0fe462d7f7e248a97d7c081d87b..6b7157d205070276355581d7039aa1002cbeae8f 100644 (file)
@@ -1284,7 +1284,6 @@ int ieee80211_if_change_type(struct ieee80211_sub_if_data *sdata,
                             enum nl80211_iftype type);
 void ieee80211_if_remove(struct ieee80211_sub_if_data *sdata);
 void ieee80211_remove_interfaces(struct ieee80211_local *local);
-u32 __ieee80211_recalc_idle(struct ieee80211_local *local);
 void ieee80211_recalc_idle(struct ieee80211_local *local);
 void ieee80211_adjust_monitor_flags(struct ieee80211_sub_if_data *sdata,
                                    const int offset);
@@ -1481,6 +1480,10 @@ u8 *ieee80211_ie_build_ht_oper(u8 *pos, struct ieee80211_sta_ht_cap *ht_cap,
                               struct ieee80211_channel *channel,
                               enum nl80211_channel_type channel_type,
                               u16 prot_mode);
+int ieee80211_add_srates_ie(struct ieee80211_sub_if_data *sdata,
+                           struct sk_buff *skb, bool need_basic);
+int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata,
+                               struct sk_buff *skb, bool need_basic);
 
 /* channel management */
 enum ieee80211_chan_mode {
index 58c2ab3d483a9878a752ab22e33e3f585c294546..0a6b4e1043cb7ea96ddfd4dbe3dcfca5080cac8b 100644 (file)
  */
 
 
+static u32 ieee80211_idle_off(struct ieee80211_local *local,
+                             const char *reason)
+{
+       if (!(local->hw.conf.flags & IEEE80211_CONF_IDLE))
+               return 0;
+
+       local->hw.conf.flags &= ~IEEE80211_CONF_IDLE;
+       return IEEE80211_CONF_CHANGE_IDLE;
+}
+
+static u32 ieee80211_idle_on(struct ieee80211_local *local)
+{
+       if (local->hw.conf.flags & IEEE80211_CONF_IDLE)
+               return 0;
+
+       drv_flush(local, false);
+
+       local->hw.conf.flags |= IEEE80211_CONF_IDLE;
+       return IEEE80211_CONF_CHANGE_IDLE;
+}
+
+static u32 __ieee80211_recalc_idle(struct ieee80211_local *local)
+{
+       struct ieee80211_sub_if_data *sdata;
+       int count = 0;
+       bool working = false, scanning = false;
+       unsigned int led_trig_start = 0, led_trig_stop = 0;
+       struct ieee80211_roc_work *roc;
+
+#ifdef CONFIG_PROVE_LOCKING
+       WARN_ON(debug_locks && !lockdep_rtnl_is_held() &&
+               !lockdep_is_held(&local->iflist_mtx));
+#endif
+       lockdep_assert_held(&local->mtx);
+
+       list_for_each_entry(sdata, &local->interfaces, list) {
+               if (!ieee80211_sdata_running(sdata)) {
+                       sdata->vif.bss_conf.idle = true;
+                       continue;
+               }
+
+               sdata->old_idle = sdata->vif.bss_conf.idle;
+
+               /* do not count disabled managed interfaces */
+               if (sdata->vif.type == NL80211_IFTYPE_STATION &&
+                   !sdata->u.mgd.associated &&
+                   !sdata->u.mgd.auth_data &&
+                   !sdata->u.mgd.assoc_data) {
+                       sdata->vif.bss_conf.idle = true;
+                       continue;
+               }
+               /* do not count unused IBSS interfaces */
+               if (sdata->vif.type == NL80211_IFTYPE_ADHOC &&
+                   !sdata->u.ibss.ssid_len) {
+                       sdata->vif.bss_conf.idle = true;
+                       continue;
+               }
+               /* count everything else */
+               sdata->vif.bss_conf.idle = false;
+               count++;
+       }
+
+       if (!local->ops->remain_on_channel) {
+               list_for_each_entry(roc, &local->roc_list, list) {
+                       working = true;
+                       roc->sdata->vif.bss_conf.idle = false;
+               }
+       }
+
+       if (local->scan_sdata &&
+           !(local->hw.flags & IEEE80211_HW_SCAN_WHILE_IDLE)) {
+               scanning = true;
+               local->scan_sdata->vif.bss_conf.idle = false;
+       }
+
+       list_for_each_entry(sdata, &local->interfaces, list) {
+               if (sdata->vif.type == NL80211_IFTYPE_MONITOR ||
+                   sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
+                       continue;
+               if (sdata->old_idle == sdata->vif.bss_conf.idle)
+                       continue;
+               if (!ieee80211_sdata_running(sdata))
+                       continue;
+               ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_IDLE);
+       }
+
+       if (working || scanning)
+               led_trig_start |= IEEE80211_TPT_LEDTRIG_FL_WORK;
+       else
+               led_trig_stop |= IEEE80211_TPT_LEDTRIG_FL_WORK;
+
+       if (count)
+               led_trig_start |= IEEE80211_TPT_LEDTRIG_FL_CONNECTED;
+       else
+               led_trig_stop |= IEEE80211_TPT_LEDTRIG_FL_CONNECTED;
+
+       ieee80211_mod_tpt_led_trig(local, led_trig_start, led_trig_stop);
+
+       if (working)
+               return ieee80211_idle_off(local, "working");
+       if (scanning)
+               return ieee80211_idle_off(local, "scanning");
+       if (!count)
+               return ieee80211_idle_on(local);
+       else
+               return ieee80211_idle_off(local, "in use");
+
+       return 0;
+}
+
+void ieee80211_recalc_idle(struct ieee80211_local *local)
+{
+       u32 chg;
+
+       mutex_lock(&local->iflist_mtx);
+       chg = __ieee80211_recalc_idle(local);
+       mutex_unlock(&local->iflist_mtx);
+       if (chg)
+               ieee80211_hw_config(local, chg);
+}
+
 static int ieee80211_change_mtu(struct net_device *dev, int new_mtu)
 {
        int meshhdrlen;
@@ -1403,127 +1524,6 @@ void ieee80211_remove_interfaces(struct ieee80211_local *local)
        list_del(&unreg_list);
 }
 
-static u32 ieee80211_idle_off(struct ieee80211_local *local,
-                             const char *reason)
-{
-       if (!(local->hw.conf.flags & IEEE80211_CONF_IDLE))
-               return 0;
-
-       local->hw.conf.flags &= ~IEEE80211_CONF_IDLE;
-       return IEEE80211_CONF_CHANGE_IDLE;
-}
-
-static u32 ieee80211_idle_on(struct ieee80211_local *local)
-{
-       if (local->hw.conf.flags & IEEE80211_CONF_IDLE)
-               return 0;
-
-       drv_flush(local, false);
-
-       local->hw.conf.flags |= IEEE80211_CONF_IDLE;
-       return IEEE80211_CONF_CHANGE_IDLE;
-}
-
-u32 __ieee80211_recalc_idle(struct ieee80211_local *local)
-{
-       struct ieee80211_sub_if_data *sdata;
-       int count = 0;
-       bool working = false, scanning = false;
-       unsigned int led_trig_start = 0, led_trig_stop = 0;
-       struct ieee80211_roc_work *roc;
-
-#ifdef CONFIG_PROVE_LOCKING
-       WARN_ON(debug_locks && !lockdep_rtnl_is_held() &&
-               !lockdep_is_held(&local->iflist_mtx));
-#endif
-       lockdep_assert_held(&local->mtx);
-
-       list_for_each_entry(sdata, &local->interfaces, list) {
-               if (!ieee80211_sdata_running(sdata)) {
-                       sdata->vif.bss_conf.idle = true;
-                       continue;
-               }
-
-               sdata->old_idle = sdata->vif.bss_conf.idle;
-
-               /* do not count disabled managed interfaces */
-               if (sdata->vif.type == NL80211_IFTYPE_STATION &&
-                   !sdata->u.mgd.associated &&
-                   !sdata->u.mgd.auth_data &&
-                   !sdata->u.mgd.assoc_data) {
-                       sdata->vif.bss_conf.idle = true;
-                       continue;
-               }
-               /* do not count unused IBSS interfaces */
-               if (sdata->vif.type == NL80211_IFTYPE_ADHOC &&
-                   !sdata->u.ibss.ssid_len) {
-                       sdata->vif.bss_conf.idle = true;
-                       continue;
-               }
-               /* count everything else */
-               sdata->vif.bss_conf.idle = false;
-               count++;
-       }
-
-       if (!local->ops->remain_on_channel) {
-               list_for_each_entry(roc, &local->roc_list, list) {
-                       working = true;
-                       roc->sdata->vif.bss_conf.idle = false;
-               }
-       }
-
-       if (local->scan_sdata &&
-           !(local->hw.flags & IEEE80211_HW_SCAN_WHILE_IDLE)) {
-               scanning = true;
-               local->scan_sdata->vif.bss_conf.idle = false;
-       }
-
-       list_for_each_entry(sdata, &local->interfaces, list) {
-               if (sdata->vif.type == NL80211_IFTYPE_MONITOR ||
-                   sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
-                       continue;
-               if (sdata->old_idle == sdata->vif.bss_conf.idle)
-                       continue;
-               if (!ieee80211_sdata_running(sdata))
-                       continue;
-               ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_IDLE);
-       }
-
-       if (working || scanning)
-               led_trig_start |= IEEE80211_TPT_LEDTRIG_FL_WORK;
-       else
-               led_trig_stop |= IEEE80211_TPT_LEDTRIG_FL_WORK;
-
-       if (count)
-               led_trig_start |= IEEE80211_TPT_LEDTRIG_FL_CONNECTED;
-       else
-               led_trig_stop |= IEEE80211_TPT_LEDTRIG_FL_CONNECTED;
-
-       ieee80211_mod_tpt_led_trig(local, led_trig_start, led_trig_stop);
-
-       if (working)
-               return ieee80211_idle_off(local, "working");
-       if (scanning)
-               return ieee80211_idle_off(local, "scanning");
-       if (!count)
-               return ieee80211_idle_on(local);
-       else
-               return ieee80211_idle_off(local, "in use");
-
-       return 0;
-}
-
-void ieee80211_recalc_idle(struct ieee80211_local *local)
-{
-       u32 chg;
-
-       mutex_lock(&local->iflist_mtx);
-       chg = __ieee80211_recalc_idle(local);
-       mutex_unlock(&local->iflist_mtx);
-       if (chg)
-               ieee80211_hw_config(local, chg);
-}
-
 static int netdev_notify(struct notifier_block *nb,
                         unsigned long state,
                         void *ndev)
index 0b040fb73673f9e2de6ad7336879907a840945d0..aded0018f6f3cb0559be25ae7f7d39ac51de6164 100644 (file)
@@ -706,12 +706,11 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
             local->hw.offchannel_tx_hw_queue >= local->hw.queues))
                return -EINVAL;
 
-       if ((hw->wiphy->wowlan.flags || hw->wiphy->wowlan.n_patterns)
 #ifdef CONFIG_PM
-           && (!local->ops->suspend || !local->ops->resume)
-#endif
-           )
+       if ((hw->wiphy->wowlan.flags || hw->wiphy->wowlan.n_patterns) &&
+           (!local->ops->suspend || !local->ops->resume))
                return -EINVAL;
+#endif
 
        if ((hw->flags & IEEE80211_HW_SCAN_WHILE_IDLE) && !local->ops->hw_scan)
                return -EINVAL;
index a1dbd15402768aedcab66ab698a53d70176d14a2..425685914d7d68b0c90a7bfd7364235cba54cb6d 100644 (file)
@@ -258,8 +258,8 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata,
                        pos = skb_put(skb, 2);
                        memcpy(pos + 2, &plid, 2);
                }
-               if (ieee80211_add_srates_ie(&sdata->vif, skb, true) ||
-                   ieee80211_add_ext_srates_ie(&sdata->vif, skb, true) ||
+               if (ieee80211_add_srates_ie(sdata, skb, true) ||
+                   ieee80211_add_ext_srates_ie(sdata, skb, true) ||
                    mesh_add_rsn_ie(skb, sdata) ||
                    mesh_add_meshid_ie(skb, sdata) ||
                    mesh_add_meshconf_ie(skb, sdata))
index f1a80da4e56ac6dacb384034aceb20329b6bc69e..398ce8e9c4d733084e4d01b90c21433ab3dddb57 100644 (file)
@@ -902,9 +902,6 @@ static bool ieee80211_powersave_allowed(struct ieee80211_sub_if_data *sdata)
        if (!mgd->associated)
                return false;
 
-       if (!mgd->associated->beacon_ies)
-               return false;
-
        if (mgd->flags & (IEEE80211_STA_BEACON_POLL |
                          IEEE80211_STA_CONNECTION_POLL))
                return false;
@@ -1366,6 +1363,10 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
        }
        mutex_unlock(&local->sta_mtx);
 
+       /* flush out any pending frame (e.g. DELBA) before deauth/disassoc */
+       if (tx)
+               drv_flush(local, false);
+
        /* deauthenticate/disassociate now */
        if (tx || frame_buf)
                ieee80211_send_deauth_disassoc(sdata, bssid, stype, reason,
index ec8f534673745f61eae34cb7fa922498d7693874..4e753032e48dc2276b19be12c12ff63c96cdc1ee 100644 (file)
@@ -2420,9 +2420,9 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
                *pos++ = WLAN_EID_SSID;
                *pos++ = 0x0;
 
-               if (ieee80211_add_srates_ie(&sdata->vif, skb, true) ||
+               if (ieee80211_add_srates_ie(sdata, skb, true) ||
                    mesh_add_ds_params_ie(skb, sdata) ||
-                   ieee80211_add_ext_srates_ie(&sdata->vif, skb, true) ||
+                   ieee80211_add_ext_srates_ie(sdata, skb, true) ||
                    mesh_add_rsn_ie(skb, sdata) ||
                    mesh_add_ht_cap_ie(skb, sdata) ||
                    mesh_add_ht_oper_ie(skb, sdata) ||
index 242ecde381f605429f05d427b32f6f54ab9983d1..c4245695afc3d795439d58cfb63583923f492b75 100644 (file)
@@ -1764,15 +1764,14 @@ ieee80211_ht_oper_to_channel_type(struct ieee80211_ht_operation *ht_oper)
        return channel_type;
 }
 
-int ieee80211_add_srates_ie(struct ieee80211_vif *vif,
+int ieee80211_add_srates_ie(struct ieee80211_sub_if_data *sdata,
                            struct sk_buff *skb, bool need_basic)
 {
-       struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
        struct ieee80211_local *local = sdata->local;
        struct ieee80211_supported_band *sband;
        int rate;
        u8 i, rates, *pos;
-       u32 basic_rates = vif->bss_conf.basic_rates;
+       u32 basic_rates = sdata->vif.bss_conf.basic_rates;
 
        sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
        rates = sband->n_bitrates;
@@ -1796,15 +1795,14 @@ int ieee80211_add_srates_ie(struct ieee80211_vif *vif,
        return 0;
 }
 
-int ieee80211_add_ext_srates_ie(struct ieee80211_vif *vif,
+int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata,
                                struct sk_buff *skb, bool need_basic)
 {
-       struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
        struct ieee80211_local *local = sdata->local;
        struct ieee80211_supported_band *sband;
        int rate;
        u8 i, exrates, *pos;
-       u32 basic_rates = vif->bss_conf.basic_rates;
+       u32 basic_rates = sdata->vif.bss_conf.basic_rates;
 
        sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
        exrates = sband->n_bitrates;
index 907f62c80e28cbc92403d65bb6fe984b56aae578..ddd32afa5f0a8e1ba6c00dcddc535b5e7b2f9e30 100644 (file)
@@ -421,9 +421,11 @@ int wiphy_register(struct wiphy *wiphy)
        int i;
        u16 ifmodes = wiphy->interface_modes;
 
+#ifdef CONFIG_PM
        if (WARN_ON((wiphy->wowlan.flags & WIPHY_WOWLAN_GTK_REKEY_FAILURE) &&
                    !(wiphy->wowlan.flags & WIPHY_WOWLAN_SUPPORTS_GTK_REKEY)))
                return -EINVAL;
+#endif
 
        if (WARN_ON(wiphy->ap_sme_capa &&
                    !(wiphy->flags & WIPHY_FLAG_HAVE_AP_SME)))
@@ -500,12 +502,14 @@ int wiphy_register(struct wiphy *wiphy)
                return -EINVAL;
        }
 
+#ifdef CONFIG_PM
        if (rdev->wiphy.wowlan.n_patterns) {
                if (WARN_ON(!rdev->wiphy.wowlan.pattern_min_len ||
                            rdev->wiphy.wowlan.pattern_min_len >
                            rdev->wiphy.wowlan.pattern_max_len))
                        return -EINVAL;
        }
+#endif
 
        /* check and set up bitrates */
        ieee80211_set_bitrate_flags(wiphy);
index 234ff3bbd104c9f8538e5225dfb1be2f7831b89a..5c4a720f04426e3c8a635c730927910048429fdf 100644 (file)
@@ -921,6 +921,15 @@ static int nl80211_send_wiphy(struct sk_buff *msg, u32 pid, u32 seq, int flags,
                                dev->wiphy.bands[band]->ht_cap.ampdu_density)))
                        goto nla_put_failure;
 
+               /* add VHT info */
+               if (dev->wiphy.bands[band]->vht_cap.vht_supported &&
+                   (nla_put(msg, NL80211_BAND_ATTR_VHT_MCS_SET,
+                            sizeof(dev->wiphy.bands[band]->vht_cap.vht_mcs),
+                            &dev->wiphy.bands[band]->vht_cap.vht_mcs) ||
+                    nla_put_u32(msg, NL80211_BAND_ATTR_VHT_CAPA,
+                                dev->wiphy.bands[band]->vht_cap.cap)))
+                       goto nla_put_failure;
+
                /* add frequencies */
                nl_freqs = nla_nest_start(msg, NL80211_BAND_ATTR_FREQS);
                if (!nl_freqs)
@@ -1112,6 +1121,7 @@ static int nl80211_send_wiphy(struct sk_buff *msg, u32 pid, u32 seq, int flags,
                nla_nest_end(msg, nl_ifs);
        }
 
+#ifdef CONFIG_PM
        if (dev->wiphy.wowlan.flags || dev->wiphy.wowlan.n_patterns) {
                struct nlattr *nl_wowlan;
 
@@ -1152,6 +1162,7 @@ static int nl80211_send_wiphy(struct sk_buff *msg, u32 pid, u32 seq, int flags,
 
                nla_nest_end(msg, nl_wowlan);
        }
+#endif
 
        if (nl80211_put_iftypes(msg, NL80211_ATTR_SOFTWARE_IFTYPES,
                                dev->wiphy.software_iftypes))
@@ -6276,6 +6287,7 @@ static int nl80211_leave_mesh(struct sk_buff *skb, struct genl_info *info)
        return cfg80211_leave_mesh(rdev, dev);
 }
 
+#ifdef CONFIG_PM
 static int nl80211_get_wowlan(struct sk_buff *skb, struct genl_info *info)
 {
        struct cfg80211_registered_device *rdev = info->user_ptr[0];
@@ -6504,6 +6516,7 @@ static int nl80211_set_wowlan(struct sk_buff *skb, struct genl_info *info)
        kfree(new_triggers.patterns);
        return err;
 }
+#endif
 
 static int nl80211_set_rekey_data(struct sk_buff *skb, struct genl_info *info)
 {
@@ -7158,6 +7171,7 @@ static struct genl_ops nl80211_ops[] = {
                .internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
                                  NL80211_FLAG_NEED_RTNL,
        },
+#ifdef CONFIG_PM
        {
                .cmd = NL80211_CMD_GET_WOWLAN,
                .doit = nl80211_get_wowlan,
@@ -7174,6 +7188,7 @@ static struct genl_ops nl80211_ops[] = {
                .internal_flags = NL80211_FLAG_NEED_WIPHY |
                                  NL80211_FLAG_NEED_RTNL,
        },
+#endif
        {
                .cmd = NL80211_CMD_SET_REKEY_OFFLOAD,
                .doit = nl80211_set_rekey_data,