mac80211: Use a cfg80211_chan_def in ieee80211_hw_conf_chan
[deliverable/linux.git] / drivers / net / wireless / p54 / main.c
index 5e91ad06dd5db79ffd6c943aaf0e518577a7d294..067e6f2fd050fcad0ddc4eb00565ba3324397894 100644 (file)
@@ -139,6 +139,7 @@ static int p54_beacon_format_ie_tim(struct sk_buff *skb)
 static int p54_beacon_update(struct p54_common *priv,
                        struct ieee80211_vif *vif)
 {
+       struct ieee80211_tx_control control = { };
        struct sk_buff *beacon;
        int ret;
 
@@ -158,7 +159,7 @@ static int p54_beacon_update(struct p54_common *priv,
         * to cancel the old beacon template by hand, instead the firmware
         * will release the previous one through the feedback mechanism.
         */
-       p54_tx_80211(priv->hw, NULL, beacon);
+       p54_tx_80211(priv->hw, &control, beacon);
        priv->tsf_high32 = 0;
        priv->tsf_low32 = 0;
 
@@ -339,7 +340,7 @@ static int p54_config(struct ieee80211_hw *dev, u32 changed)
                 * TODO: Use the LM_SCAN_TRAP to determine the current
                 * operating channel.
                 */
-               priv->curchan = priv->hw->conf.channel;
+               priv->curchan = priv->hw->conf.chandef.chan;
                p54_reset_stats(priv);
                WARN_ON(p54_fetch_statistics(priv));
        }
@@ -479,7 +480,7 @@ static void p54_bss_info_changed(struct ieee80211_hw *dev,
                p54_set_edcf(priv);
        }
        if (changed & BSS_CHANGED_BASIC_RATES) {
-               if (dev->conf.channel->band == IEEE80211_BAND_5GHZ)
+               if (dev->conf.chandef.chan->band == IEEE80211_BAND_5GHZ)
                        priv->basic_rate_mask = (info->basic_rates << 4);
                else
                        priv->basic_rate_mask = info->basic_rates;
@@ -514,6 +515,17 @@ static int p54_set_key(struct ieee80211_hw *dev, enum set_key_cmd cmd,
        if (modparam_nohwcrypt)
                return -EOPNOTSUPP;
 
+       if (key->flags & IEEE80211_KEY_FLAG_RX_MGMT) {
+               /*
+                * Unfortunately most/all firmwares are trying to decrypt
+                * incoming management frames if a suitable key can be found.
+                * However, in doing so the data in these frames gets
+                * corrupted. So, we can't have firmware supported crypto
+                * offload in this case.
+                */
+               return -EOPNOTSUPP;
+       }
+
        mutex_lock(&priv->conf_mutex);
        if (cmd == SET_KEY) {
                switch (key->cipher) {
@@ -658,7 +670,7 @@ static unsigned int p54_flush_count(struct p54_common *priv)
        return total;
 }
 
-static void p54_flush(struct ieee80211_hw *dev, bool drop)
+static void p54_flush(struct ieee80211_hw *dev, u32 queues, bool drop)
 {
        struct p54_common *priv = dev->priv;
        unsigned int total, i;
@@ -737,6 +749,7 @@ struct ieee80211_hw *p54_init_common(size_t priv_data_len)
                     IEEE80211_HW_SIGNAL_DBM |
                     IEEE80211_HW_SUPPORTS_PS |
                     IEEE80211_HW_PS_NULLFUNC_STACK |
+                    IEEE80211_HW_MFP_CAPABLE |
                     IEEE80211_HW_REPORTS_TX_ACK_STATUS;
 
        dev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
This page took 0.025596 seconds and 5 git commands to generate.