diff options
author | Christian Lamparter <chunkeey@web.de> | 2008-09-01 16:48:41 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-09-05 16:17:47 -0400 |
commit | 4e416a6f49b710bfe162f0cb24bc68c74493d2a0 (patch) | |
tree | 76e4a5e4a7e1cd65b142d841e5134404f970a99d /drivers/net/wireless/p54/p54.h | |
parent | 0c25970dc1b0d46f2357e7c4b267ab7b93eb7cdd (diff) |
p54: enhance firmware parser to reduce memory waste
This patch greatly reduces one of biggest memory waste in the driver.
The firmware headers provides the right values for extra head-/tailroom
and mtu size which are usually much lower than the old hardcoded ones.
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/p54/p54.h')
-rw-r--r-- | drivers/net/wireless/p54/p54.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/p54/p54.h b/drivers/net/wireless/p54/p54.h index fca8762fa069..b03d13edc61f 100644 --- a/drivers/net/wireless/p54/p54.h +++ b/drivers/net/wireless/p54/p54.h | |||
@@ -39,7 +39,6 @@ struct p54_control_hdr { | |||
39 | } __attribute__ ((packed)); | 39 | } __attribute__ ((packed)); |
40 | 40 | ||
41 | #define EEPROM_READBACK_LEN (sizeof(struct p54_control_hdr) + 4 /* p54_eeprom_lm86 */) | 41 | #define EEPROM_READBACK_LEN (sizeof(struct p54_control_hdr) + 4 /* p54_eeprom_lm86 */) |
42 | #define MAX_RX_SIZE (IEEE80211_MAX_RTS_THRESHOLD + sizeof(struct p54_control_hdr) + 20 /* length of struct p54_rx_hdr */ + 16 ) | ||
43 | 42 | ||
44 | #define ISL38XX_DEV_FIRMWARE_ADDR 0x20000 | 43 | #define ISL38XX_DEV_FIRMWARE_ADDR 0x20000 |
45 | 44 | ||
@@ -53,6 +52,9 @@ struct p54_common { | |||
53 | void (*stop)(struct ieee80211_hw *dev); | 52 | void (*stop)(struct ieee80211_hw *dev); |
54 | int mode; | 53 | int mode; |
55 | u16 seqno; | 54 | u16 seqno; |
55 | u16 rx_mtu; | ||
56 | u8 headroom; | ||
57 | u8 tailroom; | ||
56 | struct mutex conf_mutex; | 58 | struct mutex conf_mutex; |
57 | u8 mac_addr[ETH_ALEN]; | 59 | u8 mac_addr[ETH_ALEN]; |
58 | u8 bssid[ETH_ALEN]; | 60 | u8 bssid[ETH_ALEN]; |
@@ -70,7 +72,7 @@ struct p54_common { | |||
70 | }; | 72 | }; |
71 | 73 | ||
72 | int p54_rx(struct ieee80211_hw *dev, struct sk_buff *skb); | 74 | int p54_rx(struct ieee80211_hw *dev, struct sk_buff *skb); |
73 | void p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw); | 75 | int p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw); |
74 | int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len); | 76 | int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len); |
75 | void p54_fill_eeprom_readback(struct p54_control_hdr *hdr); | 77 | void p54_fill_eeprom_readback(struct p54_control_hdr *hdr); |
76 | struct ieee80211_hw *p54_init_common(size_t priv_data_len); | 78 | struct ieee80211_hw *p54_init_common(size_t priv_data_len); |