o wl3501: kill wl3501_mac_addr, to follow the de-facto standard for mac addrs

parent e8556c4b
......@@ -426,13 +426,6 @@ struct wl3501_resync_req {
/* For rough constant delay */
#define WL3501_NOPLOOP(n) { int x = 0; while (x++ < n) slow_down_io(); }
/* Ethernet MAC addr, BSS_ID, or ESS_ID */
/* With this, we may simply write "x=y;" instead of "memcpy(x, y, 6);" */
/* It's more efficiency with compiler's optimization and more clearly */
struct wl3501_mac_addr {
u8 b0, b1, b2, b3, b4, b5;
} __attribute__ ((packed));
/* Definitions for supporting clone adapters. */
/* System Interface Registers (SIR space) */
#define WL3501_NIC_GCR ((u8)0x00) /* SIR0 - General Conf Register */
......@@ -504,7 +497,7 @@ struct wl3501_80211_tx_hdr {
struct wl3501_card {
int base_addr;
struct wl3501_mac_addr mac_addr;
unsigned char mac_addr[ETH_ALEN];
spinlock_t lock;
wait_queue_head_t wait;
struct wl3501_get_confirm sig_get_confirm;
......@@ -521,7 +514,7 @@ struct wl3501_card {
u16 esbq_confirm;
u8 llc_type;
u8 essid[WL3501_ESSID_MAX_LEN];
struct wl3501_mac_addr bssid;
unsigned char bssid[ETH_ALEN];
int ether_type;
int net_type;
u8 keep_essid[WL3501_ESSID_MAX_LEN];
......
......@@ -163,17 +163,17 @@ static int wl3501_get_flash_mac_addr(struct wl3501_card *this)
/* wait for reading EEPROM */
WL3501_NOPLOOP(100);
this->mac_addr.b0 = inb(base_addr + WL3501_NIC_IODPA);
this->mac_addr[0] = inb(base_addr + WL3501_NIC_IODPA);
WL3501_NOPLOOP(100);
this->mac_addr.b1 = inb(base_addr + WL3501_NIC_IODPA);
this->mac_addr[1] = inb(base_addr + WL3501_NIC_IODPA);
WL3501_NOPLOOP(100);
this->mac_addr.b2 = inb(base_addr + WL3501_NIC_IODPA);
this->mac_addr[2] = inb(base_addr + WL3501_NIC_IODPA);
WL3501_NOPLOOP(100);
this->mac_addr.b3 = inb(base_addr + WL3501_NIC_IODPA);
this->mac_addr[3] = inb(base_addr + WL3501_NIC_IODPA);
WL3501_NOPLOOP(100);
this->mac_addr.b4 = inb(base_addr + WL3501_NIC_IODPA);
this->mac_addr[4] = inb(base_addr + WL3501_NIC_IODPA);
WL3501_NOPLOOP(100);
this->mac_addr.b5 = inb(base_addr + WL3501_NIC_IODPA);
this->mac_addr[5] = inb(base_addr + WL3501_NIC_IODPA);
WL3501_NOPLOOP(100);
this->freq_domain = inb(base_addr + WL3501_NIC_IODPA);
WL3501_NOPLOOP(100);
......@@ -188,7 +188,7 @@ static int wl3501_get_flash_mac_addr(struct wl3501_card *this)
wl3501_switch_page(this, WL3501_BSS_SPAGE0);
/* The MAC addr should be 00:60:... */
return this->mac_addr.b0 == 0x00 && this->mac_addr.b1 == 0x60;
return this->mac_addr[0] == 0x00 && this->mac_addr[1] == 0x60;
}
/**
......@@ -358,7 +358,7 @@ static int wl3501_get_mib_value(struct wl3501_card *this, u8 index,
* Send a packet.
*
* data = Ethernet raw frame. (e.g. data[0] - data[5] is Dest MAC Addr,
* data[6] - data[11] is Src MAC Addr)
* data[6] - data[11] is Src MAC Addr)
* Ref: IEEE 802.11
*/
static int wl3501_send_pkt(struct wl3501_card *this, u8 *data, u16 len)
......@@ -817,8 +817,8 @@ static void wl3501_online(struct net_device *dev)
printk(KERN_INFO "%s: Wireless LAN online. BSSID: "
"%02X %02X %02X %02X %02X %02X\n", dev->name,
this->bssid.b0, this->bssid.b1, this->bssid.b2,
this->bssid.b3, this->bssid.b4, this->bssid.b5);
this->bssid[0], this->bssid[1], this->bssid[2],
this->bssid[3], this->bssid[4], this->bssid[5]);
netif_wake_queue(dev);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment