diff options
author | Zhu Yi <yi.zhu@intel.com> | 2006-01-24 03:36:59 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2006-01-30 20:35:33 -0500 |
commit | 810dabd466fe70869b66ab64dd326b6153cef645 (patch) | |
tree | ca919a3a3b819b6bb46cc9d072b58f8b698b1070 | |
parent | 3e234b4e5768b4f783fc45f20be8c6515b875f17 (diff) |
[PATCH] ipw2200: Bluetooth coexistence support
I've added a new module param "bt_coexist" which defaults to OFF.
This does not seem to fix the firmware restarts, but it does do "the
right thing" and disables something that we were enabling by default:
signaling the Bluetooth h/w which channel we're on (whether or not the
BT h/w was out there).
Signed-off-by: Ben M Cahill <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ipw2200.c | 20 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2200.h | 35 |
2 files changed, 40 insertions, 15 deletions
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index 671631831226..e6a23c2be1af 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c | |||
@@ -55,6 +55,7 @@ static int associate = 1; | |||
55 | static int auto_create = 1; | 55 | static int auto_create = 1; |
56 | static int led = 0; | 56 | static int led = 0; |
57 | static int disable = 0; | 57 | static int disable = 0; |
58 | static int bt_coexist = 0; | ||
58 | static int hwcrypto = 1; | 59 | static int hwcrypto = 1; |
59 | static const char ipw_modes[] = { | 60 | static const char ipw_modes[] = { |
60 | 'a', 'b', 'g', '?' | 61 | 'a', 'b', 'g', '?' |
@@ -9656,7 +9657,7 @@ static struct iw_statistics *ipw_get_wireless_stats(struct net_device *dev) | |||
9656 | static void init_sys_config(struct ipw_sys_config *sys_config) | 9657 | static void init_sys_config(struct ipw_sys_config *sys_config) |
9657 | { | 9658 | { |
9658 | memset(sys_config, 0, sizeof(struct ipw_sys_config)); | 9659 | memset(sys_config, 0, sizeof(struct ipw_sys_config)); |
9659 | sys_config->bt_coexistence = 1; /* We may need to look into prvStaBtConfig */ | 9660 | sys_config->bt_coexistence = 0; |
9660 | sys_config->answer_broadcast_ssid_probe = 0; | 9661 | sys_config->answer_broadcast_ssid_probe = 0; |
9661 | sys_config->accept_all_data_frames = 0; | 9662 | sys_config->accept_all_data_frames = 0; |
9662 | sys_config->accept_non_directed_frames = 1; | 9663 | sys_config->accept_non_directed_frames = 1; |
@@ -10362,6 +10363,20 @@ static int ipw_config(struct ipw_priv *priv) | |||
10362 | 10363 | ||
10363 | /* set basic system config settings */ | 10364 | /* set basic system config settings */ |
10364 | init_sys_config(&priv->sys_config); | 10365 | init_sys_config(&priv->sys_config); |
10366 | |||
10367 | /* Support Bluetooth if we have BT h/w on board, and user wants to. | ||
10368 | * Does not support BT priority yet (don't abort or defer our Tx) */ | ||
10369 | if (bt_coexist) { | ||
10370 | unsigned char bt_caps = priv->eeprom[EEPROM_SKU_CAPABILITY]; | ||
10371 | |||
10372 | if (bt_caps & EEPROM_SKU_CAP_BT_CHANNEL_SIG) | ||
10373 | priv->sys_config.bt_coexistence | ||
10374 | |= CFG_BT_COEXISTENCE_SIGNAL_CHNL; | ||
10375 | if (bt_caps & EEPROM_SKU_CAP_BT_OOB) | ||
10376 | priv->sys_config.bt_coexistence | ||
10377 | |= CFG_BT_COEXISTENCE_OOB; | ||
10378 | } | ||
10379 | |||
10365 | if (priv->ieee->iw_mode == IW_MODE_ADHOC) | 10380 | if (priv->ieee->iw_mode == IW_MODE_ADHOC) |
10366 | priv->sys_config.answer_broadcast_ssid_probe = 1; | 10381 | priv->sys_config.answer_broadcast_ssid_probe = 1; |
10367 | else | 10382 | else |
@@ -11351,6 +11366,9 @@ module_param(mode, int, 0444); | |||
11351 | MODULE_PARM_DESC(mode, "network mode (0=BSS,1=IBSS)"); | 11366 | MODULE_PARM_DESC(mode, "network mode (0=BSS,1=IBSS)"); |
11352 | #endif | 11367 | #endif |
11353 | 11368 | ||
11369 | module_param(bt_coexist, int, 0444); | ||
11370 | MODULE_PARM_DESC(bt_coexist, "enable bluetooth coexistence (default off)"); | ||
11371 | |||
11354 | module_param(hwcrypto, int, 0444); | 11372 | module_param(hwcrypto, int, 0444); |
11355 | MODULE_PARM_DESC(hwcrypto, "enable hardware crypto (default on)"); | 11373 | MODULE_PARM_DESC(hwcrypto, "enable hardware crypto (default on)"); |
11356 | 11374 | ||
diff --git a/drivers/net/wireless/ipw2200.h b/drivers/net/wireless/ipw2200.h index 5f32834745b5..d6d7d9db0462 100644 --- a/drivers/net/wireless/ipw2200.h +++ b/drivers/net/wireless/ipw2200.h | |||
@@ -1566,13 +1566,18 @@ do { if (ipw_debug_level & (level)) \ | |||
1566 | #define EEPROM_BSS_CHANNELS_BG (GET_EEPROM_ADDR(0x2c,LSB)) /* 2 bytes */ | 1566 | #define EEPROM_BSS_CHANNELS_BG (GET_EEPROM_ADDR(0x2c,LSB)) /* 2 bytes */ |
1567 | #define EEPROM_HW_VERSION (GET_EEPROM_ADDR(0x72,LSB)) /* 2 bytes */ | 1567 | #define EEPROM_HW_VERSION (GET_EEPROM_ADDR(0x72,LSB)) /* 2 bytes */ |
1568 | 1568 | ||
1569 | /* NIC type as found in the one byte EEPROM_NIC_TYPE offset*/ | 1569 | /* NIC type as found in the one byte EEPROM_NIC_TYPE offset */ |
1570 | #define EEPROM_NIC_TYPE_0 0 | 1570 | #define EEPROM_NIC_TYPE_0 0 |
1571 | #define EEPROM_NIC_TYPE_1 1 | 1571 | #define EEPROM_NIC_TYPE_1 1 |
1572 | #define EEPROM_NIC_TYPE_2 2 | 1572 | #define EEPROM_NIC_TYPE_2 2 |
1573 | #define EEPROM_NIC_TYPE_3 3 | 1573 | #define EEPROM_NIC_TYPE_3 3 |
1574 | #define EEPROM_NIC_TYPE_4 4 | 1574 | #define EEPROM_NIC_TYPE_4 4 |
1575 | 1575 | ||
1576 | /* Bluetooth Coexistence capabilities as found in EEPROM_SKU_CAPABILITY */ | ||
1577 | #define EEPROM_SKU_CAP_BT_CHANNEL_SIG 0x01 /* we can tell BT our channel # */ | ||
1578 | #define EEPROM_SKU_CAP_BT_PRIORITY 0x02 /* BT can take priority over us */ | ||
1579 | #define EEPROM_SKU_CAP_BT_OOB 0x04 /* we can signal BT out-of-band */ | ||
1580 | |||
1576 | #define FW_MEM_REG_LOWER_BOUND 0x00300000 | 1581 | #define FW_MEM_REG_LOWER_BOUND 0x00300000 |
1577 | #define FW_MEM_REG_EEPROM_ACCESS (FW_MEM_REG_LOWER_BOUND + 0x40) | 1582 | #define FW_MEM_REG_EEPROM_ACCESS (FW_MEM_REG_LOWER_BOUND + 0x40) |
1578 | #define IPW_EVENT_REG (FW_MEM_REG_LOWER_BOUND + 0x04) | 1583 | #define IPW_EVENT_REG (FW_MEM_REG_LOWER_BOUND + 0x04) |
@@ -1869,21 +1874,23 @@ struct ipw_cmd_log { | |||
1869 | struct host_cmd cmd; | 1874 | struct host_cmd cmd; |
1870 | }; | 1875 | }; |
1871 | 1876 | ||
1872 | #define CFG_BT_COEXISTENCE_MIN 0x00 | 1877 | /* SysConfig command parameters ... */ |
1873 | #define CFG_BT_COEXISTENCE_DEFER 0x02 | 1878 | /* bt_coexistence param */ |
1874 | #define CFG_BT_COEXISTENCE_KILL 0x04 | 1879 | #define CFG_BT_COEXISTENCE_SIGNAL_CHNL 0x01 /* tell BT our chnl # */ |
1875 | #define CFG_BT_COEXISTENCE_WME_OVER_BT 0x08 | 1880 | #define CFG_BT_COEXISTENCE_DEFER 0x02 /* defer our Tx if BT traffic */ |
1876 | #define CFG_BT_COEXISTENCE_OOB 0x10 | 1881 | #define CFG_BT_COEXISTENCE_KILL 0x04 /* kill our Tx if BT traffic */ |
1877 | #define CFG_BT_COEXISTENCE_MAX 0xFF | 1882 | #define CFG_BT_COEXISTENCE_WME_OVER_BT 0x08 /* multimedia extensions */ |
1878 | #define CFG_BT_COEXISTENCE_DEF 0x80 /* read Bt from EEPROM */ | 1883 | #define CFG_BT_COEXISTENCE_OOB 0x10 /* signal BT via out-of-band */ |
1879 | 1884 | ||
1880 | #define CFG_CTS_TO_ITSELF_ENABLED_MIN 0x0 | 1885 | /* clear-to-send to self param */ |
1881 | #define CFG_CTS_TO_ITSELF_ENABLED_MAX 0x1 | 1886 | #define CFG_CTS_TO_ITSELF_ENABLED_MIN 0x00 |
1887 | #define CFG_CTS_TO_ITSELF_ENABLED_MAX 0x01 | ||
1882 | #define CFG_CTS_TO_ITSELF_ENABLED_DEF CFG_CTS_TO_ITSELF_ENABLED_MIN | 1888 | #define CFG_CTS_TO_ITSELF_ENABLED_DEF CFG_CTS_TO_ITSELF_ENABLED_MIN |
1883 | 1889 | ||
1884 | #define CFG_SYS_ANTENNA_BOTH 0x000 | 1890 | /* Antenna diversity param (h/w can select best antenna, based on signal) */ |
1885 | #define CFG_SYS_ANTENNA_A 0x001 | 1891 | #define CFG_SYS_ANTENNA_BOTH 0x00 /* NIC selects best antenna */ |
1886 | #define CFG_SYS_ANTENNA_B 0x003 | 1892 | #define CFG_SYS_ANTENNA_A 0x01 /* force antenna A */ |
1893 | #define CFG_SYS_ANTENNA_B 0x03 /* force antenna B */ | ||
1887 | 1894 | ||
1888 | /* | 1895 | /* |
1889 | * The definitions below were lifted off the ipw2100 driver, which only | 1896 | * The definitions below were lifted off the ipw2100 driver, which only |