aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ipw2200.h
diff options
context:
space:
mode:
authorZhu Yi <yi.zhu@intel.com>2006-01-24 03:37:28 -0500
committerJohn W. Linville <linville@tuxdriver.com>2006-01-30 20:35:34 -0500
commit0a7bcf261ea584c87a9cee4523023fa74168de4a (patch)
treef5ccb4cf6b3e376bbb16a1a0cb12b700b58ba928 /drivers/net/wireless/ipw2200.h
parent397ae121ee0116d3b4125d621f0ef528d1d52580 (diff)
[PATCH] ipw2200: stack reduction
Checking the stack usage of my kernel, showed that ipw2200 had a few bad offenders. This is on i386 32-bit: 0x00002876 ipw_send_associate: 544 0x000028ee ipw_send_associate: 544 0x000027dc ipw_send_scan_request_ext: 520 0x00002864 ipw_set_sensitivity: 520 0x00005eac ipw_set_rsn_capa: 520 The reason is the host_cmd structure is large (500 bytes). All other functions currently using ipw_send_cmd() suffer from the same problem. This patch introduces ipw_send_cmd_simple() for commands with no data transfer, and ipw_send_cmd_pdu() for commands with a data payload and makes the payload a pointer to the buffer passed in from the caller. As an added bonus, the diffstat looks like this: ipw2200.c | 260 +++++++++++++++++++++----------------------------------------- ipw2200.h | 2 2 files changed, 92 insertions(+), 170 deletions(-) and it shrinks the module a lot as well: Before: text data bss dec hex filename 75177 2472 44 77693 12f7d drivers/net/wireless/ipw2200.ko After: text data bss dec hex filename 61363 2488 44 63895 f997 drivers/net/wireless/ipw2200.ko So about a ~18% reduction in module size. Signed-off-by: Jens Axboe <axboe@suse.de> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ipw2200.h')
-rw-r--r--drivers/net/wireless/ipw2200.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ipw2200.h b/drivers/net/wireless/ipw2200.h
index 04a0c26cab84..c09888b1f1f8 100644
--- a/drivers/net/wireless/ipw2200.h
+++ b/drivers/net/wireless/ipw2200.h
@@ -1866,7 +1866,7 @@ struct host_cmd {
1866 u8 cmd; 1866 u8 cmd;
1867 u8 len; 1867 u8 len;
1868 u16 reserved; 1868 u16 reserved;
1869 u32 param[TFD_CMD_IMMEDIATE_PAYLOAD_LENGTH]; 1869 u32 *param;
1870} __attribute__ ((packed)); 1870} __attribute__ ((packed));
1871 1871
1872struct ipw_cmd_log { 1872struct ipw_cmd_log {