aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2010-02-26 16:58:18 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-02-26 16:58:18 -0500
commitbe41f5c7e3688a4555d7fbaa09578fd628bb4cdf (patch)
tree00cbd312faf655670909ff3c3418f8f2dd664799 /drivers
parent64463da913bc8f791980ba28d93ac5e716ab9cc5 (diff)
parent89612124d6d62230043ebd827a2b54ea5ea5280c (diff)
Merge branch 'wireless-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-commands.h1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-tx.c11
2 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h
index ab3c77b92cc8..6383d9f8c9b3 100644
--- a/drivers/net/wireless/iwlwifi/iwl-commands.h
+++ b/drivers/net/wireless/iwlwifi/iwl-commands.h
@@ -2623,6 +2623,7 @@ struct iwl_ssid_ie {
2623#define TX_CMD_LIFE_TIME_INFINITE cpu_to_le32(0xFFFFFFFF) 2623#define TX_CMD_LIFE_TIME_INFINITE cpu_to_le32(0xFFFFFFFF)
2624#define IWL_GOOD_CRC_TH cpu_to_le16(1) 2624#define IWL_GOOD_CRC_TH cpu_to_le16(1)
2625#define IWL_MAX_SCAN_SIZE 1024 2625#define IWL_MAX_SCAN_SIZE 1024
2626#define IWL_MAX_CMD_SIZE 4096
2626#define IWL_MAX_PROBE_REQUEST 200 2627#define IWL_MAX_PROBE_REQUEST 200
2627 2628
2628/* 2629/*
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
index 10701b8eef23..1ed5206721ec 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -364,7 +364,7 @@ int iwl_tx_queue_init(struct iwl_priv *priv, struct iwl_tx_queue *txq,
364 for (i = 0; i < actual_slots; i++) { 364 for (i = 0; i < actual_slots; i++) {
365 /* only happens for cmd queue */ 365 /* only happens for cmd queue */
366 if (i == slots_num) 366 if (i == slots_num)
367 len += IWL_MAX_SCAN_SIZE; 367 len = IWL_MAX_CMD_SIZE;
368 368
369 txq->cmd[i] = kmalloc(len, GFP_KERNEL); 369 txq->cmd[i] = kmalloc(len, GFP_KERNEL);
370 if (!txq->cmd[i]) 370 if (!txq->cmd[i])
@@ -1023,9 +1023,12 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
1023 1023
1024 /* If any of the command structures end up being larger than 1024 /* If any of the command structures end up being larger than
1025 * the TFD_MAX_PAYLOAD_SIZE, and it sent as a 'small' command then 1025 * the TFD_MAX_PAYLOAD_SIZE, and it sent as a 'small' command then
1026 * we will need to increase the size of the TFD entries */ 1026 * we will need to increase the size of the TFD entries
1027 * Also, check to see if command buffer should not exceed the size
1028 * of device_cmd and max_cmd_size. */
1027 BUG_ON((fix_size > TFD_MAX_PAYLOAD_SIZE) && 1029 BUG_ON((fix_size > TFD_MAX_PAYLOAD_SIZE) &&
1028 !(cmd->flags & CMD_SIZE_HUGE)); 1030 !(cmd->flags & CMD_SIZE_HUGE));
1031 BUG_ON(fix_size > IWL_MAX_CMD_SIZE);
1029 1032
1030 if (iwl_is_rfkill(priv) || iwl_is_ctkill(priv)) { 1033 if (iwl_is_rfkill(priv) || iwl_is_ctkill(priv)) {
1031 IWL_WARN(priv, "Not sending command - %s KILL\n", 1034 IWL_WARN(priv, "Not sending command - %s KILL\n",
@@ -1069,8 +1072,8 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
1069 if (cmd->flags & CMD_SIZE_HUGE) 1072 if (cmd->flags & CMD_SIZE_HUGE)
1070 out_cmd->hdr.sequence |= SEQ_HUGE_FRAME; 1073 out_cmd->hdr.sequence |= SEQ_HUGE_FRAME;
1071 len = sizeof(struct iwl_device_cmd); 1074 len = sizeof(struct iwl_device_cmd);
1072 len += (idx == TFD_CMD_SLOTS) ? IWL_MAX_SCAN_SIZE : 0; 1075 if (idx == TFD_CMD_SLOTS)
1073 1076 len = IWL_MAX_CMD_SIZE;
1074 1077
1075#ifdef CONFIG_IWLWIFI_DEBUG 1078#ifdef CONFIG_IWLWIFI_DEBUG
1076 switch (out_cmd->hdr.cmd) { 1079 switch (out_cmd->hdr.cmd) {