22 #include <linux/export.h>
23 #include <ar231x_platform.h>
40 struct ar231x_board_config *bcfg = pdev->
dev.platform_data;
45 bcfg = pdev->
dev.platform_data;
46 eeprom = (
u16 *) bcfg->radio;
47 eeprom_end = ((
void *) bcfg->config) + BOARD_CONFIG_BUFSZ;
50 if (eeprom > eeprom_end)
60 struct ar231x_board_config *bcfg = pdev->
dev.platform_data;
65 static int ath5k_ahb_eeprom_read_mac(
struct ath5k_hw *ah,
u8 *
mac)
68 struct ar231x_board_config *bcfg = pdev->
dev.platform_data;
72 cfg_mac = bcfg->config->wlan0_mac;
74 cfg_mac = bcfg->config->wlan1_mac;
82 .read_cachesize = ath5k_ahb_read_cachesize,
83 .eeprom_read = ath5k_ahb_eeprom_read,
84 .eeprom_read_mac = ath5k_ahb_eeprom_read_mac,
90 struct ar231x_board_config *bcfg = pdev->
dev.platform_data;
99 if (!pdev->
dev.platform_data) {
100 dev_err(&pdev->
dev,
"no platform data specified\n");
107 dev_err(&pdev->
dev,
"no memory resource found\n");
121 dev_err(&pdev->
dev,
"no IRQ resource found\n");
130 dev_err(&pdev->
dev,
"no memory for ieee80211_hw\n");
140 ah->
devid = bcfg->devid;
168 (bcfg->config->flags & (BD_WLAN0 | BD_WLAN1)) ==
169 (BD_WLAN1 | BD_WLAN0))
177 dev_err(&pdev->
dev,
"failed to attach device, err=%d\n", ret);
182 platform_set_drvdata(pdev, hw);
188 platform_set_drvdata(pdev,
NULL);
197 struct ar231x_board_config *bcfg = pdev->
dev.platform_data;
224 platform_set_drvdata(pdev,
NULL);
231 .probe = ath_ahb_probe,
232 .remove = ath_ahb_remove,
234 .name =
"ar231x-wmac",