ath9k_hw: initialize MCI parameters
authorMohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Wed, 30 Nov 2011 05:11:16 +0000 (10:41 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 30 Nov 2011 20:08:42 +0000 (15:08 -0500)
these parameter will be utilized and modified in the MCI hardware codes
state machine

Cc: Wilson Tsao <wtsao@qca.qualcomm.com>
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/init.c

index e046de94836a2d6c83ccf2338d1e3d5d78ab9fd7..34b922bbe65dd9a30a7d15d033f55411296f6e33 100644 (file)
@@ -408,6 +408,7 @@ fail:
 static int ath9k_init_btcoex(struct ath_softc *sc)
 {
        struct ath_txq *txq;
+       struct ath_hw *ah = sc->sc_ah;
        int r;
 
        switch (sc->sc_ah->btcoex_hw.scheme) {
@@ -426,6 +427,27 @@ static int ath9k_init_btcoex(struct ath_softc *sc)
                sc->btcoex.bt_stomp_type = ATH_BTCOEX_STOMP_LOW;
                sc->btcoex.duty_cycle = ATH_BTCOEX_DEF_DUTY_CYCLE;
                INIT_LIST_HEAD(&sc->btcoex.mci.info);
+               if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_MCI) {
+                       ah->btcoex_hw.mci.ready = false;
+                       ah->btcoex_hw.mci.bt_state = 0;
+                       ah->btcoex_hw.mci.bt_ver_major = 3;
+                       ah->btcoex_hw.mci.bt_ver_minor = 0;
+                       ah->btcoex_hw.mci.bt_version_known = false;
+                       ah->btcoex_hw.mci.update_2g5g = true;
+                       ah->btcoex_hw.mci.is_2g = true;
+                       ah->btcoex_hw.mci.wlan_channels_update = false;
+                       ah->btcoex_hw.mci.wlan_channels[0] = 0x00000000;
+                       ah->btcoex_hw.mci.wlan_channels[1] = 0xffffffff;
+                       ah->btcoex_hw.mci.wlan_channels[2] = 0xffffffff;
+                       ah->btcoex_hw.mci.wlan_channels[3] = 0x7fffffff;
+                       ah->btcoex_hw.mci.query_bt = true;
+                       ah->btcoex_hw.mci.unhalt_bt_gpm = true;
+                       ah->btcoex_hw.mci.halted_bt_gpm = false;
+                       ah->btcoex_hw.mci.need_flush_btinfo = false;
+                       ah->btcoex_hw.mci.wlan_cal_seq = 0;
+                       ah->btcoex_hw.mci.wlan_cal_done = 0;
+                       ah->btcoex_hw.mci.config = 0x2201;
+               }
                break;
        default:
                WARN_ON(1);