diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2011-03-10 21:55:30 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-03-11 17:31:47 -0500 |
commit | 395e1cae85283f7bbe767097d78b5e3baa13b131 (patch) | |
tree | e05172988cafad61465e03ece802749b80451858 /drivers/staging | |
parent | 05209262bcbece611e559a37b90869f667864e0c (diff) |
staging: ath6kl: s|A_MEMCMP|memcmp|g
for i in $(find ./drivers/staging/ath6kl/ -name \*.[ch]) ; do \
sed -r -i -e "s/A_MEMCMP/memcmp/g" $i; done
Cc: Naveen Singh <naveen.singh@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/ath6kl/miscdrv/common_drv.c | 4 | ||||
-rw-r--r-- | drivers/staging/ath6kl/os/linux/ar6000_drv.c | 6 | ||||
-rw-r--r-- | drivers/staging/ath6kl/os/linux/cfg80211.c | 8 | ||||
-rw-r--r-- | drivers/staging/ath6kl/os/linux/include/osapi_linux.h | 2 | ||||
-rw-r--r-- | drivers/staging/ath6kl/os/linux/ioctl.c | 6 | ||||
-rw-r--r-- | drivers/staging/ath6kl/os/linux/wireless_ext.c | 8 | ||||
-rw-r--r-- | drivers/staging/ath6kl/wlan/include/ieee80211.h | 2 | ||||
-rw-r--r-- | drivers/staging/ath6kl/wlan/src/wlan_node.c | 8 |
8 files changed, 21 insertions, 23 deletions
diff --git a/drivers/staging/ath6kl/miscdrv/common_drv.c b/drivers/staging/ath6kl/miscdrv/common_drv.c index 7a77290da14..a01f5d73203 100644 --- a/drivers/staging/ath6kl/miscdrv/common_drv.c +++ b/drivers/staging/ath6kl/miscdrv/common_drv.c | |||
@@ -877,7 +877,7 @@ static ATH_DEBUG_MODULE_DBG_INFO *FindModule(char *module_name) | |||
877 | 877 | ||
878 | while (pInfo != NULL) { | 878 | while (pInfo != NULL) { |
879 | /* TODO: need to use something other than strlen */ | 879 | /* TODO: need to use something other than strlen */ |
880 | if (A_MEMCMP(pInfo->ModuleName,module_name,strlen(module_name)) == 0) { | 880 | if (memcmp(pInfo->ModuleName,module_name,strlen(module_name)) == 0) { |
881 | break; | 881 | break; |
882 | } | 882 | } |
883 | pInfo = pInfo->pNext; | 883 | pInfo = pInfo->pNext; |
@@ -916,7 +916,7 @@ void a_dump_module_debug_info_by_name(char *module_name) | |||
916 | return; | 916 | return; |
917 | } | 917 | } |
918 | 918 | ||
919 | if (A_MEMCMP(module_name,"all",3) == 0) { | 919 | if (memcmp(module_name,"all",3) == 0) { |
920 | /* dump all */ | 920 | /* dump all */ |
921 | while (pInfo != NULL) { | 921 | while (pInfo != NULL) { |
922 | a_dump_module_debug_info(pInfo); | 922 | a_dump_module_debug_info(pInfo); |
diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c index 2111e993856..e8277ffce24 100644 --- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c +++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c | |||
@@ -4291,7 +4291,7 @@ ar6000_connect_event(AR_SOFTC_T *ar, u16 channel, u8 *bssid, | |||
4291 | 4291 | ||
4292 | if(ar->arNetworkType & AP_NETWORK) { | 4292 | if(ar->arNetworkType & AP_NETWORK) { |
4293 | struct net_device *dev = ar->arNetDev; | 4293 | struct net_device *dev = ar->arNetDev; |
4294 | if(A_MEMCMP(dev->dev_addr, bssid, ATH_MAC_LEN)==0) { | 4294 | if(memcmp(dev->dev_addr, bssid, ATH_MAC_LEN)==0) { |
4295 | ar->arACS = channel; | 4295 | ar->arACS = channel; |
4296 | ik = &ar->ap_mode_bkey; | 4296 | ik = &ar->ap_mode_bkey; |
4297 | 4297 | ||
@@ -4605,7 +4605,7 @@ u8 remove_sta(AR_SOFTC_T *ar, u8 *mac, u16 reason) | |||
4605 | } | 4605 | } |
4606 | } else { | 4606 | } else { |
4607 | for(i=0; i < AP_MAX_NUM_STA; i++) { | 4607 | for(i=0; i < AP_MAX_NUM_STA; i++) { |
4608 | if(A_MEMCMP(ar->sta_list[i].mac, mac, ATH_MAC_LEN)==0) { | 4608 | if(memcmp(ar->sta_list[i].mac, mac, ATH_MAC_LEN)==0) { |
4609 | A_PRINTF("DEL STA %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x " | 4609 | A_PRINTF("DEL STA %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x " |
4610 | " aid=%d REASON=%d\n", mac[0], mac[1], mac[2], | 4610 | " aid=%d REASON=%d\n", mac[0], mac[1], mac[2], |
4611 | mac[3], mac[4], mac[5], ar->sta_list[i].aid, reason); | 4611 | mac[3], mac[4], mac[5], ar->sta_list[i].aid, reason); |
@@ -6281,7 +6281,7 @@ ap_set_wapi_key(struct ar6_softc *ar, void *ikey) | |||
6281 | KEY_USAGE keyUsage = 0; | 6281 | KEY_USAGE keyUsage = 0; |
6282 | int status; | 6282 | int status; |
6283 | 6283 | ||
6284 | if (A_MEMCMP(ik->ik_macaddr, bcast_mac, IEEE80211_ADDR_LEN) == 0) { | 6284 | if (memcmp(ik->ik_macaddr, bcast_mac, IEEE80211_ADDR_LEN) == 0) { |
6285 | keyUsage = GROUP_USAGE; | 6285 | keyUsage = GROUP_USAGE; |
6286 | } else { | 6286 | } else { |
6287 | keyUsage = PAIRWISE_USAGE; | 6287 | keyUsage = PAIRWISE_USAGE; |
diff --git a/drivers/staging/ath6kl/os/linux/cfg80211.c b/drivers/staging/ath6kl/os/linux/cfg80211.c index 415b2535502..2edac0723af 100644 --- a/drivers/staging/ath6kl/os/linux/cfg80211.c +++ b/drivers/staging/ath6kl/os/linux/cfg80211.c | |||
@@ -305,7 +305,7 @@ ar6k_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, | |||
305 | 305 | ||
306 | if(ar->arConnected == true && | 306 | if(ar->arConnected == true && |
307 | ar->arSsidLen == sme->ssid_len && | 307 | ar->arSsidLen == sme->ssid_len && |
308 | !A_MEMCMP(ar->arSsid, sme->ssid, ar->arSsidLen)) { | 308 | !memcmp(ar->arSsid, sme->ssid, ar->arSsidLen)) { |
309 | reconnect_flag = true; | 309 | reconnect_flag = true; |
310 | status = wmi_reconnect_cmd(ar->arWmi, | 310 | status = wmi_reconnect_cmd(ar->arWmi, |
311 | ar->arReqBssid, | 311 | ar->arReqBssid, |
@@ -318,7 +318,7 @@ ar6k_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, | |||
318 | } | 318 | } |
319 | return 0; | 319 | return 0; |
320 | } else if(ar->arSsidLen == sme->ssid_len && | 320 | } else if(ar->arSsidLen == sme->ssid_len && |
321 | !A_MEMCMP(ar->arSsid, sme->ssid, ar->arSsidLen)) { | 321 | !memcmp(ar->arSsid, sme->ssid, ar->arSsidLen)) { |
322 | ar6000_disconnect(ar); | 322 | ar6000_disconnect(ar); |
323 | } | 323 | } |
324 | 324 | ||
@@ -332,7 +332,7 @@ ar6k_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, | |||
332 | 332 | ||
333 | A_MEMZERO(ar->arReqBssid, sizeof(ar->arReqBssid)); | 333 | A_MEMZERO(ar->arReqBssid, sizeof(ar->arReqBssid)); |
334 | if(sme->bssid){ | 334 | if(sme->bssid){ |
335 | if(A_MEMCMP(&sme->bssid, bcast_mac, AR6000_ETH_ADDR_LEN)) { | 335 | if(memcmp(&sme->bssid, bcast_mac, AR6000_ETH_ADDR_LEN)) { |
336 | memcpy(ar->arReqBssid, sme->bssid, sizeof(ar->arReqBssid)); | 336 | memcpy(ar->arReqBssid, sme->bssid, sizeof(ar->arReqBssid)); |
337 | } | 337 | } |
338 | } | 338 | } |
@@ -1321,7 +1321,7 @@ ar6k_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, | |||
1321 | 1321 | ||
1322 | A_MEMZERO(ar->arReqBssid, sizeof(ar->arReqBssid)); | 1322 | A_MEMZERO(ar->arReqBssid, sizeof(ar->arReqBssid)); |
1323 | if(ibss_param->bssid) { | 1323 | if(ibss_param->bssid) { |
1324 | if(A_MEMCMP(&ibss_param->bssid, bcast_mac, AR6000_ETH_ADDR_LEN)) { | 1324 | if(memcmp(&ibss_param->bssid, bcast_mac, AR6000_ETH_ADDR_LEN)) { |
1325 | memcpy(ar->arReqBssid, ibss_param->bssid, sizeof(ar->arReqBssid)); | 1325 | memcpy(ar->arReqBssid, ibss_param->bssid, sizeof(ar->arReqBssid)); |
1326 | } | 1326 | } |
1327 | } | 1327 | } |
diff --git a/drivers/staging/ath6kl/os/linux/include/osapi_linux.h b/drivers/staging/ath6kl/os/linux/include/osapi_linux.h index cdb4195d5df..53b500c1835 100644 --- a/drivers/staging/ath6kl/os/linux/include/osapi_linux.h +++ b/drivers/staging/ath6kl/os/linux/include/osapi_linux.h | |||
@@ -77,7 +77,6 @@ | |||
77 | #define A_CPU2BE32(x) htonl(x) | 77 | #define A_CPU2BE32(x) htonl(x) |
78 | 78 | ||
79 | #define A_MEMZERO(addr, len) memset(addr, 0, len) | 79 | #define A_MEMZERO(addr, len) memset(addr, 0, len) |
80 | #define A_MEMCMP(addr1, addr2, len) memcmp((addr1), (addr2), (len)) | ||
81 | #define A_MALLOC(size) kmalloc((size), GFP_KERNEL) | 80 | #define A_MALLOC(size) kmalloc((size), GFP_KERNEL) |
82 | #define A_MALLOC_NOWAIT(size) kmalloc((size), GFP_ATOMIC) | 81 | #define A_MALLOC_NOWAIT(size) kmalloc((size), GFP_ATOMIC) |
83 | #define A_FREE(addr) kfree(addr) | 82 | #define A_FREE(addr) kfree(addr) |
@@ -364,7 +363,6 @@ static inline void *A_ALIGN_TO_CACHE_LINE(void *ptr) { | |||
364 | #define POSTPACK __ATTRIB_PACK | 363 | #define POSTPACK __ATTRIB_PACK |
365 | 364 | ||
366 | #define A_MEMZERO(addr, len) memset((addr), 0, (len)) | 365 | #define A_MEMZERO(addr, len) memset((addr), 0, (len)) |
367 | #define A_MEMCMP(addr1, addr2, len) memcmp((addr1), (addr2), (len)) | ||
368 | #define A_MALLOC(size) malloc(size) | 366 | #define A_MALLOC(size) malloc(size) |
369 | #define A_FREE(addr) free(addr) | 367 | #define A_FREE(addr) free(addr) |
370 | 368 | ||
diff --git a/drivers/staging/ath6kl/os/linux/ioctl.c b/drivers/staging/ath6kl/os/linux/ioctl.c index 9a7f920c26b..a95b7430ad8 100644 --- a/drivers/staging/ath6kl/os/linux/ioctl.c +++ b/drivers/staging/ath6kl/os/linux/ioctl.c | |||
@@ -555,7 +555,7 @@ ar6000_ioctl_set_badAp(struct net_device *dev, struct ifreq *rq) | |||
555 | return -EIO; | 555 | return -EIO; |
556 | } | 556 | } |
557 | 557 | ||
558 | if (A_MEMCMP(cmd.bssid, null_mac, AR6000_ETH_ADDR_LEN) == 0) { | 558 | if (memcmp(cmd.bssid, null_mac, AR6000_ETH_ADDR_LEN) == 0) { |
559 | /* | 559 | /* |
560 | * This is a delete badAP. | 560 | * This is a delete badAP. |
561 | */ | 561 | */ |
@@ -3127,7 +3127,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | |||
3127 | sizeof(adhocBssid))) | 3127 | sizeof(adhocBssid))) |
3128 | { | 3128 | { |
3129 | ret = -EFAULT; | 3129 | ret = -EFAULT; |
3130 | } else if (A_MEMCMP(adhocBssid.bssid, bcast_mac, | 3130 | } else if (memcmp(adhocBssid.bssid, bcast_mac, |
3131 | AR6000_ETH_ADDR_LEN) == 0) | 3131 | AR6000_ETH_ADDR_LEN) == 0) |
3132 | { | 3132 | { |
3133 | ret = -EFAULT; | 3133 | ret = -EFAULT; |
@@ -4714,7 +4714,7 @@ u8 mac_cmp_wild(u8 *mac, u8 *new_mac, u8 wild, u8 new_wild) | |||
4714 | if((wild & 1<<i) && (new_wild & 1<<i)) continue; | 4714 | if((wild & 1<<i) && (new_wild & 1<<i)) continue; |
4715 | if(mac[i] != new_mac[i]) return 1; | 4715 | if(mac[i] != new_mac[i]) return 1; |
4716 | } | 4716 | } |
4717 | if((A_MEMCMP(new_mac, null_mac, 6)==0) && new_wild && | 4717 | if((memcmp(new_mac, null_mac, 6)==0) && new_wild && |
4718 | (wild != new_wild)) { | 4718 | (wild != new_wild)) { |
4719 | return 1; | 4719 | return 1; |
4720 | } | 4720 | } |
diff --git a/drivers/staging/ath6kl/os/linux/wireless_ext.c b/drivers/staging/ath6kl/os/linux/wireless_ext.c index 8262fde1c6f..824f1be9883 100644 --- a/drivers/staging/ath6kl/os/linux/wireless_ext.c +++ b/drivers/staging/ath6kl/os/linux/wireless_ext.c | |||
@@ -504,7 +504,7 @@ ar6000_ioctl_siwessid(struct net_device *dev, | |||
504 | 504 | ||
505 | if (ar->arNextMode == AP_NETWORK) { | 505 | if (ar->arNextMode == AP_NETWORK) { |
506 | /* SSID change for AP network - Will take effect on commit */ | 506 | /* SSID change for AP network - Will take effect on commit */ |
507 | if(A_MEMCMP(ar->arSsid,ssid,32) != 0) { | 507 | if(memcmp(ar->arSsid,ssid,32) != 0) { |
508 | ar->arSsidLen = data->length - 1; | 508 | ar->arSsidLen = data->length - 1; |
509 | memcpy(ar->arSsid, ssid, ar->arSsidLen); | 509 | memcpy(ar->arSsid, ssid, ar->arSsidLen); |
510 | ar->ap_profile_flag = 1; /* There is a change in profile */ | 510 | ar->ap_profile_flag = 1; /* There is a change in profile */ |
@@ -581,7 +581,7 @@ ar6000_ioctl_siwessid(struct net_device *dev, | |||
581 | (!data->flags))) | 581 | (!data->flags))) |
582 | { | 582 | { |
583 | if ((!data->flags) || | 583 | if ((!data->flags) || |
584 | (A_MEMCMP(ar->arSsid, ssid, ar->arSsidLen) != 0) || | 584 | (memcmp(ar->arSsid, ssid, ar->arSsidLen) != 0) || |
585 | (ar->arSsidLen != (data->length - 1))) | 585 | (ar->arSsidLen != (data->length - 1))) |
586 | { | 586 | { |
587 | /* | 587 | /* |
@@ -1618,7 +1618,7 @@ static int ar6000_set_wapi_key(struct net_device *dev, | |||
1618 | keyLen = erq->length - sizeof(struct iw_encode_ext); | 1618 | keyLen = erq->length - sizeof(struct iw_encode_ext); |
1619 | memcpy(wapiKeyRsc, ext->tx_seq, sizeof(wapiKeyRsc)); | 1619 | memcpy(wapiKeyRsc, ext->tx_seq, sizeof(wapiKeyRsc)); |
1620 | 1620 | ||
1621 | if (A_MEMCMP(ext->addr.sa_data, broadcastMac, sizeof(broadcastMac)) == 0) { | 1621 | if (memcmp(ext->addr.sa_data, broadcastMac, sizeof(broadcastMac)) == 0) { |
1622 | keyUsage |= GROUP_USAGE; | 1622 | keyUsage |= GROUP_USAGE; |
1623 | PN = (u32 *)wapiKeyRsc; | 1623 | PN = (u32 *)wapiKeyRsc; |
1624 | for (i = 0; i < 4; i++) { | 1624 | for (i = 0; i < 4; i++) { |
@@ -2315,7 +2315,7 @@ ar6000_ioctl_siwap(struct net_device *dev, | |||
2315 | return -EIO; | 2315 | return -EIO; |
2316 | } | 2316 | } |
2317 | 2317 | ||
2318 | if (A_MEMCMP(&ap_addr->sa_data, bcast_mac, AR6000_ETH_ADDR_LEN) == 0) { | 2318 | if (memcmp(&ap_addr->sa_data, bcast_mac, AR6000_ETH_ADDR_LEN) == 0) { |
2319 | A_MEMZERO(ar->arReqBssid, sizeof(ar->arReqBssid)); | 2319 | A_MEMZERO(ar->arReqBssid, sizeof(ar->arReqBssid)); |
2320 | } else { | 2320 | } else { |
2321 | memcpy(ar->arReqBssid, &ap_addr->sa_data, sizeof(ar->arReqBssid)); | 2321 | memcpy(ar->arReqBssid, &ap_addr->sa_data, sizeof(ar->arReqBssid)); |
diff --git a/drivers/staging/ath6kl/wlan/include/ieee80211.h b/drivers/staging/ath6kl/wlan/include/ieee80211.h index dfad19ac74f..532ab0eb20c 100644 --- a/drivers/staging/ath6kl/wlan/include/ieee80211.h +++ b/drivers/staging/ath6kl/wlan/include/ieee80211.h | |||
@@ -68,7 +68,7 @@ | |||
68 | 68 | ||
69 | 69 | ||
70 | #define IEEE80211_ADDR_EQ(addr1, addr2) \ | 70 | #define IEEE80211_ADDR_EQ(addr1, addr2) \ |
71 | (A_MEMCMP(addr1, addr2, IEEE80211_ADDR_LEN) == 0) | 71 | (memcmp(addr1, addr2, IEEE80211_ADDR_LEN) == 0) |
72 | 72 | ||
73 | #define IEEE80211_ADDR_COPY(dst,src) memcpy(dst,src,IEEE80211_ADDR_LEN) | 73 | #define IEEE80211_ADDR_COPY(dst,src) memcpy(dst,src,IEEE80211_ADDR_LEN) |
74 | 74 | ||
diff --git a/drivers/staging/ath6kl/wlan/src/wlan_node.c b/drivers/staging/ath6kl/wlan/src/wlan_node.c index c99a330ac00..0edf9c184ef 100644 --- a/drivers/staging/ath6kl/wlan/src/wlan_node.c +++ b/drivers/staging/ath6kl/wlan/src/wlan_node.c | |||
@@ -334,7 +334,7 @@ wlan_refresh_inactive_nodes (struct ieee80211_node_table *nt) | |||
334 | while (bss != NULL) | 334 | while (bss != NULL) |
335 | { | 335 | { |
336 | nextBss = bss->ni_list_next; | 336 | nextBss = bss->ni_list_next; |
337 | if (A_MEMCMP(myBssid, bss->ni_macaddr, sizeof(myBssid)) != 0) | 337 | if (memcmp(myBssid, bss->ni_macaddr, sizeof(myBssid)) != 0) |
338 | { | 338 | { |
339 | /* | 339 | /* |
340 | * free up all but the current bss - if set | 340 | * free up all but the current bss - if set |
@@ -357,7 +357,7 @@ wlan_refresh_inactive_nodes (struct ieee80211_node_table *nt) | |||
357 | while (bss != NULL) | 357 | while (bss != NULL) |
358 | { | 358 | { |
359 | nextBss = bss->ni_list_next; | 359 | nextBss = bss->ni_list_next; |
360 | if (A_MEMCMP(myBssid, bss->ni_macaddr, sizeof(myBssid)) != 0) | 360 | if (memcmp(myBssid, bss->ni_macaddr, sizeof(myBssid)) != 0) |
361 | { | 361 | { |
362 | 362 | ||
363 | if (((now - bss->ni_tstamp) > timeoutValue) || --bss->ni_actcnt == 0) | 363 | if (((now - bss->ni_tstamp) > timeoutValue) || --bss->ni_actcnt == 0) |
@@ -391,7 +391,7 @@ wlan_node_timeout (A_ATH_TIMER arg) | |||
391 | while (bss != NULL) | 391 | while (bss != NULL) |
392 | { | 392 | { |
393 | nextBss = bss->ni_list_next; | 393 | nextBss = bss->ni_list_next; |
394 | if (A_MEMCMP(myBssid, bss->ni_macaddr, sizeof(myBssid)) != 0) | 394 | if (memcmp(myBssid, bss->ni_macaddr, sizeof(myBssid)) != 0) |
395 | { | 395 | { |
396 | 396 | ||
397 | if ((now - bss->ni_tstamp) > timeoutValue) | 397 | if ((now - bss->ni_tstamp) > timeoutValue) |
@@ -539,7 +539,7 @@ wlan_node_remove(struct ieee80211_node_table *nt, u8 *bssid) | |||
539 | { | 539 | { |
540 | nextBss = bss->ni_list_next; | 540 | nextBss = bss->ni_list_next; |
541 | 541 | ||
542 | if (A_MEMCMP(bssid, bss->ni_macaddr, 6) == 0) | 542 | if (memcmp(bssid, bss->ni_macaddr, 6) == 0) |
543 | { | 543 | { |
544 | wlan_node_remove_core (nt, bss); | 544 | wlan_node_remove_core (nt, bss); |
545 | IEEE80211_NODE_UNLOCK(nt); | 545 | IEEE80211_NODE_UNLOCK(nt); |