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 ae12badc0c2ab7dd08451d3432528274936125b8..567597c261152edb91485f5fa68793f1c2742eea 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 4a0874e4073169632e45b8e09e9a3ff98343594e..ebf6c071eb365c450e5ccc41e0924e0470a1726e 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),