iwlagn: add bt prio_boost to .cfg
authorWey-Yi Guy <wey-yi.w.guy@intel.com>
Mon, 23 Aug 2010 14:57:09 +0000 (07:57 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 25 Aug 2010 18:34:20 +0000 (14:34 -0400)
Use .cfg to configure the default bt priority boost value;
the default bt priority boost is 0xf0

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-6000.c
drivers/net/wireless/iwlwifi/iwl-commands.h
drivers/net/wireless/iwlwifi/iwl-core.h

index 396d80c0ef3845b5b9b87f32023a0e9850e4f0e6..54b59dadf2a804f359f43824908cd0c9c400a4f9 100644 (file)
@@ -219,7 +219,6 @@ static const __le32 iwl6000g2b_concurrent_lookup[12] = {
 static void iwl6000g2b_send_bt_config(struct iwl_priv *priv)
 {
        struct iwl6000g2b_bt_cmd bt_cmd = {
-               .prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
                .max_kill = IWL6000G2B_BT_MAX_KILL_DEFAULT,
                .bt3_timer_t7_value = IWL6000G2B_BT3_T7_DEFAULT,
                .kill_ack_mask = IWL6000G2B_BT_KILL_ACK_MASK_DEFAULT,
@@ -232,6 +231,8 @@ static void iwl6000g2b_send_bt_config(struct iwl_priv *priv)
        BUILD_BUG_ON(sizeof(iwl6000g2b_def_3w_lookup) !=
                        sizeof(bt_cmd.bt3_lookup_table));
 
+       bt_cmd.prio_boost = priv->cfg->bt_prio_boost;
+
        /*
         * Configure BT coex mode to "no coexistence" when the
         * user disabled BT coexistence, we have no interface
@@ -488,6 +489,8 @@ static void iwl6000g2b_bt_coex_profile_notif(struct iwl_priv *priv,
                                       sizeof(sco_cmd), &sco_cmd, NULL);
        }
 
+       /* FIXME: based on notification, adjust the prio_boost */
+
        spin_lock_irqsave(&priv->lock, flags);
        priv->bt_ci_compliance = coex->bt_ci_compliance;
        spin_unlock_irqrestore(&priv->lock, flags);
@@ -833,6 +836,7 @@ struct iwl_cfg iwl6000g2b_2agn_cfg = {
        .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
        .advanced_bt_coexist = true,
        .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
+       .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
 };
 
 struct iwl_cfg iwl6000g2b_2abg_cfg = {
@@ -873,6 +877,7 @@ struct iwl_cfg iwl6000g2b_2abg_cfg = {
        .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
        .advanced_bt_coexist = true,
        .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
+       .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
 };
 
 struct iwl_cfg iwl6000g2b_2bgn_cfg = {
@@ -915,6 +920,7 @@ struct iwl_cfg iwl6000g2b_2bgn_cfg = {
        .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
        .advanced_bt_coexist = true,
        .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
+       .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
 };
 
 struct iwl_cfg iwl6000g2b_2bg_cfg = {
@@ -955,6 +961,7 @@ struct iwl_cfg iwl6000g2b_2bg_cfg = {
        .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
        .advanced_bt_coexist = true,
        .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
+       .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
 };
 
 struct iwl_cfg iwl6000g2b_bgn_cfg = {
@@ -997,6 +1004,7 @@ struct iwl_cfg iwl6000g2b_bgn_cfg = {
        .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
        .advanced_bt_coexist = true,
        .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
+       .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
 };
 
 struct iwl_cfg iwl6000g2b_bg_cfg = {
@@ -1037,6 +1045,7 @@ struct iwl_cfg iwl6000g2b_bg_cfg = {
        .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
        .advanced_bt_coexist = true,
        .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
+       .bt_prio_boost = IWL6000G2B_BT_PRIO_BOOST_DEFAULT,
 };
 
 /*
index b45882aa68fef42a31696676554dd59beec860b2..e742f994ff82a2c76506cdee4d774d47195b4733 100644 (file)
@@ -2409,7 +2409,7 @@ struct iwl_bt_cmd {
 
 #define IWL6000G2B_BT_PRIO_BOOST_MAX           0xFF
 #define IWL6000G2B_BT_PRIO_BOOST_MIN           0x00
-#define IWL6000G2B_BT_PRIO_BOOST_DEFAULT       0x00
+#define IWL6000G2B_BT_PRIO_BOOST_DEFAULT       0xF0
 
 #define IWL6000G2B_BT_MAX_KILL_DEFAULT         5
 
index d5dacaf0d09f70addc69d9b063700f2bad43f00f..de2e39f36c250d4cfd56ce546d671645d51f3fc7 100644 (file)
@@ -280,6 +280,7 @@ struct iwl_mod_params {
  * @scan_antennas: available antenna for scan operation
  * @advanced_bt_coexist: support advanced bt coexist
  * @bt_init_traffic_load: specify initial bt traffic load
+ * @bt_prio_boost: default bt priority boost value
  * @need_dc_calib: need to perform init dc calibration
  * @bt_statistics: use BT version of statistics notification
  * @agg_time_limit: maximum number of uSec in aggregation
@@ -355,6 +356,7 @@ struct iwl_cfg {
        u8 scan_tx_antennas[IEEE80211_NUM_BANDS];
        bool advanced_bt_coexist;
        u8 bt_init_traffic_load;
+       u8 bt_prio_boost;
        const bool need_dc_calib;
        const bool bt_statistics;
        u16 agg_time_limit;