Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH 10/13] iwlwifi: update PCI Subsystem ID for 6000 series
From: Reinette Chatre @ 2009-09-17 17:43 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Wey-Yi Guy, Reinette Chatre
In-Reply-To: <1253209436-2309-1-git-send-email-reinette.chatre@intel.com>

From: Wey-Yi Guy <wey-yi.w.guy@intel.com>

Update PCI Subsystem ID for 60x0 series based on HW SKU. Adding new SKU
for "ABG" and "BG" only devices.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-6000.c |  105 +++++++++++++++++++++++++++++++
 drivers/net/wireless/iwlwifi/iwl-agn.c  |   43 +++++++++---
 drivers/net/wireless/iwlwifi/iwl-dev.h  |    5 ++
 3 files changed, 142 insertions(+), 11 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index 92faac0..73ca012 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -260,6 +260,48 @@ struct iwl_cfg iwl6000h_2agn_cfg = {
 	.use_rts_for_ht = true, /* use rts/cts protection */
 };
 
+struct iwl_cfg iwl6000h_2abg_cfg = {
+	.name = "6000 Series 2x2 ABG",
+	.fw_name_pre = IWL6000_FW_PRE,
+	.ucode_api_max = IWL6000_UCODE_API_MAX,
+	.ucode_api_min = IWL6000_UCODE_API_MIN,
+	.sku = IWL_SKU_A|IWL_SKU_G,
+	.ops = &iwl6000_ops,
+	.eeprom_size = OTP_LOW_IMAGE_SIZE,
+	.eeprom_ver = EEPROM_6000_EEPROM_VERSION,
+	.eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
+	.mod_params = &iwl50_mod_params,
+	.valid_tx_ant = ANT_AB,
+	.valid_rx_ant = ANT_AB,
+	.need_pll_cfg = false,
+	.pa_type = IWL_PA_HYBRID,
+	.max_ll_items = OTP_MAX_LL_ITEMS_6x00,
+	.shadow_ram_support = true,
+	.ht_greenfield_support = true,
+	.led_compensation = 51,
+};
+
+struct iwl_cfg iwl6000h_2bg_cfg = {
+	.name = "6000 Series 2x2 BG",
+	.fw_name_pre = IWL6000_FW_PRE,
+	.ucode_api_max = IWL6000_UCODE_API_MAX,
+	.ucode_api_min = IWL6000_UCODE_API_MIN,
+	.sku = IWL_SKU_G,
+	.ops = &iwl6000_ops,
+	.eeprom_size = OTP_LOW_IMAGE_SIZE,
+	.eeprom_ver = EEPROM_6000_EEPROM_VERSION,
+	.eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
+	.mod_params = &iwl50_mod_params,
+	.valid_tx_ant = ANT_AB,
+	.valid_rx_ant = ANT_AB,
+	.need_pll_cfg = false,
+	.pa_type = IWL_PA_HYBRID,
+	.max_ll_items = OTP_MAX_LL_ITEMS_6x00,
+	.shadow_ram_support = true,
+	.ht_greenfield_support = true,
+	.led_compensation = 51,
+};
+
 /*
  * "i": Internal configuration, use internal Power Amplifier
  */
@@ -285,6 +327,48 @@ struct iwl_cfg iwl6000i_2agn_cfg = {
 	.use_rts_for_ht = true, /* use rts/cts protection */
 };
 
