forked from Minki/linux
Merge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6
This commit is contained in:
commit
f54b92b927
@ -418,6 +418,7 @@ static struct iwl_bt_params iwl2030_bt_params = {
|
||||
.bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE,
|
||||
.bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT,
|
||||
.bt_sco_disable = true,
|
||||
.bt_session_2 = true,
|
||||
};
|
||||
|
||||
#define IWL_DEVICE_2000 \
|
||||
|
@ -1804,26 +1804,39 @@ static const __le32 iwlagn_concurrent_lookup[12] = {
|
||||
|
||||
void iwlagn_send_advance_bt_config(struct iwl_priv *priv)
|
||||
{
|
||||
struct iwlagn_bt_cmd bt_cmd = {
|
||||
struct iwl_basic_bt_cmd basic = {
|
||||
.max_kill = IWLAGN_BT_MAX_KILL_DEFAULT,
|
||||
.bt3_timer_t7_value = IWLAGN_BT3_T7_DEFAULT,
|
||||
.bt3_prio_sample_time = IWLAGN_BT3_PRIO_SAMPLE_DEFAULT,
|
||||
.bt3_timer_t2_value = IWLAGN_BT3_T2_DEFAULT,
|
||||
};
|
||||
struct iwl6000_bt_cmd bt_cmd_6000;
|
||||
struct iwl2000_bt_cmd bt_cmd_2000;
|
||||
int ret;
|
||||
|
||||
BUILD_BUG_ON(sizeof(iwlagn_def_3w_lookup) !=
|
||||
sizeof(bt_cmd.bt3_lookup_table));
|
||||
sizeof(basic.bt3_lookup_table));
|
||||
|
||||
if (priv->cfg->bt_params)
|
||||
bt_cmd.prio_boost = priv->cfg->bt_params->bt_prio_boost;
|
||||
else
|
||||
bt_cmd.prio_boost = 0;
|
||||
bt_cmd.kill_ack_mask = priv->kill_ack_mask;
|
||||
bt_cmd.kill_cts_mask = priv->kill_cts_mask;
|
||||
if (priv->cfg->bt_params) {
|
||||
if (priv->cfg->bt_params->bt_session_2) {
|
||||
bt_cmd_2000.prio_boost = cpu_to_le32(
|
||||
priv->cfg->bt_params->bt_prio_boost);
|
||||
bt_cmd_2000.tx_prio_boost = 0;
|
||||
bt_cmd_2000.rx_prio_boost = 0;
|
||||
} else {
|
||||
bt_cmd_6000.prio_boost =
|
||||
priv->cfg->bt_params->bt_prio_boost;
|
||||
bt_cmd_6000.tx_prio_boost = 0;
|
||||
bt_cmd_6000.rx_prio_boost = 0;
|
||||
}
|
||||
} else {
|
||||
IWL_ERR(priv, "failed to construct BT Coex Config\n");
|
||||
return;
|
||||
}
|
||||
|
||||
bt_cmd.valid = priv->bt_valid;
|
||||
bt_cmd.tx_prio_boost = 0;
|
||||
bt_cmd.rx_prio_boost = 0;
|
||||
basic.kill_ack_mask = priv->kill_ack_mask;
|
||||
basic.kill_cts_mask = priv->kill_cts_mask;
|
||||
basic.valid = priv->bt_valid;
|
||||
|
||||
/*
|
||||
* Configure BT coex mode to "no coexistence" when the
|
||||
@ -1832,32 +1845,43 @@ void iwlagn_send_advance_bt_config(struct iwl_priv *priv)
|
||||
* IBSS mode (no proper uCode support for coex then).
|
||||
*/
|
||||
if (!bt_coex_active || priv->iw_mode == NL80211_IFTYPE_ADHOC) {
|
||||
bt_cmd.flags = IWLAGN_BT_FLAG_COEX_MODE_DISABLED;
|
||||
basic.flags = IWLAGN_BT_FLAG_COEX_MODE_DISABLED;
|
||||
} else {
|
||||
bt_cmd.flags = IWLAGN_BT_FLAG_COEX_MODE_3W <<
|
||||
basic.flags = IWLAGN_BT_FLAG_COEX_MODE_3W <<
|
||||
IWLAGN_BT_FLAG_COEX_MODE_SHIFT;
|
||||
if (priv->cfg->bt_params &&
|
||||
priv->cfg->bt_params->bt_sco_disable)
|
||||
bt_cmd.flags |= IWLAGN_BT_FLAG_SYNC_2_BT_DISABLE;
|
||||
basic.flags |= IWLAGN_BT_FLAG_SYNC_2_BT_DISABLE;
|
||||
|
||||
if (priv->bt_ch_announce)
|
||||
bt_cmd.flags |= IWLAGN_BT_FLAG_CHANNEL_INHIBITION;
|
||||
IWL_DEBUG_INFO(priv, "BT coex flag: 0X%x\n", bt_cmd.flags);
|
||||
basic.flags |= IWLAGN_BT_FLAG_CHANNEL_INHIBITION;
|
||||
IWL_DEBUG_INFO(priv, "BT coex flag: 0X%x\n", basic.flags);
|
||||
}
|
||||
priv->bt_enable_flag = bt_cmd.flags;
|
||||
priv->bt_enable_flag = basic.flags;
|
||||
if (priv->bt_full_concurrent)
|
||||
memcpy(bt_cmd.bt3_lookup_table, iwlagn_concurrent_lookup,
|
||||
memcpy(basic.bt3_lookup_table, iwlagn_concurrent_lookup,
|
||||
sizeof(iwlagn_concurrent_lookup));
|
||||
else
|
||||
memcpy(bt_cmd.bt3_lookup_table, iwlagn_def_3w_lookup,
|
||||
memcpy(basic.bt3_lookup_table, iwlagn_def_3w_lookup,
|
||||
sizeof(iwlagn_def_3w_lookup));
|
||||
|
||||
IWL_DEBUG_INFO(priv, "BT coex %s in %s mode\n",
|
||||
bt_cmd.flags ? "active" : "disabled",
|
||||
basic.flags ? "active" : "disabled",
|
||||
priv->bt_full_concurrent ?
|
||||
"full concurrency" : "3-wire");
|
||||
|
||||
if (iwl_send_cmd_pdu(priv, REPLY_BT_CONFIG, sizeof(bt_cmd), &bt_cmd))
|
||||
if (priv->cfg->bt_params->bt_session_2) {
|
||||
memcpy(&bt_cmd_2000.basic, &basic,
|
||||
sizeof(basic));
|
||||
ret = iwl_send_cmd_pdu(priv, REPLY_BT_CONFIG,
|
||||
sizeof(bt_cmd_2000), &bt_cmd_2000);
|
||||
} else {
|
||||
memcpy(&bt_cmd_6000.basic, &basic,
|
||||
sizeof(basic));
|
||||
ret = iwl_send_cmd_pdu(priv, REPLY_BT_CONFIG,
|
||||
sizeof(bt_cmd_6000), &bt_cmd_6000);
|
||||
}
|
||||
if (ret)
|
||||
IWL_ERR(priv, "failed to send BT Coex Config\n");
|
||||
|
||||
}
|
||||
@ -1984,12 +2008,14 @@ static void iwlagn_print_uartmsg(struct iwl_priv *priv,
|
||||
(BT_UART_MSG_FRAME6DISCOVERABLE_MSK & uart_msg->frame6) >>
|
||||
BT_UART_MSG_FRAME6DISCOVERABLE_POS);
|
||||
|
||||
IWL_DEBUG_NOTIF(priv, "Sniff Activity = 0x%X, Inquiry/Page SR Mode = "
|
||||
"0x%X, Connectable = 0x%X",
|
||||
IWL_DEBUG_NOTIF(priv, "Sniff Activity = 0x%X, Page = "
|
||||
"0x%X, Inquiry = 0x%X, Connectable = 0x%X",
|
||||
(BT_UART_MSG_FRAME7SNIFFACTIVITY_MSK & uart_msg->frame7) >>
|
||||
BT_UART_MSG_FRAME7SNIFFACTIVITY_POS,
|
||||
(BT_UART_MSG_FRAME7INQUIRYPAGESRMODE_MSK & uart_msg->frame7) >>
|
||||
BT_UART_MSG_FRAME7INQUIRYPAGESRMODE_POS,
|
||||
(BT_UART_MSG_FRAME7PAGE_MSK & uart_msg->frame7) >>
|
||||
BT_UART_MSG_FRAME7PAGE_POS,
|
||||
(BT_UART_MSG_FRAME7INQUIRY_MSK & uart_msg->frame7) >>
|
||||
BT_UART_MSG_FRAME7INQUIRY_POS,
|
||||
(BT_UART_MSG_FRAME7CONNECTABLE_MSK & uart_msg->frame7) >>
|
||||
BT_UART_MSG_FRAME7CONNECTABLE_POS);
|
||||
}
|
||||
|
@ -2477,7 +2477,7 @@ struct iwl_bt_cmd {
|
||||
IWLAGN_BT_VALID_BT4_TIMES | \
|
||||
IWLAGN_BT_VALID_3W_LUT)
|
||||
|
||||
struct iwlagn_bt_cmd {
|
||||
struct iwl_basic_bt_cmd {
|
||||
u8 flags;
|
||||
u8 ledtime; /* unused */
|
||||
u8 max_kill;
|
||||
@ -2490,6 +2490,10 @@ struct iwlagn_bt_cmd {
|
||||
__le32 bt3_lookup_table[12];
|
||||
__le16 bt4_decision_time; /* unused */
|
||||
__le16 valid;
|
||||
};
|
||||
|
||||
struct iwl6000_bt_cmd {
|
||||
struct iwl_basic_bt_cmd basic;
|
||||
u8 prio_boost;
|
||||
/*
|
||||
* set IWLAGN_BT_VALID_BOOST to "1" in "valid" bitmask
|
||||
@ -2499,6 +2503,18 @@ struct iwlagn_bt_cmd {
|
||||
__le16 rx_prio_boost; /* SW boost of WiFi rx priority */
|
||||
};
|
||||
|
||||
struct iwl2000_bt_cmd {
|
||||
struct iwl_basic_bt_cmd basic;
|
||||
__le32 prio_boost;
|
||||
/*
|
||||
* set IWLAGN_BT_VALID_BOOST to "1" in "valid" bitmask
|
||||
* if configure the following patterns
|
||||
*/
|
||||
u8 reserved;
|
||||
u8 tx_prio_boost; /* SW boost of WiFi tx priority */
|
||||
__le16 rx_prio_boost; /* SW boost of WiFi rx priority */
|
||||
};
|
||||
|
||||
#define IWLAGN_BT_SCO_ACTIVE cpu_to_le32(BIT(0))
|
||||
|
||||
struct iwlagn_bt_sco_cmd {
|
||||
@ -4150,6 +4166,10 @@ enum iwl_bt_coex_profile_traffic_load {
|
||||
*/
|
||||
};
|
||||
|
||||
#define BT_SESSION_ACTIVITY_1_UART_MSG 0x1
|
||||
#define BT_SESSION_ACTIVITY_2_UART_MSG 0x2
|
||||
|
||||
/* BT UART message - Share Part (BT -> WiFi) */
|
||||
#define BT_UART_MSG_FRAME1MSGTYPE_POS (0)
|
||||
#define BT_UART_MSG_FRAME1MSGTYPE_MSK \
|
||||
(0x7 << BT_UART_MSG_FRAME1MSGTYPE_POS)
|
||||
@ -4234,9 +4254,12 @@ enum iwl_bt_coex_profile_traffic_load {
|
||||
#define BT_UART_MSG_FRAME7SNIFFACTIVITY_POS (0)
|
||||
#define BT_UART_MSG_FRAME7SNIFFACTIVITY_MSK \
|
||||
(0x7 << BT_UART_MSG_FRAME7SNIFFACTIVITY_POS)
|
||||
#define BT_UART_MSG_FRAME7INQUIRYPAGESRMODE_POS (3)
|
||||
#define BT_UART_MSG_FRAME7INQUIRYPAGESRMODE_MSK \
|
||||
(0x3 << BT_UART_MSG_FRAME7INQUIRYPAGESRMODE_POS)
|
||||
#define BT_UART_MSG_FRAME7PAGE_POS (3)
|
||||
#define BT_UART_MSG_FRAME7PAGE_MSK \
|
||||
(0x1 << BT_UART_MSG_FRAME7PAGE_POS)
|
||||
#define BT_UART_MSG_FRAME7INQUIRY_POS (4)
|
||||
#define BT_UART_MSG_FRAME7INQUIRY_MSK \
|
||||
(0x1 << BT_UART_MSG_FRAME7INQUIRY_POS)
|
||||
#define BT_UART_MSG_FRAME7CONNECTABLE_POS (5)
|
||||
#define BT_UART_MSG_FRAME7CONNECTABLE_MSK \
|
||||
(0x1 << BT_UART_MSG_FRAME7CONNECTABLE_POS)
|
||||
@ -4244,6 +4267,83 @@ enum iwl_bt_coex_profile_traffic_load {
|
||||
#define BT_UART_MSG_FRAME7RESERVED_MSK \
|
||||
(0x3 << BT_UART_MSG_FRAME7RESERVED_POS)
|
||||
|
||||
/* BT Session Activity 2 UART message (BT -> WiFi) */
|
||||
#define BT_UART_MSG_2_FRAME1RESERVED1_POS (5)
|
||||
#define BT_UART_MSG_2_FRAME1RESERVED1_MSK \
|
||||
(0x1<<BT_UART_MSG_2_FRAME1RESERVED1_POS)
|
||||
#define BT_UART_MSG_2_FRAME1RESERVED2_POS (6)
|
||||
#define BT_UART_MSG_2_FRAME1RESERVED2_MSK \
|
||||
(0x3<<BT_UART_MSG_2_FRAME1RESERVED2_POS)
|
||||
|
||||
#define BT_UART_MSG_2_FRAME2AGGTRAFFICLOAD_POS (0)
|
||||
#define BT_UART_MSG_2_FRAME2AGGTRAFFICLOAD_MSK \
|
||||
(0x3F<<BT_UART_MSG_2_FRAME2AGGTRAFFICLOAD_POS)
|
||||
#define BT_UART_MSG_2_FRAME2RESERVED_POS (6)
|
||||
#define BT_UART_MSG_2_FRAME2RESERVED_MSK \
|
||||
(0x3<<BT_UART_MSG_2_FRAME2RESERVED_POS)
|
||||
|
||||
#define BT_UART_MSG_2_FRAME3BRLASTTXPOWER_POS (0)
|
||||
#define BT_UART_MSG_2_FRAME3BRLASTTXPOWER_MSK \
|
||||
(0xF<<BT_UART_MSG_2_FRAME3BRLASTTXPOWER_POS)
|
||||
#define BT_UART_MSG_2_FRAME3INQPAGESRMODE_POS (4)
|
||||
#define BT_UART_MSG_2_FRAME3INQPAGESRMODE_MSK \
|
||||
(0x1<<BT_UART_MSG_2_FRAME3INQPAGESRMODE_POS)
|
||||
#define BT_UART_MSG_2_FRAME3LEMASTER_POS (5)
|
||||
#define BT_UART_MSG_2_FRAME3LEMASTER_MSK \
|
||||
(0x1<<BT_UART_MSG_2_FRAME3LEMASTER_POS)
|
||||
#define BT_UART_MSG_2_FRAME3RESERVED_POS (6)
|
||||
#define BT_UART_MSG_2_FRAME3RESERVED_MSK \
|
||||
(0x3<<BT_UART_MSG_2_FRAME3RESERVED_POS)
|
||||
|
||||
#define BT_UART_MSG_2_FRAME4LELASTTXPOWER_POS (0)
|
||||
#define BT_UART_MSG_2_FRAME4LELASTTXPOWER_MSK \
|
||||
(0xF<<BT_UART_MSG_2_FRAME4LELASTTXPOWER_POS)
|
||||
#define BT_UART_MSG_2_FRAME4NUMLECONN_POS (4)
|
||||
#define BT_UART_MSG_2_FRAME4NUMLECONN_MSK \
|
||||
(0x3<<BT_UART_MSG_2_FRAME4NUMLECONN_POS)
|
||||
#define BT_UART_MSG_2_FRAME4RESERVED_POS (6)
|
||||
#define BT_UART_MSG_2_FRAME4RESERVED_MSK \
|
||||
(0x3<<BT_UART_MSG_2_FRAME4RESERVED_POS)
|
||||
|
||||
#define BT_UART_MSG_2_FRAME5BTMINRSSI_POS (0)
|
||||
#define BT_UART_MSG_2_FRAME5BTMINRSSI_MSK \
|
||||
(0xF<<BT_UART_MSG_2_FRAME5BTMINRSSI_POS)
|
||||
#define BT_UART_MSG_2_FRAME5LESCANINITMODE_POS (4)
|
||||
#define BT_UART_MSG_2_FRAME5LESCANINITMODE_MSK \
|
||||
(0x1<<BT_UART_MSG_2_FRAME5LESCANINITMODE_POS)
|
||||
#define BT_UART_MSG_2_FRAME5LEADVERMODE_POS (5)
|
||||
#define BT_UART_MSG_2_FRAME5LEADVERMODE_MSK \
|
||||
(0x1<<BT_UART_MSG_2_FRAME5LEADVERMODE_POS)
|
||||
#define BT_UART_MSG_2_FRAME5RESERVED_POS (6)
|
||||
#define BT_UART_MSG_2_FRAME5RESERVED_MSK \
|
||||
(0x3<<BT_UART_MSG_2_FRAME5RESERVED_POS)
|
||||
|
||||
#define BT_UART_MSG_2_FRAME6LECONNINTERVAL_POS (0)
|
||||
#define BT_UART_MSG_2_FRAME6LECONNINTERVAL_MSK \
|
||||
(0x1F<<BT_UART_MSG_2_FRAME6LECONNINTERVAL_POS)
|
||||
#define BT_UART_MSG_2_FRAME6RFU_POS (5)
|
||||
#define BT_UART_MSG_2_FRAME6RFU_MSK \
|
||||
(0x1<<BT_UART_MSG_2_FRAME6RFU_POS)
|
||||
#define BT_UART_MSG_2_FRAME6RESERVED_POS (6)
|
||||
#define BT_UART_MSG_2_FRAME6RESERVED_MSK \
|
||||
(0x3<<BT_UART_MSG_2_FRAME6RESERVED_POS)
|
||||
|
||||
#define BT_UART_MSG_2_FRAME7LECONNSLAVELAT_POS (0)
|
||||
#define BT_UART_MSG_2_FRAME7LECONNSLAVELAT_MSK \
|
||||
(0x7<<BT_UART_MSG_2_FRAME7LECONNSLAVELAT_POS)
|
||||
#define BT_UART_MSG_2_FRAME7LEPROFILE1_POS (3)
|
||||
#define BT_UART_MSG_2_FRAME7LEPROFILE1_MSK \
|
||||
(0x1<<BT_UART_MSG_2_FRAME7LEPROFILE1_POS)
|
||||
#define BT_UART_MSG_2_FRAME7LEPROFILE2_POS (4)
|
||||
#define BT_UART_MSG_2_FRAME7LEPROFILE2_MSK \
|
||||
(0x1<<BT_UART_MSG_2_FRAME7LEPROFILE2_POS)
|
||||
#define BT_UART_MSG_2_FRAME7LEPROFILEOTHER_POS (5)
|
||||
#define BT_UART_MSG_2_FRAME7LEPROFILEOTHER_MSK \
|
||||
(0x1<<BT_UART_MSG_2_FRAME7LEPROFILEOTHER_POS)
|
||||
#define BT_UART_MSG_2_FRAME7RESERVED_POS (6)
|
||||
#define BT_UART_MSG_2_FRAME7RESERVED_MSK \
|
||||
(0x3<<BT_UART_MSG_2_FRAME7RESERVED_POS)
|
||||
|
||||
|
||||
struct iwl_bt_uart_msg {
|
||||
u8 header;
|
||||
|
@ -339,6 +339,7 @@ struct iwl_bt_params {
|
||||
u8 ampdu_factor;
|
||||
u8 ampdu_density;
|
||||
bool bt_sco_disable;
|
||||
bool bt_session_2;
|
||||
};
|
||||
/*
|
||||
* @use_rts_for_aggregation: use rts/cts protection for HT traffic
|
||||
|
Loading…
Reference in New Issue
Block a user