diff options
author | Christian Lamparter <chunkeey@web.de> | 2008-09-01 20:48:51 (GMT) |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-09-05 20:17:48 (GMT) |
commit | 7cb770729ba895f73253dfcd46c3fcba45d896f9 (patch) | |
tree | 8a970a683779490b478b9737154cb5d2e792c0a5 /drivers/net/wireless/p54/p54.h | |
parent | 4e416a6f49b710bfe162f0cb24bc68c74493d2a0 (diff) | |
download | linux-fsl-qoriq-7cb770729ba895f73253dfcd46c3fcba45d896f9.tar.xz |
p54: move eeprom code into common library
Both p54pci and p54usb uses a good chunk of device specific code to
get the data from the device's eeprom into the drivers memory.
So, this patch reduces the code size and will it make life easier if
someone wants to implement ethtool eeprom dumping features.
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 | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/p54/p54.h b/drivers/net/wireless/p54/p54.h index b03d13e..3d44ab3 100644 --- a/drivers/net/wireless/p54/p54.h +++ b/drivers/net/wireless/p54/p54.h @@ -38,7 +38,7 @@ struct p54_control_hdr { u8 data[0]; } __attribute__ ((packed)); -#define EEPROM_READBACK_LEN (sizeof(struct p54_control_hdr) + 4 /* p54_eeprom_lm86 */) +#define EEPROM_READBACK_LEN 0x3fc #define ISL38XX_DEV_FIRMWARE_ADDR 0x20000 @@ -63,18 +63,19 @@ struct p54_common { struct pda_channel_output_limit *output_limit; unsigned int output_limit_len; struct pda_pa_curve_data *curve_data; - __le16 rxhw; + u16 rxhw; u8 version; unsigned int tx_hdr_len; void *cached_vdcf; unsigned int fw_var; struct ieee80211_tx_queue_stats tx_stats[8]; + void *eeprom; + struct completion eeprom_comp; }; int p54_rx(struct ieee80211_hw *dev, struct sk_buff *skb); 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); +int p54_read_eeprom(struct ieee80211_hw *dev); struct ieee80211_hw *p54_init_common(size_t priv_data_len); void p54_free_common(struct ieee80211_hw *dev); |