+struct iwl_cfg iwl6000i_2abg_cfg = {
+	.name = "6000 Series 2x2 ABG",
+	.fw_name_pre = IWL6000_FW_PRE,
+	.ucode_api_max = IWL6000_UCODE_API_MAX,
+	.ucode_api_min = IWL6000_UCODE_API_MIN,
+	.sku = IWL_SKU_A|IWL_SKU_G,
+	.ops = &iwl6000_ops,
+	.eeprom_size = OTP_LOW_IMAGE_SIZE,
+	.eeprom_ver = EEPROM_6000_EEPROM_VERSION,
+	.eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
+	.mod_params = &iwl50_mod_params,
+	.valid_tx_ant = ANT_BC,
+	.valid_rx_ant = ANT_BC,
+	.need_pll_cfg = false,
+	.pa_type = IWL_PA_INTERNAL,
+	.max_ll_items = OTP_MAX_LL_ITEMS_6x00,
+	.shadow_ram_support = true,
+	.ht_greenfield_support = true,
+	.led_compensation = 51,
+};
+
+struct iwl_cfg iwl6000i_2bg_cfg = {
+	.name = "6000 Series 2x2 BG",
+	.fw_name_pre = IWL6000_FW_PRE,
+	.ucode_api_max = IWL6000_UCODE_API_MAX,
+	.ucode_api_min = IWL6000_UCODE_API_MIN,
+	.sku = IWL_SKU_G,
+	.ops = &iwl6000_ops,
+	.eeprom_size = OTP_LOW_IMAGE_SIZE,
+	.eeprom_ver = EEPROM_6000_EEPROM_VERSION,
+	.eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
+	.mod_params = &iwl50_mod_params,
+	.valid_tx_ant = ANT_BC,
+	.valid_rx_ant = ANT_BC,
+	.need_pll_cfg = false,
+	.pa_type = IWL_PA_INTERNAL,
+	.max_ll_items = OTP_MAX_LL_ITEMS_6x00,
+	.shadow_ram_support = true,
+	.ht_greenfield_support = true,
+	.led_compensation = 51,
+};
+
 struct iwl_cfg iwl6050_2agn_cfg = {
 	.name = "6050 Series 2x2 AGN",
 	.fw_name_pre = IWL6050_FW_PRE,
@@ -307,6 +391,27 @@ struct iwl_cfg iwl6050_2agn_cfg = {
 	.use_rts_for_ht = true, /* use rts/cts protection */
 };
 
+struct iwl_cfg iwl6050_2abg_cfg = {
+	.name = "6050 Series 2x2 ABG",
+	.fw_name_pre = IWL6050_FW_PRE,
+	.ucode_api_max = IWL6050_UCODE_API_MAX,
+	.ucode_api_min = IWL6050_UCODE_API_MIN,
+	.sku = IWL_SKU_A|IWL_SKU_G,
+	.ops = &iwl6000_ops,
+	.eeprom_size = OTP_LOW_IMAGE_SIZE,
+	.eeprom_ver = EEPROM_6000_EEPROM_VERSION,
+	.eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
+	.mod_params = &iwl50_mod_params,
+	.valid_tx_ant = ANT_AB,
+	.valid_rx_ant = ANT_AB,
+	.need_pll_cfg = false,
+	.pa_type = IWL_PA_SYSTEM,
+	.max_ll_items = OTP_MAX_LL_ITEMS_6x00,
+	.shadow_ram_support = true,
+	.ht_greenfield_support = true,
+	.led_compensation = 51,
+};
+
 struct iwl_cfg iwl6000_3agn_cfg = {
 	.name = "6000 Series 3x3 AGN",
 	.fw_name_pre = IWL6000_FW_PRE,
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index b29e44f..d39467f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3073,17 +3073,38 @@ static struct pci_device_id iwl_hw_card_ids[] = {
 /* 5150 Wifi/WiMax */
 	{IWL_PCI_DEVICE(0x423C, PCI_ANY_ID, iwl5150_agn_cfg)},
 	{IWL_PCI_DEVICE(0x423D, PCI_ANY_ID, iwl5150_agn_cfg)},
-/* 6000/6050 Series */
-	{IWL_PCI_DEVICE(0x008D, PCI_ANY_ID, iwl6000h_2agn_cfg)},
-	{IWL_PCI_DEVICE(0x008E, PCI_ANY_ID, iwl6000h_2agn_cfg)},
-	{IWL_PCI_DEVICE(0x422B, PCI_ANY_ID, iwl6000_3agn_cfg)},
-	{IWL_PCI_DEVICE(0x422C, PCI_ANY_ID, iwl6000i_2agn_cfg)},
-	{IWL_PCI_DEVICE(0x4238, PCI_ANY_ID, iwl6000_3agn_cfg)},
-	{IWL_PCI_DEVICE(0x4239, PCI_ANY_ID, iwl6000i_2agn_cfg)},
-	{IWL_PCI_DEVICE(0x0086, PCI_ANY_ID, iwl6050_3agn_cfg)},
-	{IWL_PCI_DEVICE(0x0087, PCI_ANY_ID, iwl6050_2agn_cfg)},
-	{IWL_PCI_DEVICE(0x0088, PCI_ANY_ID, iwl6050_3agn_cfg)},
-	{IWL_PCI_DEVICE(0x0089, PCI_ANY_ID, iwl6050_2agn_cfg)},
+
+/* 6x00 Series */
+	{IWL_PCI_DEVICE(0x008D, 0x1301, iwl6000h_2agn_cfg)},
+	{IWL_PCI_DEVICE(0x008D, 0x1321, iwl6000h_2agn_cfg)},
+	{IWL_PCI_DEVICE(0x008D, 0x1326, iwl6000h_2abg_cfg)},
+	{IWL_PCI_DEVICE(0x008D, 0x1306, iwl6000h_2abg_cfg)},
+	{IWL_PCI_DEVICE(0x008D, 0x1307, iwl6000h_2bg_cfg)},
+	{IWL_PCI_DEVICE(0x008E, 0x1311, iwl6000h_2agn_cfg)},
+	{IWL_PCI_DEVICE(0x008E, 0x1316, iwl6000h_2abg_cfg)},
+
+	{IWL_PCI_DEVICE(0x422B, 0x1101, iwl6000_3agn_cfg)},
+	{IWL_PCI_DEVICE(0x422B, 0x1121, iwl6000_3agn_cfg)},
+	{IWL_PCI_DEVICE(0x422C, 0x1301, iwl6000i_2agn_cfg)},
+	{IWL_PCI_DEVICE(0x422C, 0x1306, iwl6000i_2abg_cfg)},
+	{IWL_PCI_DEVICE(0x422C, 0x1307, iwl6000i_2bg_cfg)},
+	{IWL_PCI_DEVICE(0x422C, 0x1321, iwl6000i_2agn_cfg)},
+	{IWL_PCI_DEVICE(0x422C, 0x1326, iwl6000i_2abg_cfg)},
+	{IWL_PCI_DEVICE(0x4238, 0x1111, iwl6000_3agn_cfg)},
+	{IWL_PCI_DEVICE(0x4239, 0x1311, iwl6000i_2agn_cfg)},
+	{IWL_PCI_DEVICE(0x4239, 0x1316, iwl6000i_2abg_cfg)},
+
+/* 6x50 WiFi/WiMax Series */
+	{IWL_PCI_DEVICE(0x0086, 0x1101, iwl6050_3agn_cfg)},
+	{IWL_PCI_DEVICE(0x0086, 0x1121, iwl6050_3agn_cfg)},
+	{IWL_PCI_DEVICE(0x0087, 0x1301, iwl6050_2agn_cfg)},
+	{IWL_PCI_DEVICE(0x0087, 0x1306, iwl6050_2abg_cfg)},
+	{IWL_PCI_DEVICE(0x0087, 0x1321, iwl6050_2agn_cfg)},
+	{IWL_PCI_DEVICE(0x0087, 0x1326, iwl6050_2abg_cfg)},
+	{IWL_PCI_DEVICE(0x0088, 0x1111, iwl6050_3agn_cfg)},
+	{IWL_PCI_DEVICE(0x0089, 0x1311, iwl6050_2agn_cfg)},
+	{IWL_PCI_DEVICE(0x0089, 0x1316, iwl6050_2abg_cfg)},
+
 /* 1000 Series WiFi */
 	{IWL_PCI_DEVICE(0x0083, 0x1205, iwl1000_bgn_cfg)},
 	{IWL_PCI_DEVICE(0x0083, 0x1305, iwl1000_bgn_cfg)},
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index cca4c6a..3ea97be 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -57,9 +57,14 @@ extern struct iwl_cfg iwl5100_bg_cfg;
 extern struct iwl_cfg iwl5100_abg_cfg;
 extern struct iwl_cfg iwl5150_agn_cfg;
 extern struct iwl_cfg iwl6000h_2agn_cfg;
+extern struct iwl_cfg iwl6000h_2abg_cfg;
+extern struct iwl_cfg iwl6000h_2bg_cfg;
 extern struct iwl_cfg iwl6000i_2agn_cfg;
+extern struct iwl_cfg iwl6000i_2abg_cfg;
+extern struct iwl_cfg iwl6000i_2bg_cfg;
 extern struct iwl_cfg iwl6000_3agn_cfg;
 extern struct iwl_cfg iwl6050_2agn_cfg;
+extern struct iwl_cfg iwl6050_2abg_cfg;
 extern struct iwl_cfg iwl6050_3agn_cfg;
 extern struct iwl_cfg iwl1000_bgn_cfg;
 extern struct iwl_cfg iwl1000_bg_cfg;
-- 
1.5.6.3


^ permalink raw reply related

* [PATCH 08/13] iwlwifi: send cmd to uCode to configure valid tx antenna
From: Reinette Chatre @ 2009-09-17 17:43 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Wey-Yi Guy, Reinette Chatre
In-Reply-To: <1253209436-2309-1-git-send-email-reinette.chatre@intel.com>

From: Wey-Yi Guy <wey-yi.w.guy@intel.com>

In order for uCode to select the valid antennas for transmit, driver
need to configure the allowed tx antennas through host command.

The TX_ANT_CONFIGURATION_CMD should be used for 5000 series and up

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-5000.c     |   19 +++++++++++++++++++
 drivers/net/wireless/iwlwifi/iwl-agn.c      |    4 ++++
 drivers/net/wireless/iwlwifi/iwl-commands.h |   12 +++++++++++-
 drivers/net/wireless/iwlwifi/iwl-core.h     |    1 +
 4 files changed, 35 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 00b07f0..2bb282e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -1444,6 +1444,24 @@ int iwl5000_calc_rssi(struct iwl_priv *priv,
 	return max_rssi - agc - IWL49_RSSI_OFFSET;
 }
 
+static int iwl5000_send_tx_ant_config(struct iwl_priv *priv, u8 valid_tx_ant)
+{
+	struct iwl_tx_ant_config_cmd tx_ant_cmd = {
+	  .valid = cpu_to_le32(valid_tx_ant),
+	};
+
+	if (IWL_UCODE_API(priv->ucode_ver) > 1) {
+		IWL_DEBUG_HC(priv, "select valid tx ant: %u\n", valid_tx_ant);
+		return iwl_send_cmd_pdu(priv, TX_ANT_CONFIGURATION_CMD,
+					sizeof(struct iwl_tx_ant_config_cmd),
+					&tx_ant_cmd);
+	} else {
+		IWL_DEBUG_HC(priv, "TX_ANT_CONFIGURATION_CMD not supported\n");
+		return -EOPNOTSUPP;
+	}
+}
+
+
 #define IWL5000_UCODE_GET(item)						\
 static u32 iwl5000_ucode_get_##item(const struct iwl_ucode_header *ucode,\
 				    u32 api_ver)			\
@@ -1486,6 +1504,7 @@ struct iwl_hcmd_ops iwl5000_hcmd = {
 	.rxon_assoc = iwl5000_send_rxon_assoc,
 	.commit_rxon = iwl_commit_rxon,
 	.set_rxon_chain = iwl_set_rxon_chain,
+	.set_tx_ant = iwl5000_send_tx_ant_config,
 };
 
 struct iwl_hcmd_utils_ops iwl5000_hcmd_utils = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index f726b42..cc7a5a9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -1577,6 +1577,10 @@ static void iwl_alive_start(struct iwl_priv *priv)
 	priv->active_rate = priv->rates_mask;
 	priv->active_rate_basic = priv->rates_mask & IWL_BASIC_RATES_MASK;
 
+	/* Configure Tx antenna selection based on H/W config */
+	if (priv->cfg->ops->hcmd->set_tx_ant)
+		priv->cfg->ops->hcmd->set_tx_ant(priv, priv->cfg->valid_tx_ant);
+
 	if (iwl_is_associated(priv)) {
 		struct iwl_rxon_cmd *active_rxon =
 				(struct iwl_rxon_cmd *)&priv->active_rxon;
diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h
index 2c5c88f..e5f40f3 100644
--- a/drivers/net/wireless/iwlwifi/iwl-commands.h
+++ b/drivers/net/wireless/iwlwifi/iwl-commands.h
@@ -148,7 +148,7 @@ enum {
 	QUIET_NOTIFICATION = 0x96,		/* not used */
 	REPLY_TX_PWR_TABLE_CMD = 0x97,
 	REPLY_TX_POWER_DBM_CMD_V1 = 0x98,	/* old version of API */
-	TX_ANT_CONFIGURATION_CMD = 0x98,	/* not used */
+	TX_ANT_CONFIGURATION_CMD = 0x98,
 	MEASURE_ABORT_NOTIFICATION = 0x99,	/* not used */
 
 	/* Bluetooth device coexistence config command */
@@ -411,6 +411,16 @@ struct iwl5000_tx_power_dbm_cmd {
 	u8 reserved;
 } __attribute__ ((packed));
 
+/**
+ * Command TX_ANT_CONFIGURATION_CMD = 0x98
+ * This command is used to configure valid Tx antenna.
+ * By default uCode concludes the valid antenna according to the radio flavor.
+ * This command enables the driver to override/modify this conclusion.
+ */
+struct iwl_tx_ant_config_cmd {
+	__le32 valid;
+} __attribute__ ((packed));
+
 /******************************************************************************
  * (0a)
  * Alive and Error Commands & Responses:
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 4f7c133..3791c87 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -89,6 +89,7 @@ struct iwl_hcmd_ops {
 	int (*rxon_assoc)(struct iwl_priv *priv);
 	int (*commit_rxon)(struct iwl_priv *priv);
 	void (*set_rxon_chain)(struct iwl_priv *priv);
+	int (*set_tx_ant)(struct iwl_priv *priv, u8 valid_tx_ant);
 };
 
 struct iwl_hcmd_utils_ops {
-- 
1.5.6.3


^ permalink raw reply related

* [PATCH 09/13] iwlwifi: update PCI Subsystem ID for 1000 series
From: Reinette Chatre @ 2009-09-17 17:43 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Wey-Yi Guy, Reinette Chatre
In-Reply-To: <1253209436-2309-1-git-send-email-reinette.chatre@intel.com>

From: Wey-Yi Guy <wey-yi.w.guy@intel.com>

Update PCI Subsystem ID for 1000 series based on HW SKU. Adding new SKU
for "BG" only devices.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-1000.c |   20 ++++++++++++++++++++
 drivers/net/wireless/iwlwifi/iwl-agn.c  |   14 ++++++++++++--
 drivers/net/wireless/iwlwifi/iwl-dev.h  |    1 +
 3 files changed, 33 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c
index 4da99d1..4abfc84 100644
--- a/drivers/net/wireless/iwlwifi/iwl-1000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-1000.c
@@ -165,3 +165,23 @@ struct iwl_cfg iwl1000_bgn_cfg = {
 	.led_compensation = 51,
 };
 
+struct iwl_cfg iwl1000_bg_cfg = {
+	.name = "1000 Series BG",
+	.fw_name_pre = IWL1000_FW_PRE,
+	.ucode_api_max = IWL1000_UCODE_API_MAX,
+	.ucode_api_min = IWL1000_UCODE_API_MIN,
+	.sku = IWL_SKU_G,
+	.ops = &iwl1000_ops,
+	.eeprom_size = OTP_LOW_IMAGE_SIZE,
+	.eeprom_ver = EEPROM_1000_EEPROM_VERSION,
+	.eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION,
+	.mod_params = &iwl50_mod_params,
+	.valid_tx_ant = ANT_A,
+	.valid_rx_ant = ANT_AB,
+	.need_pll_cfg = true,
+	.max_ll_items = OTP_MAX_LL_ITEMS_1000,
+	.shadow_ram_support = false,
+	.ht_greenfield_support = true,
+	.led_compensation = 51,
+};
+
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index cc7a5a9..b29e44f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3085,8 +3085,18 @@ static struct pci_device_id iwl_hw_card_ids[] = {
 	{IWL_PCI_DEVICE(0x0088, PCI_ANY_ID, iwl6050_3agn_cfg)},
 	{IWL_PCI_DEVICE(0x0089, PCI_ANY_ID, iwl6050_2agn_cfg)},
 /* 1000 Series WiFi */
-	{IWL_PCI_DEVICE(0x0083, PCI_ANY_ID, iwl1000_bgn_cfg)},
-	{IWL_PCI_DEVICE(0x0084, PCI_ANY_ID, iwl1000_bgn_cfg)},
+	{IWL_PCI_DEVICE(0x0083, 0x1205, iwl1000_bgn_cfg)},
+	{IWL_PCI_DEVICE(0x0083, 0x1305, iwl1000_bgn_cfg)},
+	{IWL_PCI_DEVICE(0x0083, 0x1225, iwl1000_bgn_cfg)},
+	{IWL_PCI_DEVICE(0x0083, 0x1325, iwl1000_bgn_cfg)},
+	{IWL_PCI_DEVICE(0x0084, 0x1215, iwl1000_bgn_cfg)},
+	{IWL_PCI_DEVICE(0x0084, 0x1315, iwl1000_bgn_cfg)},
+	{IWL_PCI_DEVICE(0x0083, 0x1206, iwl1000_bg_cfg)},
+	{IWL_PCI_DEVICE(0x0083, 0x1306, iwl1000_bg_cfg)},
+	{IWL_PCI_DEVICE(0x0083, 0x1226, iwl1000_bg_cfg)},
+	{IWL_PCI_DEVICE(0x0083, 0x1326, iwl1000_bg_cfg)},
+	{IWL_PCI_DEVICE(0x0084, 0x1216, iwl1000_bg_cfg)},
+	{IWL_PCI_DEVICE(0x0084, 0x1316, iwl1000_bg_cfg)},
 #endif /* CONFIG_IWL5000 */
 
 	{0}
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index 0c80692..cca4c6a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -62,6 +62,7 @@ extern struct iwl_cfg iwl6000_3agn_cfg;
 extern struct iwl_cfg iwl6050_2agn_cfg;
 extern struct iwl_cfg iwl6050_3agn_cfg;
 extern struct iwl_cfg iwl1000_bgn_cfg;
+extern struct iwl_cfg iwl1000_bg_cfg;
 
 struct iwl_tx_queue;
 
-- 
1.5.6.3


^ permalink raw reply related

* [PATCH 12/13 v2.6.32 and w-t] iwlwifi: do not send sync command while holding spinlock
From: Reinette Chatre @ 2009-09-17 17:43 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Reinette Chatre
In-Reply-To: <1253209436-2309-1-git-send-email-reinette.chatre@intel.com>

commit 10c994ca70e8e94bbc85a5bf13de5911ee8de4d2 "iwlwifi: fix remove key
error" fixed an error reported by mac80211 during interface down. The fix
involved changing an async command to synchronous. Unfortunately this was
inside a spinlock section in which we cannot sleep.

Modify the sending of the command back to async. This causes the mac80211
error "mac80211-phy0: failed to remove key (0, ff:ff:ff:ff:ff:ff) from
hardware (-16)." to return. This error is not serious since this occurs
during interface down and the keys will be cleared anyway when ucode is
unloaded. Having this error message is thus less serious than a potential
deadlock introduced when sleeping while holding a spinlock. We will have to
find another fix for that error.

This is a revert of the abovementioned commit.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-sta.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c
index a2b9ec8..c6633fe 100644
--- a/drivers/net/wireless/iwlwifi/iwl-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-sta.c
@@ -520,7 +520,7 @@ int iwl_send_static_wepkey_cmd(struct iwl_priv *priv, u8 send_if_empty)
 	struct iwl_host_cmd cmd = {
 		.id = REPLY_WEPKEY,
 		.data = wep_cmd,
-		.flags = CMD_SYNC,
+		.flags = CMD_ASYNC,
 	};
 
 	memset(wep_cmd, 0, cmd_size +
-- 
1.5.6.3


^ permalink raw reply related

* [PATCH 11/13] iwlwifi: add LED mode to support different LED behavior
From: Reinette Chatre @ 2009-09-17 17:43 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Wey-Yi Guy, Reinette Chatre
In-Reply-To: <1253209436-2309-1-git-send-email-reinette.chatre@intel.com>

From: Wey-Yi Guy <wey-yi.w.guy@intel.com>

Today's implementation allow LED to blink based on the traffic
condition. We introduce an additional LED mode that reflects the RF
state.

The supported LED modes after this are:
  IWL_LED_BLINK (current/default) - blink rate based on current Tx/Rx
                                    traffic
  IWL_LED_RF_STATE (new) -
    LED OFF: No power/RF disabled, the LED is emitting no light
    LED ON:  Powered/RF enabled, the LED is emitting light
             in a stable non-flashing state.

In order to provide the flexibility to support different LED
behavior per user/system preference we add "led_mode" iwlcore module
parameter.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-led.c |    9 ++++++++-
 drivers/net/wireless/iwlwifi/iwl-led.h |   12 ++++++++++++
 2 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-led.c b/drivers/net/wireless/iwlwifi/iwl-led.c
index f547233..685ba9d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-led.c
+++ b/drivers/net/wireless/iwlwifi/iwl-led.c
@@ -42,6 +42,12 @@
 #include "iwl-core.h"
 #include "iwl-io.h"
 
+/* default: IWL_LED_BLINK(0) using blinking index table */
+static int led_mode;
+module_param(led_mode, int, S_IRUGO);
+MODULE_PARM_DESC(led_mode, "led mode: 0=blinking, 1=On(RF On)/Off(RF Off), "
+			   "(default 0)\n");
+
 #ifdef CONFIG_IWLWIFI_DEBUG
 static const char *led_type_str[] = {
 	__stringify(IWL_LED_TRG_TX),
@@ -199,7 +205,8 @@ static int iwl_led_off_reg(struct iwl_priv *priv, int led_id)
 static int iwl_led_associate(struct iwl_priv *priv, int led_id)
 {
 	IWL_DEBUG_LED(priv, "Associated\n");
-	priv->allow_blinking = 1;
+	if (led_mode == IWL_LED_BLINK)
+		priv->allow_blinking = 1;
 	return iwl_led_on_reg(priv, led_id);
 }
 static int iwl_led_disassociate(struct iwl_priv *priv, int led_id)
diff --git a/drivers/net/wireless/iwlwifi/iwl-led.h b/drivers/net/wireless/iwlwifi/iwl-led.h
index ef9b174..dd76b26 100644
--- a/drivers/net/wireless/iwlwifi/iwl-led.h
+++ b/drivers/net/wireless/iwlwifi/iwl-led.h
@@ -47,6 +47,18 @@ enum led_type {
 	IWL_LED_TRG_RADIO,
 	IWL_LED_TRG_MAX,
 };
+
+/*
+ * LED mode
+ *    IWL_LED_BLINK:    adjust led blink rate based on blink table
+ *    IWL_LED_RF_STATE: turn LED on/off based on RF state
+ *			LED ON  = RF ON
+ *			LED OFF = RF OFF
+ */
+enum iwl_led_mode {
+	IWL_LED_BLINK,
+	IWL_LED_RF_STATE,
+};
 #endif
 
 #ifdef CONFIG_IWLWIFI_LEDS
-- 
1.5.6.3


^ permalink raw reply related

* [PATCH 13/13 2.6.32 and w-t] iwlwifi: reduce noise when skb allocation fails
From: Reinette Chatre @ 2009-09-17 17:43 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, ipw3945-devel, Reinette Chatre
In-Reply-To: <1253209436-2309-1-git-send-email-reinette.chatre@intel.com>

Replenishment of receive buffers is done in the tasklet handling
received frames as well as in a workqueue. When we are in the tasklet
we cannot sleep and thus attempt atomic skb allocations. It is generally
not a big problem if this fails since iwl_rx_allocate is always followed
by a call to iwl_rx_queue_restock which will queue the work to replenish
the buffers at a time when sleeping is allowed.

We thus add the __GFP_NOWARN to the skb allocation in iwl_rx_allocate to
reduce the noise if such an allocation fails while we still have enough
buffers. We do maintain the warning and the error message when we are low
on buffers to communicate to the user that there is a potential problem with
memory availability on system

This addresses issue reported upstream in thread "iwlagn: order 2 page
allocation failures" in
http://thread.gmane.org/gmane.linux.kernel.wireless.general/39187

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
---
 drivers/net/wireless/iwlwifi/iwl-rx.c       |   10 +++++++++-
 drivers/net/wireless/iwlwifi/iwl3945-base.c |    9 ++++++++-
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c
index b90adcb..8e1bb53 100644
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
@@ -250,12 +250,20 @@ void iwl_rx_allocate(struct iwl_priv *priv, gfp_t priority)
 		}
 		spin_unlock_irqrestore(&rxq->lock, flags);
 
+		if (rxq->free_count > RX_LOW_WATERMARK)
+			priority |= __GFP_NOWARN;
 		/* Alloc a new receive buffer */
 		skb = alloc_skb(priv->hw_params.rx_buf_size + 256,
 						priority);
 
 		if (!skb) {
-			IWL_CRIT(priv, "Can not allocate SKB buffers\n");
+			if (net_ratelimit())
+				IWL_DEBUG_INFO(priv, "Failed to allocate SKB buffer.\n");
+			if ((rxq->free_count <= RX_LOW_WATERMARK) &&
+			    net_ratelimit())
+				IWL_CRIT(priv, "Failed to allocate SKB buffer with %s. Only %u free buffers remaining.\n",
+					 priority == GFP_ATOMIC ?  "GFP_ATOMIC" : "GFP_KERNEL",
+					 rxq->free_count);
 			/* We don't reschedule replenish work here -- we will
 			 * call the restock method and if it still needs
 			 * more buffers it will schedule replenish */
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 3b31bd5..c92db01 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -1146,11 +1146,18 @@ static void iwl3945_rx_allocate(struct iwl_priv *priv, gfp_t priority)
 		}
 		spin_unlock_irqrestore(&rxq->lock, flags);
 
+		if (rxq->free_count > RX_LOW_WATERMARK)
+			priority |= __GFP_NOWARN;
 		/* Alloc a new receive buffer */
 		skb = alloc_skb(priv->hw_params.rx_buf_size, priority);
 		if (!skb) {
 			if (net_ratelimit())
-				IWL_CRIT(priv, ": Can not allocate SKB buffers\n");
+				IWL_DEBUG_INFO(priv, "Failed to allocate SKB buffer.\n");
+			if ((rxq->free_count <= RX_LOW_WATERMARK) &&
+			    net_ratelimit())
+				IWL_CRIT(priv, "Failed to allocate SKB buffer with %s. Only %u free buffers remaining.\n",
+					 priority == GFP_ATOMIC ?  "GFP_ATOMIC" : "GFP_KERNEL",
+					 rxq->free_count);
 			/* We don't reschedule replenish work here -- we will
 			 * call the restock method and if it still needs
 			 * more buffers it will schedule replenish */
-- 
1.5.6.3


^ permalink raw reply related

* Re: regression?  No connection with master-2009-09-16 was fine until master-2009-09-14
From: John W. Linville @ 2009-09-17 19:51 UTC (permalink / raw)
  To: ASIC Felix; +Cc: linux-wireless, Johannes Berg, Luis R. Rodriguez
In-Reply-To: <1253208348.6601.17.camel@darkslate>

On Thu, Sep 17, 2009 at 10:25:48AM -0700, ASIC Felix wrote:
> Hi,
> 
> with master-2009-09-16 my laptop can no longer connect to the network.
> I can see all the APs, but can't connect.
> The issue is new, w-t kernel master-2009-09-14 was fine.
> 
> Sorry for pasting the whole /var/log/messages from boot to boot,
> but I see anything obvious by myself.

Perhaps you could bisect between master-2009-09-14 and
master-2009-09-16?  There are only a handful of patches.

Thanks,

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply

* [PATCH v2.6.31-gab86e57] rt2x00: fix the definition of rt2x00crypto_rx_insert_iv
From: Andrew Price @ 2009-09-17 20:15 UTC (permalink / raw)
  To: linux-wireless

Remove the redundant l2pad parameter from the definition of
rt2x00crypto_rx_insert_iv which is used when only CONFIG_RT2500PCI but
none of the other rt2x00 family drivers is configured.

Signed-off-by: Andrew Price <andy@andrewprice.me.uk>
---
 drivers/net/wireless/rt2x00/rt2x00lib.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2x00lib.h b/drivers/net/wireless/rt2x00/rt2x00lib.h
index 5462cb5..567f029 100644
--- a/drivers/net/wireless/rt2x00/rt2x00lib.h
+++ b/drivers/net/wireless/rt2x00/rt2x00lib.h
@@ -380,7 +380,7 @@ static inline void rt2x00crypto_tx_insert_iv(struct sk_buff *skb,
 {
 }
 
-static inline void rt2x00crypto_rx_insert_iv(struct sk_buff *skb, bool l2pad,
+static inline void rt2x00crypto_rx_insert_iv(struct sk_buff *skb,
 					     unsigned int header_length,
 					     struct rxdone_entry_desc *rxdesc)
 {
-- 
1.6.3.3


^ permalink raw reply related

* problem: iw connect
From: Michał Bożek @ 2009-09-17 20:53 UTC (permalink / raw)
  To: linux-wireless

Hi,

I'm a student and I'm currently working on implementation of standard
802.21 which is the subject of my master's thesis. One of the project
modules is responsible for configuration of wireless interface and
basic operations like scanning, association... I decided to use
netlink library as a communication mechanism between kernel and
userspace. Firstly I wanted to try to establish connection using iw
tool, and here I encountered problem.

I installed:
+ iw 0.9.17
+ libnl 2.0
+ newest kernel (2.6.31-39-pae)

I typed:
+ ifconfig wlan0 up
+ iw wlan0 scan -> works properly, I discovered my wireless network
+ iw wlan0 connect xxxx -> error: command failed: Operation not supported (-95)

I received same error when I had older kernel (2.6.27.7-9) and I tried
scanning (iw wlan0 scan) so it looks like my kernel does not support
operation connect but I've got the newest one and as far as I know it
supports connecting/disconnecting.

It cannot be caused by some hardware malfunction because while using
w-ext I can connect to my AP without any problems.

Some info, perhaps something will be useful:

# uname -a
Linux linux-etd0 2.6.31-39-pae #1 SMP Thu Sep 17 20:29:31 CEST 2009
i686 i686 i386 GNU/Linux

# lspci -vnn | grep 14e4
02:0e.0 Ethernet controller [0200]: Broadcom Corporation BCM4401-B0
100Base-TX [14e4:170c] (rev 02)
10:00.0 Network controller [0280]: Broadcom Corporation BCM4311
802.11b/g WLAN [14e4:4311] (rev 01)

# lsmod | grep 80211
mac80211              208792  1 b43
cfg80211              105120  2 b43,mac80211
rfkill                 22548  2 cfg80211,bluetooth

# modinfo cfg80211
filename:       /lib/modules/2.6.31-39-pae/kernel/net/wireless/cfg80211.ko
description:    wireless configuration support
license:        GPL
author:         Johannes Berg
srcversion:     34A03B9852D93D21805D1BA
depends:        rfkill
vermagic:       2.6.31-39-pae SMP mod_unload modversions 686
parm:           ieee80211_regdom:IEEE 802.11 regulatory domain code (charp)

# modinfo mac80211
filename:       /lib/modules/2.6.31-39-pae/kernel/net/mac80211/mac80211.ko
license:        GPL
description:    IEEE 802.11 subsystem
srcversion:     1CA4235209A74C4FA4CCF94
depends:        cfg80211
vermagic:       2.6.31-39-pae SMP mod_unload modversions 686
parm:           ieee80211_default_rc_algo:Default rate control
algorithm for mac80211 to use (charp)

# iw wlan0 info
Interface wlan0
        ifindex 4
        type managed

# iw phy0 info
Wiphy phy0
        Band 1:
                Frequencies:
                        * 2412 MHz [1] (20.0 dBm)
                        * 2417 MHz [2] (20.0 dBm)
                        * 2422 MHz [3] (20.0 dBm)
                        * 2427 MHz [4] (20.0 dBm)
                        * 2432 MHz [5] (20.0 dBm)
                        * 2437 MHz [6] (20.0 dBm)
                        * 2442 MHz [7] (20.0 dBm)
                        * 2447 MHz [8] (20.0 dBm)
                        * 2452 MHz [9] (20.0 dBm)
                        * 2457 MHz [10] (20.0 dBm)
                        * 2462 MHz [11] (20.0 dBm)
                        * 2467 MHz [12] (20.0 dBm) (passive scanning, no IBSS)
                        * 2472 MHz [13] (20.0 dBm) (passive scanning, no IBSS)
                        * 2484 MHz [14] (20.0 dBm) (passive scanning, no IBSS)
                Bitrates (non-HT):
                        * 1.0 Mbps
                        * 2.0 Mbps (short preamble supported)
                        * 5.5 Mbps (short preamble supported)
                        * 11.0 Mbps (short preamble supported)
                        * 6.0 Mbps
                        * 9.0 Mbps
                        * 12.0 Mbps
                        * 18.0 Mbps
                        * 24.0 Mbps
                        * 36.0 Mbps
                        * 48.0 Mbps
                        * 54.0 Mbps
        max # scan SSIDs: 4
        Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * AP/VLAN
                 * WDS
                 * monitor
                 * mesh point

# ifconfig wlan0
wlan0     Link encap:Ethernet  HWaddr 00:14:A5:AF:AC:C6
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

# iwconfig wlan0
wlan0     IEEE 802.11bg  ESSID:""
          Mode:Managed  Frequency:2.462 GHz  Access Point: Not-Associated
          Tx-Power=20 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0


I would greatly appreciate any tip how to solve the problem or what
can be the cause of it.

Thanks,

Michał Bożek

^ permalink raw reply

* [PATCH -next] wl12xx: fix kconfig/link errors
From: Randy Dunlap @ 2009-09-17 21:17 UTC (permalink / raw)
  To: linux-wireless; +Cc: linville, akpm

From: Randy Dunlap <randy.dunlap@oracle.com>

"boolean" converts a module dependency (MAC80211=m) to YES,
then the WL12XX driver can be built-in instead of only
modular, which leads to linker errors:

wl1271_main.c:(.text+0x11177d): undefined reference to `ieee80211_frequency_to_channel'
wl1271_main.c:(.text+0x111adc): undefined reference to `ieee80211_stop_queues'
wl1271_main.c:(.text+0x112005): undefined reference to `ieee80211_scan_completed'
(.text+0x1139c8): undefined reference to `ieee80211_scan_completed'
(.text+0x113bb0): undefined reference to `ieee80211_tx_status'
(.text+0x113e53): undefined reference to `ieee80211_stop_queues'
(.text+0x113e8d): undefined reference to `ieee80211_wake_queues'
(.text+0x113f3b): undefined reference to `ieee80211_tx_status'
(.text+0x113f60): undefined reference to `ieee80211_tx_status'
(.text+0x1140f0): undefined reference to `ieee80211_channel_to_frequency'
(.text+0x114153): undefined reference to `ieee80211_rx'
wl1271_main.c:(.devinit.text+0xca08): undefined reference to `ieee80211_alloc_hw'
wl1271_main.c:(.devinit.text+0xccf5): undefined reference to `ieee80211_register_hw'
wl1271_main.c:(.devinit.text+0xcd6b): undefined reference to `ieee80211_free_hw'
wl1271_main.c:(.devexit.text+0x1353): undefined reference to `ieee80211_unregister_hw'
wl1271_main.c:(.devexit.text+0x13c9): undefined reference to `ieee80211_free_hw'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 drivers/net/wireless/wl12xx/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-next-20090917.orig/drivers/net/wireless/wl12xx/Kconfig
+++ linux-next-20090917/drivers/net/wireless/wl12xx/Kconfig
@@ -1,5 +1,5 @@
 menuconfig WL12XX
-	boolean "TI wl12xx driver support"
+	tristate "TI wl12xx driver support"
 	depends on MAC80211 && WLAN_80211 && EXPERIMENTAL
 	---help---
 	  This will enable TI wl12xx driver support. The drivers make



---
~Randy
LPC 2009, Sept. 23-25, Portland, Oregon
http://linuxplumbersconf.org/2009/

^ permalink raw reply

* Re: regression?  No connection with master-2009-09-16 was fine until master-2009-09-14
From: ASIC Felix @ 2009-09-17 23:06 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, Johannes Berg, Luis R. Rodriguez
In-Reply-To: <20090917195141.GB2562@tuxdriver.com>

On Thu, 2009-09-17 at 15:51 -0400, John W. Linville wrote:
> On Thu, Sep 17, 2009 at 10:25:48AM -0700, ASIC Felix wrote:
> > Hi,
> > 
> > with master-2009-09-16 my laptop can no longer connect to the network.
> > I can see all the APs, but can't connect.
> > The issue is new, w-t kernel master-2009-09-14 was fine.
> > 
> > Sorry for pasting the whole /var/log/messages from boot to boot,
> > but I see anything obvious by myself.
> 
> Perhaps you could bisect between master-2009-09-14 and
> master-2009-09-16?  There are only a handful of patches.

]$ git bisect good
389ce02fdca74c15984edced7a2f1879fe08a8b1 is first bad commit
commit 389ce02fdca74c15984edced7a2f1879fe08a8b1
Author: Johannes Berg <johannes@sipsolutions.net>
Date:   Wed Sep 16 09:04:26 2009 -0700

    cfg80211: fix SME connect
    
    There's a check saying
    	/* we're good if we have both BSSID and channel */
    	if (wdev->conn->params.bssid && wdev->conn->params.channel) {


This commit prevents connection for me.

Best regards,
Felix


^ permalink raw reply

* Re: regression?  No connection with master-2009-09-16 was fine until master-2009-09-14
From: Johannes Berg @ 2009-09-17 23:35 UTC (permalink / raw)
  To: ASIC Felix; +Cc: linux-wireless, Luis R. Rodriguez
In-Reply-To: <1253208348.6601.17.camel@darkslate>

[-- Attachment #1: Type: text/plain, Size: 312 bytes --]

On Thu, 2009-09-17 at 10:25 -0700, ASIC Felix wrote:

> ath9k: Two wiphys trying to scan at the same time

how about you stop playing with multi-wiphy things _first_?

and then describe your setup ... the patch works fine here and Holger
said it fixed his problem. hidden ssid by any chance?

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply

* Re: regression?  No connection with master-2009-09-16 was fine until master-2009-09-14
From: ASIC Felix @ 2009-09-18  0:05 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Luis R. Rodriguez
In-Reply-To: <1253230530.23567.1.camel@johannes.local>

On Thu, 2009-09-17 at 16:35 -0700, Johannes Berg wrote:
> On Thu, 2009-09-17 at 10:25 -0700, ASIC Felix wrote:
> 
> > ath9k: Two wiphys trying to scan at the same time
> 
> how about you stop playing with multi-wiphy things _first_?

How can I disable it? (sorry)

> and then describe your setup ... the patch works fine here and Holger
> said it fixed his problem. hidden ssid by any chance?

Office network, can see about 50 APs, more 2G than 5G.

Main office ssid is available on most 2G channels 11g (no 11n), also on
several 5G channels 11a (no 11n). Lots of other ssids are visible.
WPA2/PSK.

H/W: IBM Thinkpad T43.
wifi: phy0: Atheros AR9280 MAC/BB Rev:2 AR5133 RF Rev:d0:
mem=0xf9ca0000, irq=21

Distro:	Mandriva 2009.1
Kernel:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
(no patches added)

Will try on home network too, haven't done that yet.

Best regards,
Felix


^ permalink raw reply

* Re: regression?  No connection with master-2009-09-16 was fine until master-2009-09-14
From: Johannes Berg @ 2009-09-18  0:09 UTC (permalink / raw)
  To: ASIC Felix; +Cc: linux-wireless, Luis R. Rodriguez
In-Reply-To: <1253232319.6914.15.camel@darkslate>

[-- Attachment #1: Type: text/plain, Size: 541 bytes --]

On Thu, 2009-09-17 at 17:05 -0700, ASIC Felix wrote:

> > and then describe your setup ... the patch works fine here and Holger
> > said it fixed his problem. hidden ssid by any chance?
> 
> Office network, can see about 50 APs, more 2G than 5G.
> 
> Main office ssid is available on most 2G channels 11g (no 11n), also on
> several 5G channels 11a (no 11n). Lots of other ssids are visible.
> WPA2/PSK.

I think wpa is the problem, seeing something like that here too, very
odd that it could connect otherwise tho.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply

* Re: regression?  No connection with master-2009-09-16 was fine until master-2009-09-14
From: Johannes Berg @ 2009-09-18  0:13 UTC (permalink / raw)
  To: ASIC Felix; +Cc: linux-wireless, Luis R. Rodriguez
In-Reply-To: <1253232542.23567.3.camel@johannes.local>

[-- Attachment #1: Type: text/plain, Size: 645 bytes --]

On Thu, 2009-09-17 at 17:09 -0700, Johannes Berg wrote:
> On Thu, 2009-09-17 at 17:05 -0700, ASIC Felix wrote:
> 
> > > and then describe your setup ... the patch works fine here and Holger
> > > said it fixed his problem. hidden ssid by any chance?
> > 
> > Office network, can see about 50 APs, more 2G than 5G.
> > 
> > Main office ssid is available on most 2G channels 11g (no 11n), also on
> > several 5G channels 11a (no 11n). Lots of other ssids are visible.
> > WPA2/PSK.
> 
> I think wpa is the problem, seeing something like that here too, very
> odd that it could connect otherwise tho.

yeah I've got it.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply

* [PATCH] cfg80211: don't overwrite privacy setting
From: Johannes Berg @ 2009-09-18  0:15 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, ASIC Felix

When cfg80211 is instructed to connect, it always
uses the default WEP key for the privacy setting,
which clearly is wrong when using wpa_supplicant.
Don't overwrite the setting, and rely on it being
false when wpa_supplicant is not running, instead
set it to true when we have keys.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>

--- wireless-testing.orig/net/wireless/wext-sme.c	2009-09-17 17:12:03.000000000 -0700
+++ wireless-testing/net/wireless/wext-sme.c	2009-09-17 17:12:53.000000000 -0700
@@ -26,11 +26,11 @@ int cfg80211_mgd_wext_connect(struct cfg
 
 	wdev->wext.connect.ie = wdev->wext.ie;
 	wdev->wext.connect.ie_len = wdev->wext.ie_len;
-	wdev->wext.connect.privacy = wdev->wext.default_key != -1;
 
 	if (wdev->wext.keys) {
 		wdev->wext.keys->def = wdev->wext.default_key;
 		wdev->wext.keys->defmgmt = wdev->wext.default_mgmt_key;
+		wdev->wext.connect.privacy = true;
 	}
 
 	if (!wdev->wext.connect.ssid_len)



^ permalink raw reply

* RE: [PATCH] libertas: Add auto deep sleep support for SD8385/SD8686/SD8688
From: Bing Zhao @ 2009-09-18  1:47 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior, Andrey Yurovsky
  Cc: Dan Williams, Amitkumar Karwar, linux-wireless@vger.kernel.org,
	libertas-dev@lists.infradead.org
In-Reply-To: <20090917161154.GA877@Chamillionaire.breakpoint.cc>

Hi Sebastian,

> -----Original Message-----
> From: Sebastian Andrzej Siewior [mailto:sebastian@breakpoint.cc]
> Sent: Thursday, September 17, 2009 9:12 AM
> To: Andrey Yurovsky
> Cc: Bing Zhao; Dan Williams; Amitkumar Karwar; linux-wireless@vger.kernel.org; libertas-
> dev@lists.infradead.org
> Subject: Re: [PATCH] libertas: Add auto deep sleep support for SD8385/SD8686/SD8688
> 
> * Andrey Yurovsky | 2009-09-16 13:47:48 [-0700]:
> 
> >> Some information (such as the interface name and path) in README file is out of date. We just
> copy-and-paste it for the new deepsleep command. We need a separate patch to clean up the REAME file
> and keep it up to date.
> >
> >Ok.  Either way, this is another out-of-band interface (regardless of
> >if it's debugfs or sysfs).  That said, I believe that debugfs should
> >be used for debugging, not for configuring driver/device features like
> >these.
> I agree on this. Debugfs is for debug only and should stay that way.
> What do other driver in regard to this? I hardly belive that the
> libertas driver is the only "deep sleep" user.

The debugfs interface has already been used for configuring some other parameters in libertas driver.
Choosing a different way for deep sleep configuration doesn't make sense to me.

> 
> >>> Deep sleep seems to pretty much "turn off" the wifi card (as far as
> >>> the user is concerned) so how about a simpler approach: enter deep
> >>> sleep when the interface is brought down (ifconfig wlanN down) and
> >>> exit deep sleep when it's brought up. ?Do this only when deep sleep is
> >>> supported/possible. ?Alternately, maybe this belongs as an rfkill
> >>> feature?
> >>
> >> Entering/exiting deep sleep doesn't have to depend on wlanN interface's up and down. User can
> still put the chip into sleep when wlanN is up. And, with auto deep sleep feature, the driver
> automatically wakes the chip up for sending user commands (for example, scan) and put the chip back
> to sleep after certain time period of inactivity. The deepsleep command through debugfs interface
> provides the flexibility of deep sleep options.
> >>
> >> The rfkill shuts down the RF transmitter of the device but most of other modules may be still
> functioning. The deep sleep shuts down most of the modules (including the RF) on the chip to save as
> much power as possible.
> >
> >It seems that when the device is in deep sleep, it's effectively
> >"turned off" as far as the user is concerned.  That seems really
> >similar to "ifconfig down" or rfkill, does the user really care about
> >anything beyond that?  I understand that it's possible to control this
> >feature independently of either of those functions, but is it ever
> >necessary?  If not, it would be great to just integrate it into one
> >(or both) of these already standard network interface semantics and
> >not introduce a whole new configuration parameter.
> 
> iwconfig has an interface for this I think:
> |interface power {period N|timeout N|saving N|off}
> 
> From what I see in the man page it covers pretty much what you wrote in
> the Readme file. So it looks like like there is your flexible interface
> you've been looking for :)

Unfortunately, the "iwconfig wlanN power" command is used for ieee power saving mode in the driver.

Regards,

Bing

> 
> >  -Andrey
> >
> >> Regards,
> >>
> >> Bing
> 
> Sebastian

^ permalink raw reply

* Re: [rt2x00] rt2500pci is spamming syslogd since upgrade to 2.6.31
From: Julian Calaby @ 2009-09-18  6:37 UTC (permalink / raw)
  To: Ivo van Doorn
  Cc: Alejandro Riveira Fernández, linux-kernel@vger.kernel.org,
	John W. Linville, linux-wireless@vger.kernel.org
In-Reply-To: <200909151813.32223.IvDoorn@gmail.com>

2009/9/16 Ivo van Doorn <ivdoorn@gmail.com>:
> Hi,
>
>>  Hi; my syslog has many entries like this since the upgrade to 2.6.31
>>
>>  phy0 -> rt2500pci_set_device_state: Error - Device failed to enter state 1 (-16).
>>
>>  Sometimes the driver just start spamming like crazy sometimes is at less rate
>>  sometimes it does not appear.
>>
>>  I'm running 2.6.31 with a revert [1] config follows. If more info is needed
>>  just ask
>>
>>  [1] http://bugzilla.kernel.org/show_bug.cgi?id=13362
>
> Try disabling powersaving,
>
>        iwconfig wlan0 power off

I have an identical problem, which is fixed by this command.

It is possible to detect that the chip doesn't, for whatever reason,
support powersaving and disable it in the driver?

Thanks,

-- 

Julian Calaby

Email: julian.calaby@gmail.com
.Plan: http://sites.google.com/site/juliancalaby/

^ permalink raw reply

* Re: [rt2x00] rt2500pci is spamming syslogd since upgrade to 2.6.31
From: Ivo Van Doorn @ 2009-09-18  7:00 UTC (permalink / raw)
  To: Julian Calaby
  Cc: Alejandro Riveira Fernández, linux-kernel@vger.kernel.org,
	John W. Linville, linux-wireless@vger.kernel.org
In-Reply-To: <646765f40909172337g74b419fegd2935cb28aedb220@mail.gmail.com>

On Fri, Sep 18, 2009 at 8:37 AM, Julian Calaby <julian.calaby@gmail.com> wrote:
> 2009/9/16 Ivo van Doorn <ivdoorn@gmail.com>:
>> Hi,
>>
>>>  Hi; my syslog has many entries like this since the upgrade to 2.6.31
>>>
>>>  phy0 -> rt2500pci_set_device_state: Error - Device failed to enter state 1 (-16).
>>>
>>>  Sometimes the driver just start spamming like crazy sometimes is at less rate
>>>  sometimes it does not appear.
>>>
>>>  I'm running 2.6.31 with a revert [1] config follows. If more info is needed
>>>  just ask
>>>
>>>  [1] http://bugzilla.kernel.org/show_bug.cgi?id=13362
>>
>> Try disabling powersaving,
>>
>>        iwconfig wlan0 power off
>
> I have an identical problem, which is fixed by this command.
>
> It is possible to detect that the chip doesn't, for whatever reason,
> support powersaving and disable it in the driver?

Well I simply have to:
a) fix the driver to handle powersaving better
b) disable powersaving support for the driver

It will probably be (b) first followed by (a) much later if I ever
get the time to look into the issue.

Ivo

^ permalink raw reply

* Re: [rt2x00] rt2500pci is spamming syslogd since upgrade to 2.6.31
From: Julian Calaby @ 2009-09-18  7:14 UTC (permalink / raw)
  To: Ivo Van Doorn
  Cc: Alejandro Riveira Fernández, linux-kernel@vger.kernel.org,
	John W. Linville, linux-wireless@vger.kernel.org
In-Reply-To: <a32f33a40909180000m72d3f8cep3b97205e5ef1e26d@mail.gmail.com>

On Fri, Sep 18, 2009 at 17:00, Ivo Van Doorn <ivdoorn@gmail.com> wrote:
> On Fri, Sep 18, 2009 at 8:37 AM, Julian Calaby <julian.calaby@gmail.com> wrote:
>> 2009/9/16 Ivo van Doorn <ivdoorn@gmail.com>:
>>> Hi,
>>>
>>>>  Hi; my syslog has many entries like this since the upgrade to 2.6.31
>>>>
>>>>  phy0 -> rt2500pci_set_device_state: Error - Device failed to enter state 1 (-16).
>>>>
>>>>  Sometimes the driver just start spamming like crazy sometimes is at less rate
>>>>  sometimes it does not appear.
>>>>
>>>>  I'm running 2.6.31 with a revert [1] config follows. If more info is needed
>>>>  just ask
>>>>
>>>>  [1] http://bugzilla.kernel.org/show_bug.cgi?id=13362
>>>
>>> Try disabling powersaving,
>>>
>>>        iwconfig wlan0 power off
>>
>> I have an identical problem, which is fixed by this command.
>>
>> It is possible to detect that the chip doesn't, for whatever reason,
>> support powersaving and disable it in the driver?
>
> Well I simply have to:
> a) fix the driver to handle powersaving better
> b) disable powersaving support for the driver
>
> It will probably be (b) first followed by (a) much later if I ever
> get the time to look into the issue.

Fair enough.

I'll take a look if I get an opportunity.

Thanks,

-- 

Julian Calaby

Email: julian.calaby@gmail.com
.Plan: http://sites.google.com/site/juliancalaby/

^ permalink raw reply

* Re: regression?  No connection with master-2009-09-16 was fine until master-2009-09-14
From: Holger Schurig @ 2009-09-18  7:23 UTC (permalink / raw)
  To: Johannes Berg; +Cc: ASIC Felix, linux-wireless
In-Reply-To: <1253232542.23567.3.camel@johannes.local>

> I think wpa is the problem

Yeah, don't trust others (my) testing :-)

I only tested with WEP because this is where I previously had 
problems :-)

-- 
http://www.holgerschurig.de

^ permalink raw reply

* Re: [PATCH] libertas: Add auto deep sleep support for SD8385/SD8686/SD8688
From: Holger Schurig @ 2009-09-18  7:37 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior
  Cc: Andrey Yurovsky, Bing Zhao, Dan Williams, Amitkumar Karwar,
	linux-wireless@vger.kernel.org, libertas-dev@lists.infradead.org
In-Reply-To: <20090917161154.GA877@Chamillionaire.breakpoint.cc>

> I agree on this. Debugfs is for debug only and should stay
> that way. What do other driver in regard to this?

I see this now as an example where a Manufacturer (Marvell) 
starts to work with the community, has a nice feature (probably 
bacause of customer-request) and cannot get this into the kernel 
because of this issue :-)


Debugfs isn't suitable for anything except debugging. It is, per 
definition, an interface for developers that want to debug it. 
The idea is that a kernel for end-user devices won't even have 
debugfs compiled in.

If libertas currently does use debugfs for something != 
debugging?  I don't know, but than that has been a lapse, an 
oversight. Let's not do that oversight again.


So you can use

* iwpriv
* sysfs
* kernel module parameters
* nl80211/cfg80211
* Maybe the new "stable debugfs" proposed by Rostedt (see the
  Article "A stable debugfs" on http://lwn.net/Articles/350463/,
  but here it's not even clear that this will come).

For me, iwpriv seems the best candidate as long as libertas 
doesn't have a cfg80211/nl80211 interface.



> I hardly belive that the libertas driver is the only "deep
> sleep" user. 

I think that ATH6K WLAN devices might be candidates for this, 
too. If the interface is "iwpriv XXX deepsleep 0" / "iwpriv XXX 
deepsleep 1" I don't see a reason they could do it similar.


> iwconfig has an interface for this I think:
> |interface power {period N|timeout N|saving N|off}

That's something very differently.


-- 
http://www.holgerschurig.de

^ permalink raw reply

* Re: [PATCH 00/12] ath9k bug fixes
From: Luis R. Rodriguez @ 2009-09-18  7:59 UTC (permalink / raw)
  To: Sujith; +Cc: linville, linux-wireless
In-Reply-To: <19121.45772.489140.407518@gargle.gargle.HOWL>

On Wed, Sep 16, 2009 at 8:53 PM, Sujith <Sujith.Manoharan@atheros.com> wrote:
> John,
>
> A bunch of patches fixing various bugs in the driver.
> These apply on top of wireless-testing.
>
> Luis would rebase his pending patches on top of these
> and resend them.

John, here is my rebase of my 48 patches on top of this series. I
won't post them and instead give you this handy git am'able file.

http://bombadil.infradead.org/~mcgrof/patches/ath/2009/09/all-2009-09-18-mcgrof-rebased.patch

If you really need me to post them again please let me know.

If you want to get both sujith's collection series + mine in one file
here they are:

http://bombadil.infradead.org/~mcgrof/patches/ath/2009/09/all-2009-09-18.patch

  Luis

^ permalink raw reply

* Re: [PATCH 00/12] ath9k bug fixes
From: Luis R. Rodriguez @ 2009-09-18  8:01 UTC (permalink / raw)
  To: Sujith; +Cc: linville, linux-wireless
In-Reply-To: <43e72e890909180059h31f7d80bre1bab46e7e89c699@mail.gmail.com>

On Fri, Sep 18, 2009 at 12:59 AM, Luis R. Rodriguez <mcgrof@gmail.com> wrote:
> On Wed, Sep 16, 2009 at 8:53 PM, Sujith <Sujith.Manoharan@atheros.com> wrote:
>> John,
>>
>> A bunch of patches fixing various bugs in the driver.
>> These apply on top of wireless-testing.
>>
>> Luis would rebase his pending patches on top of these
>> and resend them.
>
> John, here is my rebase of my 48 patches on top of this series. I
> won't post them and instead give you this handy git am'able file.
>
> http://bombadil.infradead.org/~mcgrof/patches/ath/2009/09/all-2009-09-18-mcgrof-rebased.patch
>
> If you really need me to post them again please let me know.
>
> If you want to get both sujith's collection series + mine in one file
> here they are:
>
> http://bombadil.infradead.org/~mcgrof/patches/ath/2009/09/all-2009-09-18.patch

But I expect my series to only be applied after 2.6.32-rc1 is released.

  Luis

^ permalink raw reply

* [PATCH/REVIEW 0/9] ath9k update
From: Sujith @ 2009-09-18  9:33 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless

Hi John,

A bunch of fixes/cleanups.

These patches apply over the pending ath9k patches:
  - The inital series of bug fixes.
  - Luis' series.

Please apply.

Thanks,
Sujith

Senthil Balasubramanian (5):
  ath9k: Allow PSPOLL only when the interface is configured in AP mode.
  ath9k: Handle ATH9K_BEACON_RESET_TSF properly
  ath9k: Reduce PLL Settle time and eliminate redundant PLL calls.
  ath9k: Advertise midband for AR5416 devices
  ath9k: Fix bugs in handling TX power

Sujith (2):
  ath9k: Update INI release for AR9287
  ath9k: Fix RTC reset for AR5416

Vasanthakumar Thiagarajan (1):
  ath9k: Update initvals

Vivek Natarajan (1):
  ath9k: Add Calibration checks

 drivers/net/wireless/ath/ath9k/calib.c      |   82 ++++++++++++++--------
 drivers/net/wireless/ath/ath9k/eeprom.h     |    6 +-
 drivers/net/wireless/ath/ath9k/eeprom_4k.c  |    4 +-
 drivers/net/wireless/ath/ath9k/eeprom_def.c |  102 +++++++++++++++++++++++++-
 drivers/net/wireless/ath/ath9k/hw.c         |   36 +++++++--
 drivers/net/wireless/ath/ath9k/hw.h         |    4 +-
 drivers/net/wireless/ath/ath9k/initvals.h   |   72 +++++++++++--------
 drivers/net/wireless/ath/ath9k/phy.c        |   25 +++++--
 drivers/net/wireless/ath/ath9k/recv.c       |    5 +-
 9 files changed, 253 insertions(+), 83 deletions(-)


^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox