aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2008-01-26 11:09:36 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-31 22:26:49 -0500
commit18904f5839336d7d047fdb20a9e7db87f2942ec9 (patch)
tree2a781e080629422eb45b86226d7ad236c7bd07c0 /drivers/net/wireless
parentfdfb92eab5a60f3060d4513182212d5ca9913cd1 (diff)
wireless: iwlwifi3945/4965 - fix incorrect counting of memory
This patch does fix incorrect counting of memory allocated by kmalloc. It seems that could lead to allocated memory overrun and corrupt nearlaid memory area. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 5d8965e0b900..33239f197984 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -6628,7 +6628,7 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
6628 * that based on the direct_mask added to each channel entry */ 6628 * that based on the direct_mask added to each channel entry */
6629 scan->tx_cmd.len = cpu_to_le16( 6629 scan->tx_cmd.len = cpu_to_le16(
6630 iwl3945_fill_probe_req(priv, (struct ieee80211_mgmt *)scan->data, 6630 iwl3945_fill_probe_req(priv, (struct ieee80211_mgmt *)scan->data,
6631 IWL_MAX_SCAN_SIZE - sizeof(scan), 0)); 6631 IWL_MAX_SCAN_SIZE - sizeof(*scan), 0));
6632 scan->tx_cmd.tx_flags = TX_CMD_FLG_SEQ_CTL_MSK; 6632 scan->tx_cmd.tx_flags = TX_CMD_FLG_SEQ_CTL_MSK;
6633 scan->tx_cmd.sta_id = priv->hw_setting.bcast_sta_id; 6633 scan->tx_cmd.sta_id = priv->hw_setting.bcast_sta_id;
6634 scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE; 6634 scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE;
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index abdce17f60e6..bf3a60c037aa 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -7046,7 +7046,7 @@ static void iwl4965_bg_request_scan(struct work_struct *data)
7046 * that based on the direct_mask added to each channel entry */ 7046 * that based on the direct_mask added to each channel entry */
7047 scan->tx_cmd.len = cpu_to_le16( 7047 scan->tx_cmd.len = cpu_to_le16(
7048 iwl4965_fill_probe_req(priv, (struct ieee80211_mgmt *)scan->data, 7048 iwl4965_fill_probe_req(priv, (struct ieee80211_mgmt *)scan->data,
7049 IWL_MAX_SCAN_SIZE - sizeof(scan), 0)); 7049 IWL_MAX_SCAN_SIZE - sizeof(*scan), 0));
7050 scan->tx_cmd.tx_flags = TX_CMD_FLG_SEQ_CTL_MSK; 7050 scan->tx_cmd.tx_flags = TX_CMD_FLG_SEQ_CTL_MSK;
7051 scan->tx_cmd.sta_id = priv->hw_setting.bcast_sta_id; 7051 scan->tx_cmd.sta_id = priv->hw_setting.bcast_sta_id;
7052 scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE; 7052 scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE;