iwlwifi: fix ack health for WiFi/BT combo devices
authorStanislaw Gruszka <sgruszka@redhat.com>
Tue, 8 Feb 2011 08:31:58 +0000 (09:31 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 9 Feb 2011 21:09:50 +0000 (16:09 -0500)
Combo devices have TX statistics on different place, because
struct statistics_rx_bt and struct statistics_rx have different
size. User proper values on combo devices instead of random data.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-agn.c

index 50be23b..a3af656 100644 (file)
@@ -1419,8 +1419,13 @@ bool iwl_good_ack_health(struct iwl_priv *priv, struct iwl_rx_packet *pkt)
        if (priv->_agn.agg_tids_count)
                return true;
 
-       cur = &pkt->u.stats.tx;
-       old = &priv->_agn.statistics.tx;
+       if (iwl_bt_statistics(priv)) {
+               cur = &pkt->u.stats_bt.tx;
+               old = &priv->_agn.statistics_bt.tx;
+       } else {
+               cur = &pkt->u.stats.tx;
+               old = &priv->_agn.statistics.tx;
+       }
 
        actual_delta = le32_to_cpu(cur->actual_ack_cnt) -
                       le32_to_cpu(old->actual_ack_cnt);