Commit d56a7801 authored by Sara Sharon's avatar Sara Sharon Committed by Emmanuel Grumbach

iwlwifi: pcie: update iwl_mpdu_desc fields

Final API of iwl_mpdu_desc has a change in the order of
the fields and does not include energy from the third
antenna (which is perfectly fine, since we don't have one).
Update the structure accordingly.
Signed-off-by: default avatarSara Sharon <sara.sharon@intel.com>
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
parent bce97731
...@@ -347,11 +347,11 @@ struct iwl_rx_mpdu_desc { ...@@ -347,11 +347,11 @@ struct iwl_rx_mpdu_desc {
/* DW8 */ /* DW8 */
__le32 filter_match; __le32 filter_match;
/* DW9 */ /* DW9 */
__le32 gp2_on_air_rise;
/* DW10 */
__le32 rate_n_flags; __le32 rate_n_flags;
/* DW10 */
u8 energy_a, energy_b, channel, reserved;
/* DW11 */ /* DW11 */
u8 energy_a, energy_b, energy_c, channel; __le32 gp2_on_air_rise;
/* DW12 & DW13 */ /* DW12 & DW13 */
__le64 tsf_on_air_rise; __le64 tsf_on_air_rise;
} __packed; } __packed;
......
...@@ -201,25 +201,22 @@ static void iwl_mvm_get_signal_strength(struct iwl_mvm *mvm, ...@@ -201,25 +201,22 @@ static void iwl_mvm_get_signal_strength(struct iwl_mvm *mvm,
struct iwl_rx_mpdu_desc *desc, struct iwl_rx_mpdu_desc *desc,
struct ieee80211_rx_status *rx_status) struct ieee80211_rx_status *rx_status)
{ {
int energy_a, energy_b, energy_c, max_energy; int energy_a, energy_b, max_energy;
energy_a = desc->energy_a; energy_a = desc->energy_a;
energy_a = energy_a ? -energy_a : S8_MIN; energy_a = energy_a ? -energy_a : S8_MIN;
energy_b = desc->energy_b; energy_b = desc->energy_b;
energy_b = energy_b ? -energy_b : S8_MIN; energy_b = energy_b ? -energy_b : S8_MIN;
energy_c = desc->energy_c;
energy_c = energy_c ? -energy_c : S8_MIN;
max_energy = max(energy_a, energy_b); max_energy = max(energy_a, energy_b);
max_energy = max(max_energy, energy_c);
IWL_DEBUG_STATS(mvm, "energy In A %d B %d C %d , and max %d\n", IWL_DEBUG_STATS(mvm, "energy In A %d B %d, and max %d\n",
energy_a, energy_b, energy_c, max_energy); energy_a, energy_b, max_energy);
rx_status->signal = max_energy; rx_status->signal = max_energy;
rx_status->chains = 0; /* TODO: phy info */ rx_status->chains = 0; /* TODO: phy info */
rx_status->chain_signal[0] = energy_a; rx_status->chain_signal[0] = energy_a;
rx_status->chain_signal[1] = energy_b; rx_status->chain_signal[1] = energy_b;
rx_status->chain_signal[2] = energy_c; rx_status->chain_signal[2] = S8_MIN;
} }
static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr, static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr,
......
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