diff options
author | Maxim Levitsky <maximlevitsky@gmail.com> | 2008-08-01 05:54:27 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-08-01 15:31:36 -0400 |
commit | 56decd3c5758b0d776c073f65f777beb7a05ac0a (patch) | |
tree | 211a13d80fd4c62c68f900fc2cb064f2a87a9bcb | |
parent | 3d0f823953e6b5aa36fc098de2d27e15da220974 (diff) |
iwl3945: Fix statistics in monitor mode
iwl3945_rx_reply_rx was sending packets too early to
mac80211, before updating signal strength/quality.
This resulted in garbage power levels.
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index a51e0eaa1334..56a9361a847f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -710,10 +710,7 @@ static void iwl3945_rx_reply_rx(struct iwl3945_priv *priv, | |||
710 | return; | 710 | return; |
711 | } | 711 | } |
712 | 712 | ||
713 | if (priv->iw_mode == IEEE80211_IF_TYPE_MNTR) { | 713 | |
714 | iwl3945_pass_packet_to_mac80211(priv, rxb, &rx_status); | ||
715 | return; | ||
716 | } | ||
717 | 714 | ||
718 | /* Convert 3945's rssi indicator to dBm */ | 715 | /* Convert 3945's rssi indicator to dBm */ |
719 | rx_status.signal = rx_stats->rssi - IWL_RSSI_OFFSET; | 716 | rx_status.signal = rx_stats->rssi - IWL_RSSI_OFFSET; |
@@ -775,6 +772,11 @@ static void iwl3945_rx_reply_rx(struct iwl3945_priv *priv, | |||
775 | priv->last_rx_noise = rx_status.noise; | 772 | priv->last_rx_noise = rx_status.noise; |
776 | } | 773 | } |
777 | 774 | ||
775 | if (priv->iw_mode == IEEE80211_IF_TYPE_MNTR) { | ||
776 | iwl3945_pass_packet_to_mac80211(priv, rxb, &rx_status); | ||
777 | return; | ||
778 | } | ||
779 | |||
778 | switch (le16_to_cpu(header->frame_control) & IEEE80211_FCTL_FTYPE) { | 780 | switch (le16_to_cpu(header->frame_control) & IEEE80211_FCTL_FTYPE) { |
779 | case IEEE80211_FTYPE_MGMT: | 781 | case IEEE80211_FTYPE_MGMT: |
780 | switch (le16_to_cpu(header->frame_control) & | 782 | switch (le16_to_cpu(header->frame_control) & |