iwlwifi: mvm: support version 2 of stored beacon notification
authorSara Sharon <sara.sharon@intel.com>
Tue, 8 Nov 2016 16:34:42 +0000 (18:34 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Thu, 26 Jan 2017 07:38:58 +0000 (09:38 +0200)
For 9000 devices withg upload, FW cannot send the entire phy
flags, and will send only the band - which is what we really
care about anyway. Change is backward compatible.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h
drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c

index ae12bad..567597c 100644 (file)
@@ -2075,7 +2075,7 @@ struct iwl_mu_group_mgmt_notif {
  * @system_time: system time on air rise
  * @tsf: TSF on air rise
  * @beacon_timestamp: beacon on air rise
- * @phy_flags: general phy flags: band, modulation, etc.
+ * @band: band, matches &RX_RES_PHY_FLAGS_BAND_24 definition
  * @channel: channel this beacon was received on
  * @rates: rate in ucode internal format
  * @byte_count: frame's byte count
@@ -2084,12 +2084,12 @@ struct iwl_stored_beacon_notif {
        __le32 system_time;
        __le64 tsf;
        __le32 beacon_timestamp;
-       __le16 phy_flags;
+       __le16 band;
        __le16 channel;
        __le32 rates;
        __le32 byte_count;
        u8 data[MAX_STORED_BEACON_SIZE];
-} __packed; /* WOWLAN_STROED_BEACON_INFO_S_VER_1 */
+} __packed; /* WOWLAN_STROED_BEACON_INFO_S_VER_2 */
 
 #define LQM_NUMBER_OF_STATIONS_IN_REPORT 16
 
index 4a0874e..ebf6c07 100644 (file)
@@ -1565,7 +1565,7 @@ void iwl_mvm_rx_stored_beacon_notif(struct iwl_mvm *mvm,
        rx_status.flag |= RX_FLAG_MACTIME_PLCP_START;
        rx_status.device_timestamp = le32_to_cpu(sb->system_time);
        rx_status.band =
-               (sb->phy_flags & cpu_to_le16(RX_RES_PHY_FLAGS_BAND_24)) ?
+               (sb->band & cpu_to_le16(RX_RES_PHY_FLAGS_BAND_24)) ?
                                NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
        rx_status.freq =
                ieee80211_channel_to_frequency(le16_to_cpu(sb->channel),