aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ipw
diff options
context:
space:
mode:
authorSam Leffler <sam@FreeBSD.org>2009-03-29 17:59:14 +0000
committerSam Leffler <sam@FreeBSD.org>2009-03-29 17:59:14 +0000
commit29aca940805022fa5b7d02641f5309e67ab1f765 (patch)
tree8bb42581e6c46229c54ff76ee3fd9dd1e507f939 /sys/dev/ipw
parentbc421492207268208d3ebab96f6c8f9c05525cb2 (diff)
downloadsrc-29aca940805022fa5b7d02641f5309e67ab1f765.tar.gz
src-29aca940805022fa5b7d02641f5309e67ab1f765.zip
Eliminate ic_myaddr so changing the mac address of a device works correctly:
o remove ic_myaddr from ieee80211com o change ieee80211_ifattach to take the mac address of the physical device and use that to setup the lladdr. o replace all references to ic_myaddr in drivers by IF_LLADDR o related cleanups (e.g. kill dead code) PR: kern/133178 Reviewed by: thompsa, rpaulo
Notes
Notes: svn path=/head/; revision=190526
Diffstat (limited to 'sys/dev/ipw')
-rw-r--r--sys/dev/ipw/if_ipw.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/dev/ipw/if_ipw.c b/sys/dev/ipw/if_ipw.c
index b20d3f6f5fb5..f7c3ea59a2fd 100644
--- a/sys/dev/ipw/if_ipw.c
+++ b/sys/dev/ipw/if_ipw.c
@@ -231,6 +231,7 @@ ipw_attach(device_t dev)
struct ieee80211_channel *c;
uint16_t val;
int error, i;
+ uint8_t macaddr[IEEE80211_ADDR_LEN];
sc->sc_dev = dev;
@@ -315,14 +316,14 @@ ipw_attach(device_t dev)
/* read MAC address from EEPROM */
val = ipw_read_prom_word(sc, IPW_EEPROM_MAC + 0);
- ic->ic_myaddr[0] = val >> 8;
- ic->ic_myaddr[1] = val & 0xff;
+ macaddr[0] = val >> 8;
+ macaddr[1] = val & 0xff;
val = ipw_read_prom_word(sc, IPW_EEPROM_MAC + 1);
- ic->ic_myaddr[2] = val >> 8;
- ic->ic_myaddr[3] = val & 0xff;
+ macaddr[2] = val >> 8;
+ macaddr[3] = val & 0xff;
val = ipw_read_prom_word(sc, IPW_EEPROM_MAC + 2);
- ic->ic_myaddr[4] = val >> 8;
- ic->ic_myaddr[5] = val & 0xff;
+ macaddr[4] = val >> 8;
+ macaddr[5] = val & 0xff;
/* set supported .11b channels (read from EEPROM) */
if ((val = ipw_read_prom_word(sc, IPW_EEPROM_CHANNEL_LIST)) == 0)
@@ -341,7 +342,7 @@ ipw_attach(device_t dev)
if (!(ipw_read_prom_word(sc, IPW_EEPROM_RADIO) & 8))
sc->flags |= IPW_FLAG_HAS_RADIO_SWITCH;
- ieee80211_ifattach(ic);
+ ieee80211_ifattach(ic, macaddr);
ic->ic_scan_start = ipw_scan_start;
ic->ic_scan_end = ipw_scan_end;
ic->ic_set_channel = ipw_set_channel;