summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/p54/p54.h
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@web.de>2008-09-01 22:48:41 +0200
committerJohn W. Linville <linville@tuxdriver.com>2008-09-05 16:17:47 -0400
commit4e416a6f49b710bfe162f0cb24bc68c74493d2a0 (patch)
tree76e4a5e4a7e1cd65b142d841e5134404f970a99d /drivers/net/wireless/p54/p54.h
parent0c25970dc1b0d46f2357e7c4b267ab7b93eb7cdd (diff)
downloadop-kernel-dev-4e416a6f49b710bfe162f0cb24bc68c74493d2a0.zip
op-kernel-dev-4e416a6f49b710bfe162f0cb24bc68c74493d2a0.tar.gz
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.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/p54/p54.h b/drivers/net/wireless/p54/p54.h
index fca8762..b03d13e 100644
--- a/drivers/net/wireless/p54/p54.h
+++ b/drivers/net/wireless/p54/p54.h
@@ -39,7 +39,6 @@ struct p54_control_hdr {
} __attribute__ ((packed));
#define EEPROM_READBACK_LEN (sizeof(struct p54_control_hdr) + 4 /* p54_eeprom_lm86 */)
-#define MAX_RX_SIZE (IEEE80211_MAX_RTS_THRESHOLD + sizeof(struct p54_control_hdr) + 20 /* length of struct p54_rx_hdr */ + 16 )
#define ISL38XX_DEV_FIRMWARE_ADDR 0x20000
@@ -53,6 +52,9 @@ struct p54_common {
void (*stop)(struct ieee80211_hw *dev);
int mode;
u16 seqno;
+ u16 rx_mtu;
+ u8 headroom;
+ u8 tailroom;
struct mutex conf_mutex;
u8 mac_addr[ETH_ALEN];
u8 bssid[ETH_ALEN];
@@ -70,7 +72,7 @@ struct p54_common {
};
int p54_rx(struct ieee80211_hw *dev, struct sk_buff *skb);
-void p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw);
+int p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw);
int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len);
void p54_fill_eeprom_readback(struct p54_control_hdr *hdr);
struct ieee80211_hw *p54_init_common(size_t priv_data_len);
OpenPOWER on IntegriCloud