Commit 77fe7395 authored by Sara Sharon's avatar Sara Sharon Committed by Emmanuel Grumbach

iwlwifi: mvm: update rx_status with mactime flag

When forming IBSS, mac80211 scans in order to find an already
existing cell to join.
In case the scan does not find any existing cell a new IBSS
cell is formed.
When receiving the beacons of another IBSS cell we should
merge if the other IBSS cell's TSF is higher than ours.
However, currently iwlmvm does not set any timestamp flag in
rx_status so there is no valid rx timestamp to compare the
beacon's TSF to.
The reason for that is that TSF as indicated by the firmware
is at INA time, but up till now mac80211 expected the TSF at
the beginning or end of the MPDU.
Set the flag to the newly added RX_FLAG_MACTIME_PLCP_START flag.
Signed-off-by: default avatarSara Sharon <sara.sharon@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent e0d8fdec
...@@ -1484,6 +1484,8 @@ void iwl_mvm_rx_stored_beacon_notif(struct iwl_mvm *mvm, ...@@ -1484,6 +1484,8 @@ void iwl_mvm_rx_stored_beacon_notif(struct iwl_mvm *mvm,
/* update rx_status according to the notification's metadata */ /* update rx_status according to the notification's metadata */
memset(&rx_status, 0, sizeof(rx_status)); memset(&rx_status, 0, sizeof(rx_status));
rx_status.mactime = le64_to_cpu(sb->tsf); rx_status.mactime = le64_to_cpu(sb->tsf);
/* TSF as indicated by the firmware is at INA time */
rx_status.flag |= RX_FLAG_MACTIME_PLCP_START;
rx_status.device_timestamp = le32_to_cpu(sb->system_time); rx_status.device_timestamp = le32_to_cpu(sb->system_time);
rx_status.band = rx_status.band =
(sb->phy_flags & cpu_to_le16(RX_RES_PHY_FLAGS_BAND_24)) ? (sb->phy_flags & cpu_to_le16(RX_RES_PHY_FLAGS_BAND_24)) ?
......
...@@ -322,11 +322,9 @@ void iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct napi_struct *napi, ...@@ -322,11 +322,9 @@ void iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct napi_struct *napi,
rx_status->freq = rx_status->freq =
ieee80211_channel_to_frequency(le16_to_cpu(phy_info->channel), ieee80211_channel_to_frequency(le16_to_cpu(phy_info->channel),
rx_status->band); rx_status->band);
/*
* TSF as indicated by the fw is at INA time, but mac80211 expects the /* TSF as indicated by the firmware is at INA time */
* TSF at the beginning of the MPDU. rx_status->flag |= RX_FLAG_MACTIME_PLCP_START;
*/
/*rx_status->flag |= RX_FLAG_MACTIME_MPDU;*/
iwl_mvm_get_signal_strength(mvm, phy_info, rx_status); iwl_mvm_get_signal_strength(mvm, phy_info, rx_status);
......
...@@ -332,6 +332,8 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, ...@@ -332,6 +332,8 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
rx_status->freq = ieee80211_channel_to_frequency(desc->channel, rx_status->freq = ieee80211_channel_to_frequency(desc->channel,
rx_status->band); rx_status->band);
iwl_mvm_get_signal_strength(mvm, desc, rx_status); iwl_mvm_get_signal_strength(mvm, desc, rx_status);
/* TSF as indicated by the firmware is at INA time */
rx_status->flag |= RX_FLAG_MACTIME_PLCP_START;
rcu_read_lock(); rcu_read_lock();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment