diff options
author | Moritz Muehlenhoff <jmm@debian.org> | 2009-01-21 16:00:41 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-04-03 17:53:16 -0400 |
commit | 28b17a4bdf148b7591c004efd10a8850d52849ec (patch) | |
tree | f5efadf76aa6850d79f475e5f16e2160450341f3 /drivers/staging/wlan-ng | |
parent | 9cba46dc1c1c98d9e1c44be7b8d435ad553f799e (diff) |
Staging: wlan-ng: Remove use of WLAN_ADDR_LEN
Replace the driver local WLAN_ADDR_LEN constant through the kernel-wide ETH_ALEN definiton.
Signed-off-by: Moritz Muehlenhoff <jmm@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/wlan-ng')
-rw-r--r-- | drivers/staging/wlan-ng/hfa384x.h | 32 | ||||
-rw-r--r-- | drivers/staging/wlan-ng/p80211conv.c | 18 | ||||
-rw-r--r-- | drivers/staging/wlan-ng/p80211hdr.h | 19 | ||||
-rw-r--r-- | drivers/staging/wlan-ng/p80211netdev.c | 7 | ||||
-rw-r--r-- | drivers/staging/wlan-ng/p80211wext.c | 5 | ||||
-rw-r--r-- | drivers/staging/wlan-ng/prism2sta.c | 21 |
6 files changed, 54 insertions, 48 deletions
diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h index f7d69e084e6..b88bfe43782 100644 --- a/drivers/staging/wlan-ng/hfa384x.h +++ b/drivers/staging/wlan-ng/hfa384x.h | |||
@@ -61,6 +61,8 @@ | |||
61 | 61 | ||
62 | #define HFA384x_LEVEL_TO_dBm(v) (0x100 + (v) * 100 / 255 - 100) | 62 | #define HFA384x_LEVEL_TO_dBm(v) (0x100 + (v) * 100 / 255 - 100) |
63 | 63 | ||
64 | #include <linux/if_ether.h> | ||
65 | |||
64 | /*------ Constants --------------------------------------------*/ | 66 | /*------ Constants --------------------------------------------*/ |
65 | /*--- Mins & Maxs -----------------------------------*/ | 67 | /*--- Mins & Maxs -----------------------------------*/ |
66 | #define HFA384x_CMD_ALLOC_LEN_MIN ((u16)4) | 68 | #define HFA384x_CMD_ALLOC_LEN_MIN ((u16)4) |
@@ -450,7 +452,7 @@ Configuration RID Lengths: Network Param, Dynamic Config Entities | |||
450 | include the len or code fields) | 452 | include the len or code fields) |
451 | --------------------------------------------------------------------*/ | 453 | --------------------------------------------------------------------*/ |
452 | /* TODO: fill in the rest of these */ | 454 | /* TODO: fill in the rest of these */ |
453 | #define HFA384x_RID_GROUPADDR_LEN ((u16)16 * WLAN_ADDR_LEN) | 455 | #define HFA384x_RID_GROUPADDR_LEN ((u16)16 * ETH_ALEN) |
454 | #define HFA384x_RID_CREATEIBSS_LEN ((u16)0) | 456 | #define HFA384x_RID_CREATEIBSS_LEN ((u16)0) |
455 | #define HFA384x_RID_FRAGTHRESH_LEN ((u16)0) | 457 | #define HFA384x_RID_FRAGTHRESH_LEN ((u16)0) |
456 | #define HFA384x_RID_RTSTHRESH_LEN ((u16)0) | 458 | #define HFA384x_RID_RTSTHRESH_LEN ((u16)0) |
@@ -1130,7 +1132,7 @@ typedef struct hfa384x_JoinRequest_data | |||
1130 | /*-- Configuration Record: authenticateStation (data portion only) --*/ | 1132 | /*-- Configuration Record: authenticateStation (data portion only) --*/ |
1131 | typedef struct hfa384x_authenticateStation_data | 1133 | typedef struct hfa384x_authenticateStation_data |
1132 | { | 1134 | { |
1133 | u8 address[WLAN_ADDR_LEN]; | 1135 | u8 address[ETH_ALEN]; |
1134 | u16 status; | 1136 | u16 status; |
1135 | u16 algorithm; | 1137 | u16 algorithm; |
1136 | } __attribute__((packed)) hfa384x_authenticateStation_data_t; | 1138 | } __attribute__((packed)) hfa384x_authenticateStation_data_t; |
@@ -1138,7 +1140,7 @@ typedef struct hfa384x_authenticateStation_data | |||
1138 | /*-- Configuration Record: associateStation (data portion only) --*/ | 1140 | /*-- Configuration Record: associateStation (data portion only) --*/ |
1139 | typedef struct hfa384x_associateStation_data | 1141 | typedef struct hfa384x_associateStation_data |
1140 | { | 1142 | { |
1141 | u8 address[WLAN_ADDR_LEN]; | 1143 | u8 address[ETH_ALEN]; |
1142 | u16 status; | 1144 | u16 status; |
1143 | u16 type; | 1145 | u16 type; |
1144 | } __attribute__((packed)) hfa384x_associateStation_data_t; | 1146 | } __attribute__((packed)) hfa384x_associateStation_data_t; |
@@ -1153,7 +1155,7 @@ typedef struct hfa384x_ChannelInfoRequest_data | |||
1153 | /*-- Configuration Record: WEPKeyMapping (data portion only) --*/ | 1155 | /*-- Configuration Record: WEPKeyMapping (data portion only) --*/ |
1154 | typedef struct hfa384x_WEPKeyMapping | 1156 | typedef struct hfa384x_WEPKeyMapping |
1155 | { | 1157 | { |
1156 | u8 address[WLAN_ADDR_LEN]; | 1158 | u8 address[ETH_ALEN]; |
1157 | u16 key_index; | 1159 | u16 key_index; |
1158 | u8 key[16]; | 1160 | u8 key[16]; |
1159 | u8 mic_transmit_key[4]; | 1161 | u8 mic_transmit_key[4]; |
@@ -1880,9 +1882,9 @@ typedef struct hfa384x_LinkStatus | |||
1880 | typedef struct hfa384x_AssocStatus | 1882 | typedef struct hfa384x_AssocStatus |
1881 | { | 1883 | { |
1882 | u16 assocstatus; | 1884 | u16 assocstatus; |
1883 | u8 sta_addr[WLAN_ADDR_LEN]; | 1885 | u8 sta_addr[ETH_ALEN]; |
1884 | /* old_ap_addr is only valid if assocstatus == 2 */ | 1886 | /* old_ap_addr is only valid if assocstatus == 2 */ |
1885 | u8 old_ap_addr[WLAN_ADDR_LEN]; | 1887 | u8 old_ap_addr[ETH_ALEN]; |
1886 | u16 reason; | 1888 | u16 reason; |
1887 | u16 reserved; | 1889 | u16 reserved; |
1888 | } __attribute__((packed)) hfa384x_AssocStatus_t; | 1890 | } __attribute__((packed)) hfa384x_AssocStatus_t; |
@@ -1891,7 +1893,7 @@ typedef struct hfa384x_AssocStatus | |||
1891 | 1893 | ||
1892 | typedef struct hfa384x_AuthRequest | 1894 | typedef struct hfa384x_AuthRequest |
1893 | { | 1895 | { |
1894 | u8 sta_addr[WLAN_ADDR_LEN]; | 1896 | u8 sta_addr[ETH_ALEN]; |
1895 | u16 algorithm; | 1897 | u16 algorithm; |
1896 | } __attribute__((packed)) hfa384x_AuthReq_t; | 1898 | } __attribute__((packed)) hfa384x_AuthReq_t; |
1897 | 1899 | ||
@@ -1899,7 +1901,7 @@ typedef struct hfa384x_AuthRequest | |||
1899 | 1901 | ||
1900 | typedef struct hfa384x_AssocRequest | 1902 | typedef struct hfa384x_AssocRequest |
1901 | { | 1903 | { |
1902 | u8 sta_addr[WLAN_ADDR_LEN]; | 1904 | u8 sta_addr[ETH_ALEN]; |
1903 | u16 type; | 1905 | u16 type; |
1904 | u8 wpa_data[80]; | 1906 | u8 wpa_data[80]; |
1905 | } __attribute__((packed)) hfa384x_AssocReq_t; | 1907 | } __attribute__((packed)) hfa384x_AssocReq_t; |
@@ -1912,8 +1914,8 @@ typedef struct hfa384x_AssocRequest | |||
1912 | 1914 | ||
1913 | typedef struct hfa384x_MicFailure | 1915 | typedef struct hfa384x_MicFailure |
1914 | { | 1916 | { |
1915 | u8 sender[WLAN_ADDR_LEN]; | 1917 | u8 sender[ETH_ALEN]; |
1916 | u8 dest[WLAN_ADDR_LEN]; | 1918 | u8 dest[ETH_ALEN]; |
1917 | } __attribute__((packed)) hfa384x_MicFailure_t; | 1919 | } __attribute__((packed)) hfa384x_MicFailure_t; |
1918 | 1920 | ||
1919 | /*-- Unsolicited Frame, MAC Mgmt: PSUserCount (AP Only) --*/ | 1921 | /*-- Unsolicited Frame, MAC Mgmt: PSUserCount (AP Only) --*/ |
@@ -1925,7 +1927,7 @@ typedef struct hfa384x_PSUserCount | |||
1925 | 1927 | ||
1926 | typedef struct hfa384x_KeyIDChanged | 1928 | typedef struct hfa384x_KeyIDChanged |
1927 | { | 1929 | { |
1928 | u8 sta_addr[WLAN_ADDR_LEN]; | 1930 | u8 sta_addr[ETH_ALEN]; |
1929 | u16 keyid; | 1931 | u16 keyid; |
1930 | } __attribute__((packed)) hfa384x_KeyIDChanged_t; | 1932 | } __attribute__((packed)) hfa384x_KeyIDChanged_t; |
1931 | 1933 | ||
@@ -2460,7 +2462,7 @@ typedef struct hfa484x_metacmd | |||
2460 | typedef struct prism2sta_authlist | 2462 | typedef struct prism2sta_authlist |
2461 | { | 2463 | { |
2462 | unsigned int cnt; | 2464 | unsigned int cnt; |
2463 | u8 addr[WLAN_AUTH_MAX][WLAN_ADDR_LEN]; | 2465 | u8 addr[WLAN_AUTH_MAX][ETH_ALEN]; |
2464 | u8 assoc[WLAN_AUTH_MAX]; | 2466 | u8 assoc[WLAN_AUTH_MAX]; |
2465 | } prism2sta_authlist_t; | 2467 | } prism2sta_authlist_t; |
2466 | 2468 | ||
@@ -2468,9 +2470,9 @@ typedef struct prism2sta_accesslist | |||
2468 | { | 2470 | { |
2469 | unsigned int modify; | 2471 | unsigned int modify; |
2470 | unsigned int cnt; | 2472 | unsigned int cnt; |
2471 | u8 addr[WLAN_ACCESS_MAX][WLAN_ADDR_LEN]; | 2473 | u8 addr[WLAN_ACCESS_MAX][ETH_ALEN]; |
2472 | unsigned int cnt1; | 2474 | unsigned int cnt1; |
2473 | u8 addr1[WLAN_ACCESS_MAX][WLAN_ADDR_LEN]; | 2475 | u8 addr1[WLAN_ACCESS_MAX][ETH_ALEN]; |
2474 | } prism2sta_accesslist_t; | 2476 | } prism2sta_accesslist_t; |
2475 | 2477 | ||
2476 | typedef struct hfa384x | 2478 | typedef struct hfa384x |
@@ -2552,7 +2554,7 @@ typedef struct hfa384x | |||
2552 | 2554 | ||
2553 | /* Group Addresses - right now, there are up to a total | 2555 | /* Group Addresses - right now, there are up to a total |
2554 | of MAX_GRP_ADDR group addresses */ | 2556 | of MAX_GRP_ADDR group addresses */ |
2555 | u8 dot11_grp_addr[MAX_GRP_ADDR][WLAN_ADDR_LEN]; | 2557 | u8 dot11_grp_addr[MAX_GRP_ADDR][ETH_ALEN]; |
2556 | unsigned int dot11_grpcnt; | 2558 | unsigned int dot11_grpcnt; |
2557 | 2559 | ||
2558 | /* Component Identities */ | 2560 | /* Component Identities */ |
diff --git a/drivers/staging/wlan-ng/p80211conv.c b/drivers/staging/wlan-ng/p80211conv.c index dfc7b3a1e9c..342715af82d 100644 --- a/drivers/staging/wlan-ng/p80211conv.c +++ b/drivers/staging/wlan-ng/p80211conv.c | |||
@@ -198,21 +198,21 @@ int skb_ether_to_p80211( wlandevice_t *wlandev, u32 ethconv, struct sk_buff *skb | |||
198 | 198 | ||
199 | switch ( wlandev->macmode ) { | 199 | switch ( wlandev->macmode ) { |
200 | case WLAN_MACMODE_IBSS_STA: | 200 | case WLAN_MACMODE_IBSS_STA: |
201 | memcpy(p80211_hdr->a3.a1, &e_hdr.daddr, WLAN_ADDR_LEN); | 201 | memcpy(p80211_hdr->a3.a1, &e_hdr.daddr, ETH_ALEN); |
202 | memcpy(p80211_hdr->a3.a2, wlandev->netdev->dev_addr, WLAN_ADDR_LEN); | 202 | memcpy(p80211_hdr->a3.a2, wlandev->netdev->dev_addr, ETH_ALEN); |
203 | memcpy(p80211_hdr->a3.a3, wlandev->bssid, WLAN_ADDR_LEN); | 203 | memcpy(p80211_hdr->a3.a3, wlandev->bssid, ETH_ALEN); |
204 | break; | 204 | break; |
205 | case WLAN_MACMODE_ESS_STA: | 205 | case WLAN_MACMODE_ESS_STA: |
206 | fc |= host2ieee16(WLAN_SET_FC_TODS(1)); | 206 | fc |= host2ieee16(WLAN_SET_FC_TODS(1)); |
207 | memcpy(p80211_hdr->a3.a1, wlandev->bssid, WLAN_ADDR_LEN); | 207 | memcpy(p80211_hdr->a3.a1, wlandev->bssid, ETH_ALEN); |
208 | memcpy(p80211_hdr->a3.a2, wlandev->netdev->dev_addr, WLAN_ADDR_LEN); | 208 | memcpy(p80211_hdr->a3.a2, wlandev->netdev->dev_addr, ETH_ALEN); |
209 | memcpy(p80211_hdr->a3.a3, &e_hdr.daddr, WLAN_ADDR_LEN); | 209 | memcpy(p80211_hdr->a3.a3, &e_hdr.daddr, ETH_ALEN); |
210 | break; | 210 | break; |
211 | case WLAN_MACMODE_ESS_AP: | 211 | case WLAN_MACMODE_ESS_AP: |
212 | fc |= host2ieee16(WLAN_SET_FC_FROMDS(1)); | 212 | fc |= host2ieee16(WLAN_SET_FC_FROMDS(1)); |
213 | memcpy(p80211_hdr->a3.a1, &e_hdr.daddr, WLAN_ADDR_LEN); | 213 | memcpy(p80211_hdr->a3.a1, &e_hdr.daddr, ETH_ALEN); |
214 | memcpy(p80211_hdr->a3.a2, wlandev->bssid, WLAN_ADDR_LEN); | 214 | memcpy(p80211_hdr->a3.a2, wlandev->bssid, ETH_ALEN); |
215 | memcpy(p80211_hdr->a3.a3, &e_hdr.saddr, WLAN_ADDR_LEN); | 215 | memcpy(p80211_hdr->a3.a3, &e_hdr.saddr, ETH_ALEN); |
216 | break; | 216 | break; |
217 | default: | 217 | default: |
218 | WLAN_LOG_ERROR("Error: Converting eth to wlan in unknown mode.\n"); | 218 | WLAN_LOG_ERROR("Error: Converting eth to wlan in unknown mode.\n"); |
diff --git a/drivers/staging/wlan-ng/p80211hdr.h b/drivers/staging/wlan-ng/p80211hdr.h index f4a1a34ff0a..0a7163fdfcd 100644 --- a/drivers/staging/wlan-ng/p80211hdr.h +++ b/drivers/staging/wlan-ng/p80211hdr.h | |||
@@ -63,6 +63,8 @@ | |||
63 | /*================================================================*/ | 63 | /*================================================================*/ |
64 | /* System Includes */ | 64 | /* System Includes */ |
65 | 65 | ||
66 | #include <linux/if_ether.h> | ||
67 | |||
66 | /*================================================================*/ | 68 | /*================================================================*/ |
67 | /* Project Includes */ | 69 | /* Project Includes */ |
68 | 70 | ||
@@ -75,7 +77,6 @@ | |||
75 | /* Constants */ | 77 | /* Constants */ |
76 | 78 | ||
77 | /*--- Sizes -----------------------------------------------*/ | 79 | /*--- Sizes -----------------------------------------------*/ |
78 | #define WLAN_ADDR_LEN 6 | ||
79 | #define WLAN_CRC_LEN 4 | 80 | #define WLAN_CRC_LEN 4 |
80 | #define WLAN_BSSID_LEN 6 | 81 | #define WLAN_BSSID_LEN 6 |
81 | #define WLAN_BSS_TS_LEN 8 | 82 | #define WLAN_BSS_TS_LEN 8 |
@@ -225,9 +226,9 @@ typedef struct p80211_hdr_a3 | |||
225 | { | 226 | { |
226 | u16 fc; | 227 | u16 fc; |
227 | u16 dur; | 228 | u16 dur; |
228 | u8 a1[WLAN_ADDR_LEN]; | 229 | u8 a1[ETH_ALEN]; |
229 | u8 a2[WLAN_ADDR_LEN]; | 230 | u8 a2[ETH_ALEN]; |
230 | u8 a3[WLAN_ADDR_LEN]; | 231 | u8 a3[ETH_ALEN]; |
231 | u16 seq; | 232 | u16 seq; |
232 | } __attribute__((packed)) p80211_hdr_a3_t; | 233 | } __attribute__((packed)) p80211_hdr_a3_t; |
233 | 234 | ||
@@ -235,11 +236,11 @@ typedef struct p80211_hdr_a4 | |||
235 | { | 236 | { |
236 | u16 fc; | 237 | u16 fc; |
237 | u16 dur; | 238 | u16 dur; |
238 | u8 a1[WLAN_ADDR_LEN]; | 239 | u8 a1[ETH_ALEN]; |
239 | u8 a2[WLAN_ADDR_LEN]; | 240 | u8 a2[ETH_ALEN]; |
240 | u8 a3[WLAN_ADDR_LEN]; | 241 | u8 a3[ETH_ALEN]; |
241 | u16 seq; | 242 | u16 seq; |
242 | u8 a4[WLAN_ADDR_LEN]; | 243 | u8 a4[ETH_ALEN]; |
243 | } __attribute__((packed)) p80211_hdr_a4_t; | 244 | } __attribute__((packed)) p80211_hdr_a4_t; |
244 | 245 | ||
245 | typedef union p80211_hdr | 246 | typedef union p80211_hdr |
@@ -282,7 +283,7 @@ inline static u16 p80211_headerlen(u16 fctl) | |||
282 | case WLAN_FTYPE_DATA: | 283 | case WLAN_FTYPE_DATA: |
283 | hdrlen = WLAN_HDR_A3_LEN; | 284 | hdrlen = WLAN_HDR_A3_LEN; |
284 | if ( WLAN_GET_FC_TODS(fctl) && WLAN_GET_FC_FROMDS(fctl) ) { | 285 | if ( WLAN_GET_FC_TODS(fctl) && WLAN_GET_FC_FROMDS(fctl) ) { |
285 | hdrlen += WLAN_ADDR_LEN; | 286 | hdrlen += ETH_ALEN; |
286 | } | 287 | } |
287 | break; | 288 | break; |
288 | case WLAN_FTYPE_CTL: | 289 | case WLAN_FTYPE_CTL: |
diff --git a/drivers/staging/wlan-ng/p80211netdev.c b/drivers/staging/wlan-ng/p80211netdev.c index 59e5ad10dbd..8081058ebe9 100644 --- a/drivers/staging/wlan-ng/p80211netdev.c +++ b/drivers/staging/wlan-ng/p80211netdev.c | |||
@@ -70,6 +70,7 @@ | |||
70 | #include <linux/wireless.h> | 70 | #include <linux/wireless.h> |
71 | #include <linux/sockios.h> | 71 | #include <linux/sockios.h> |
72 | #include <linux/etherdevice.h> | 72 | #include <linux/etherdevice.h> |
73 | #include <linux/if_ether.h> | ||
73 | 74 | ||
74 | #include <asm/bitops.h> | 75 | #include <asm/bitops.h> |
75 | #include <asm/uaccess.h> | 76 | #include <asm/uaccess.h> |
@@ -347,7 +348,7 @@ static void p80211netdev_rx_bh(unsigned long arg) | |||
347 | /* perform mcast filtering */ | 348 | /* perform mcast filtering */ |
348 | if (wlandev->netdev->flags & IFF_ALLMULTI) { | 349 | if (wlandev->netdev->flags & IFF_ALLMULTI) { |
349 | /* allow my local address through */ | 350 | /* allow my local address through */ |
350 | if (memcmp(hdr->a1, wlandev->netdev->dev_addr, WLAN_ADDR_LEN) != 0) { | 351 | if (memcmp(hdr->a1, wlandev->netdev->dev_addr, ETH_ALEN) != 0) { |
351 | /* but reject anything else that isn't multicast */ | 352 | /* but reject anything else that isn't multicast */ |
352 | if (!(hdr->a1[0] & 0x01)) { | 353 | if (!(hdr->a1[0] & 0x01)) { |
353 | dev_kfree_skb(skb); | 354 | dev_kfree_skb(skb); |
@@ -728,8 +729,8 @@ static int p80211knetdev_set_mac_address(netdevice_t *dev, void *addr) | |||
728 | macaddr->did = DIDmib_dot11mac_dot11OperationTable_dot11MACAddress; | 729 | macaddr->did = DIDmib_dot11mac_dot11OperationTable_dot11MACAddress; |
729 | macaddr->status = P80211ENUM_msgitem_status_data_ok; | 730 | macaddr->status = P80211ENUM_msgitem_status_data_ok; |
730 | macaddr->len = sizeof(macaddr->data); | 731 | macaddr->len = sizeof(macaddr->data); |
731 | macaddr->data.len = WLAN_ADDR_LEN; | 732 | macaddr->data.len = ETH_ALEN; |
732 | memcpy(&macaddr->data.data, new_addr->sa_data, WLAN_ADDR_LEN); | 733 | memcpy(&macaddr->data.data, new_addr->sa_data, ETH_ALEN); |
733 | 734 | ||
734 | /* Set up the resultcode argument */ | 735 | /* Set up the resultcode argument */ |
735 | resultcode->did = DIDmsg_dot11req_mibset_resultcode; | 736 | resultcode->did = DIDmsg_dot11req_mibset_resultcode; |
diff --git a/drivers/staging/wlan-ng/p80211wext.c b/drivers/staging/wlan-ng/p80211wext.c index 0d570f1f378..f817fe4c16f 100644 --- a/drivers/staging/wlan-ng/p80211wext.c +++ b/drivers/staging/wlan-ng/p80211wext.c | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <asm/bitops.h> | 51 | #include <asm/bitops.h> |
52 | #include <asm/uaccess.h> | 52 | #include <asm/uaccess.h> |
53 | #include <asm/byteorder.h> | 53 | #include <asm/byteorder.h> |
54 | #include <linux/if_ether.h> | ||
54 | 55 | ||
55 | /*================================================================*/ | 56 | /*================================================================*/ |
56 | /* Project Includes */ | 57 | /* Project Includes */ |
@@ -1805,9 +1806,9 @@ int p80211wext_event_associated(wlandevice_t *wlandev, int assoc) | |||
1805 | /* Send the association state first */ | 1806 | /* Send the association state first */ |
1806 | data.ap_addr.sa_family = ARPHRD_ETHER; | 1807 | data.ap_addr.sa_family = ARPHRD_ETHER; |
1807 | if (assoc) { | 1808 | if (assoc) { |
1808 | memcpy(data.ap_addr.sa_data, wlandev->bssid, WLAN_ADDR_LEN); | 1809 | memcpy(data.ap_addr.sa_data, wlandev->bssid, ETH_ALEN); |
1809 | } else { | 1810 | } else { |
1810 | memset(data.ap_addr.sa_data, 0, WLAN_ADDR_LEN); | 1811 | memset(data.ap_addr.sa_data, 0, ETH_ALEN); |
1811 | } | 1812 | } |
1812 | 1813 | ||
1813 | if (wlan_wext_write) | 1814 | if (wlan_wext_write) |
diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c index b279c97cbc0..a871cbb158d 100644 --- a/drivers/staging/wlan-ng/prism2sta.c +++ b/drivers/staging/wlan-ng/prism2sta.c | |||
@@ -70,6 +70,7 @@ | |||
70 | #include <linux/delay.h> | 70 | #include <linux/delay.h> |
71 | #include <asm/byteorder.h> | 71 | #include <asm/byteorder.h> |
72 | #include <linux/if_arp.h> | 72 | #include <linux/if_arp.h> |
73 | #include <linux/if_ether.h> | ||
73 | 74 | ||
74 | #include "wlan_compat.h" | 75 | #include "wlan_compat.h" |
75 | 76 | ||
@@ -920,7 +921,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev) | |||
920 | 921 | ||
921 | /* Collect the MAC address */ | 922 | /* Collect the MAC address */ |
922 | result = hfa384x_drvr_getconfig(hw, HFA384x_RID_CNFOWNMACADDR, | 923 | result = hfa384x_drvr_getconfig(hw, HFA384x_RID_CNFOWNMACADDR, |
923 | wlandev->netdev->dev_addr, WLAN_ADDR_LEN); | 924 | wlandev->netdev->dev_addr, ETH_ALEN); |
924 | if ( result != 0 ) { | 925 | if ( result != 0 ) { |
925 | WLAN_LOG_ERROR("Failed to retrieve mac address\n"); | 926 | WLAN_LOG_ERROR("Failed to retrieve mac address\n"); |
926 | goto failed; | 927 | goto failed; |
@@ -1588,7 +1589,7 @@ static void prism2sta_inf_assocstatus(wlandevice_t *wlandev, | |||
1588 | */ | 1589 | */ |
1589 | 1590 | ||
1590 | for (i = 0; i < hw->authlist.cnt; i++) | 1591 | for (i = 0; i < hw->authlist.cnt; i++) |
1591 | if (memcmp(rec.sta_addr, hw->authlist.addr[i], WLAN_ADDR_LEN) == 0) | 1592 | if (memcmp(rec.sta_addr, hw->authlist.addr[i], ETH_ALEN) == 0) |
1592 | break; | 1593 | break; |
1593 | 1594 | ||
1594 | if (i >= hw->authlist.cnt) { | 1595 | if (i >= hw->authlist.cnt) { |
@@ -1662,7 +1663,7 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev, | |||
1662 | ** authentication. | 1663 | ** authentication. |
1663 | */ | 1664 | */ |
1664 | 1665 | ||
1665 | memcpy(rec.address, inf->info.authreq.sta_addr, WLAN_ADDR_LEN); | 1666 | memcpy(rec.address, inf->info.authreq.sta_addr, ETH_ALEN); |
1666 | rec.status = P80211ENUM_status_unspec_failure; | 1667 | rec.status = P80211ENUM_status_unspec_failure; |
1667 | 1668 | ||
1668 | /* | 1669 | /* |
@@ -1679,7 +1680,7 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev, | |||
1679 | 1680 | ||
1680 | for (i = 0; i < hw->authlist.cnt; i++) | 1681 | for (i = 0; i < hw->authlist.cnt; i++) |
1681 | if (memcmp(rec.address, hw->authlist.addr[i], | 1682 | if (memcmp(rec.address, hw->authlist.addr[i], |
1682 | WLAN_ADDR_LEN) == 0) { | 1683 | ETH_ALEN) == 0) { |
1683 | rec.status = P80211ENUM_status_successful; | 1684 | rec.status = P80211ENUM_status_successful; |
1684 | break; | 1685 | break; |
1685 | } | 1686 | } |
@@ -1715,8 +1716,8 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev, | |||
1715 | addr = hw->allow.addr1[0]; | 1716 | addr = hw->allow.addr1[0]; |
1716 | } | 1717 | } |
1717 | 1718 | ||
1718 | for (i = 0; i < cnt; i++, addr += WLAN_ADDR_LEN) | 1719 | for (i = 0; i < cnt; i++, addr += ETH_ALEN) |
1719 | if (memcmp(rec.address, addr, WLAN_ADDR_LEN) == 0) { | 1720 | if (memcmp(rec.address, addr, ETH_ALEN) == 0) { |
1720 | rec.status = P80211ENUM_status_successful; | 1721 | rec.status = P80211ENUM_status_successful; |
1721 | break; | 1722 | break; |
1722 | } | 1723 | } |
@@ -1745,8 +1746,8 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev, | |||
1745 | 1746 | ||
1746 | rec.status = P80211ENUM_status_successful; | 1747 | rec.status = P80211ENUM_status_successful; |
1747 | 1748 | ||
1748 | for (i = 0; i < cnt; i++, addr += WLAN_ADDR_LEN) | 1749 | for (i = 0; i < cnt; i++, addr += ETH_ALEN) |
1749 | if (memcmp(rec.address, addr, WLAN_ADDR_LEN) == 0) { | 1750 | if (memcmp(rec.address, addr, ETH_ALEN) == 0) { |
1750 | rec.status = P80211ENUM_status_unspec_failure; | 1751 | rec.status = P80211ENUM_status_unspec_failure; |
1751 | break; | 1752 | break; |
1752 | } | 1753 | } |
@@ -1767,7 +1768,7 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev, | |||
1767 | 1768 | ||
1768 | if (rec.status == P80211ENUM_status_successful) { | 1769 | if (rec.status == P80211ENUM_status_successful) { |
1769 | for (i = 0; i < hw->authlist.cnt; i++) | 1770 | for (i = 0; i < hw->authlist.cnt; i++) |
1770 | if (memcmp(rec.address, hw->authlist.addr[i], WLAN_ADDR_LEN) == 0) | 1771 | if (memcmp(rec.address, hw->authlist.addr[i], ETH_ALEN) == 0) |
1771 | break; | 1772 | break; |
1772 | 1773 | ||
1773 | if (i >= hw->authlist.cnt) { | 1774 | if (i >= hw->authlist.cnt) { |
@@ -1775,7 +1776,7 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev, | |||
1775 | rec.status = P80211ENUM_status_ap_full; | 1776 | rec.status = P80211ENUM_status_ap_full; |
1776 | } else { | 1777 | } else { |
1777 | memcpy(hw->authlist.addr[hw->authlist.cnt], | 1778 | memcpy(hw->authlist.addr[hw->authlist.cnt], |
1778 | rec.address, WLAN_ADDR_LEN); | 1779 | rec.address, ETH_ALEN); |
1779 | hw->authlist.cnt++; | 1780 | hw->authlist.cnt++; |
1780 | added = 1; | 1781 | added = 1; |
1781 | } | 1782 | } |