[PATCH 4/5] ath6kl: s/A_MEMCMP/memcmp/g

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



for i in $(find ./drivers/staging/ath6kl/ -name \*.[ch]) ; do \
	sed -r -i -e "s/A_MEMCMP/memcmp/g" $i; done

Cc: Vipin Mehta <vmehta@xxxxxxxxxxx>
Cc: Naveen Singh <naveen.singh@xxxxxxxxxxx>
Signed-off-by: Luis R. Rodriguez <lrodriguez@xxxxxxxxxxx>
---
 drivers/staging/ath6kl/miscdrv/common_drv.c        |    4 ++--
 drivers/staging/ath6kl/os/linux/ar6000_drv.c       |    6 +++---
 drivers/staging/ath6kl/os/linux/cfg80211.c         |    8 ++++----
 .../staging/ath6kl/os/linux/include/osapi_linux.h  |    4 ++--
 drivers/staging/ath6kl/os/linux/ioctl.c            |    6 +++---
 drivers/staging/ath6kl/os/linux/wireless_ext.c     |    8 ++++----
 drivers/staging/ath6kl/wlan/include/ieee80211.h    |    2 +-
 drivers/staging/ath6kl/wlan/src/wlan_node.c        |    8 ++++----
 8 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/drivers/staging/ath6kl/miscdrv/common_drv.c b/drivers/staging/ath6kl/miscdrv/common_drv.c
index ad7289d..8caa5f3 100644
--- a/drivers/staging/ath6kl/miscdrv/common_drv.c
+++ b/drivers/staging/ath6kl/miscdrv/common_drv.c
@@ -881,7 +881,7 @@ static ATH_DEBUG_MODULE_DBG_INFO *FindModule(char *module_name)
 
 	while (pInfo != NULL) {
 		/* TODO: need to use something other than strlen */
-		if (A_MEMCMP
+		if (memcmp
 		    (pInfo->ModuleName, module_name,
 		     strlen(module_name)) == 0) {
 			break;
@@ -921,7 +921,7 @@ void a_dump_module_debug_info_by_name(char *module_name)
 		return;
 	}
 
-	if (A_MEMCMP(module_name, "all", 3) == 0) {
+	if (memcmp(module_name, "all", 3) == 0) {
 		/* dump all */
 		while (pInfo != NULL) {
 			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 45c0cdd..9c99501 100644
--- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c
+++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c
@@ -4559,7 +4559,7 @@ ar6000_connect_event(AR_SOFTC_T * ar, u16 channel, u8 * bssid,
 
 	if (ar->arNetworkType & AP_NETWORK) {
 		struct net_device *dev = ar->arNetDev;
-		if (A_MEMCMP(dev->dev_addr, bssid, ATH_MAC_LEN) == 0) {
+		if (memcmp(dev->dev_addr, bssid, ATH_MAC_LEN) == 0) {
 			ar->arACS = channel;
 			ik = &ar->ap_mode_bkey;
 
@@ -4874,7 +4874,7 @@ u8 remove_sta(AR_SOFTC_T * ar, u8 * mac, u16 reason)
 		}
 	} else {
 		for (i = 0; i < AP_MAX_NUM_STA; i++) {
-			if (A_MEMCMP(ar->sta_list[i].mac, mac, ATH_MAC_LEN) ==
+			if (memcmp(ar->sta_list[i].mac, mac, ATH_MAC_LEN) ==
 			    0) {
 				A_PRINTF
 				    ("DEL STA %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x "
@@ -6622,7 +6622,7 @@ int ap_set_wapi_key(struct ar6_softc *ar, void *ikey)
 	KEY_USAGE keyUsage = 0;
 	int status;
 
-	if (A_MEMCMP(ik->ik_macaddr, bcast_mac, IEEE80211_ADDR_LEN) == 0) {
+	if (memcmp(ik->ik_macaddr, bcast_mac, IEEE80211_ADDR_LEN) == 0) {
 		keyUsage = GROUP_USAGE;
 	} else {
 		keyUsage = PAIRWISE_USAGE;
diff --git a/drivers/staging/ath6kl/os/linux/cfg80211.c b/drivers/staging/ath6kl/os/linux/cfg80211.c
index 9dd03a0..8f5cdc2 100644
--- a/drivers/staging/ath6kl/os/linux/cfg80211.c
+++ b/drivers/staging/ath6kl/os/linux/cfg80211.c
@@ -314,7 +314,7 @@ ar6k_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
 
 	if (ar->arConnected == true &&
 	    ar->arSsidLen == sme->ssid_len &&
-	    !A_MEMCMP(ar->arSsid, sme->ssid, ar->arSsidLen)) {
+	    !memcmp(ar->arSsid, sme->ssid, ar->arSsidLen)) {
 		reconnect_flag = true;
 		status = wmi_reconnect_cmd(ar->arWmi,
 					   ar->arReqBssid, ar->arChannelHint);
@@ -328,7 +328,7 @@ ar6k_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
 		}
 		return 0;
 	} else if (ar->arSsidLen == sme->ssid_len &&
-		   !A_MEMCMP(ar->arSsid, sme->ssid, ar->arSsidLen)) {
+		   !memcmp(ar->arSsid, sme->ssid, ar->arSsidLen)) {
 		wmi_disconnect_cmd(ar->arWmi);
 	}
 
@@ -342,7 +342,7 @@ ar6k_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
 
 	A_MEMZERO(ar->arReqBssid, sizeof(ar->arReqBssid));
 	if (sme->bssid) {
-		if (A_MEMCMP(&sme->bssid, bcast_mac, AR6000_ETH_ADDR_LEN)) {
+		if (memcmp(&sme->bssid, bcast_mac, AR6000_ETH_ADDR_LEN)) {
 			memcpy(ar->arReqBssid, sme->bssid,
 				 sizeof(ar->arReqBssid));
 		}
@@ -1390,7 +1390,7 @@ ar6k_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
 
 	A_MEMZERO(ar->arReqBssid, sizeof(ar->arReqBssid));
 	if (ibss_param->bssid) {
-		if (A_MEMCMP
+		if (memcmp
 		    (&ibss_param->bssid, bcast_mac, AR6000_ETH_ADDR_LEN)) {
 			memcpy(ar->arReqBssid, ibss_param->bssid,
 				 sizeof(ar->arReqBssid));
diff --git a/drivers/staging/ath6kl/os/linux/include/osapi_linux.h b/drivers/staging/ath6kl/os/linux/include/osapi_linux.h
index 5332803..84ff104 100644
--- a/drivers/staging/ath6kl/os/linux/include/osapi_linux.h
+++ b/drivers/staging/ath6kl/os/linux/include/osapi_linux.h
@@ -78,7 +78,7 @@
 
 #define memcpy(dst, src, len)         memcpy((u8 *)(dst), (src), (len))
 #define A_MEMZERO(addr, len)            memset(addr, 0, len)
-#define A_MEMCMP(addr1, addr2, len)     memcmp((addr1), (addr2), (len))
+#define memcmp(addr1, addr2, len)     memcmp((addr1), (addr2), (len))
 #define A_MALLOC(size)                  kmalloc((size), GFP_KERNEL)
 #define A_MALLOC_NOWAIT(size)           kmalloc((size), GFP_ATOMIC)
 #define A_FREE(addr)                    kfree(addr)
@@ -366,7 +366,7 @@ static inline void *A_ALIGN_TO_CACHE_LINE(void *ptr)
 
 #define memcpy(dst, src, len)         memcpy((dst), (src), (len))
 #define A_MEMZERO(addr, len)            memset((addr), 0, (len))
-#define A_MEMCMP(addr1, addr2, len)     memcmp((addr1), (addr2), (len))
+#define memcmp(addr1, addr2, len)     memcmp((addr1), (addr2), (len))
 #define A_MALLOC(size)                  malloc(size)
 #define A_FREE(addr)                    free(addr)
 
diff --git a/drivers/staging/ath6kl/os/linux/ioctl.c b/drivers/staging/ath6kl/os/linux/ioctl.c
index 2173d6d..b692a29 100644
--- a/drivers/staging/ath6kl/os/linux/ioctl.c
+++ b/drivers/staging/ath6kl/os/linux/ioctl.c
@@ -547,7 +547,7 @@ static int ar6000_ioctl_set_badAp(struct net_device *dev, struct ifreq *rq)
 		return -EIO;
 	}
 
-	if (A_MEMCMP(cmd.bssid, null_mac, AR6000_ETH_ADDR_LEN) == 0) {
+	if (memcmp(cmd.bssid, null_mac, AR6000_ETH_ADDR_LEN) == 0) {
 		/*
 		 * This is a delete badAP.
 		 */
@@ -3129,7 +3129,7 @@ int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 			} else if (copy_from_user(&adhocBssid, userdata,
 						  sizeof(adhocBssid))) {
 				ret = -EFAULT;
-			} else if (A_MEMCMP(adhocBssid.bssid, bcast_mac,
+			} else if (memcmp(adhocBssid.bssid, bcast_mac,
 					    AR6000_ETH_ADDR_LEN) == 0) {
 				ret = -EFAULT;
 			} else {
@@ -4874,7 +4874,7 @@ u8 mac_cmp_wild(u8 * mac, u8 * new_mac, u8 wild, u8 new_wild)
 		if (mac[i] != new_mac[i])
 			return 1;
 	}
-	if ((A_MEMCMP(new_mac, null_mac, 6) == 0) && new_wild &&
+	if ((memcmp(new_mac, null_mac, 6) == 0) && new_wild &&
 	    (wild != new_wild)) {
 		return 1;
 	}
diff --git a/drivers/staging/ath6kl/os/linux/wireless_ext.c b/drivers/staging/ath6kl/os/linux/wireless_ext.c
index 57817b9..d4f3343 100644
--- a/drivers/staging/ath6kl/os/linux/wireless_ext.c
+++ b/drivers/staging/ath6kl/os/linux/wireless_ext.c
@@ -530,7 +530,7 @@ ar6000_ioctl_siwessid(struct net_device *dev,
 
 	if (ar->arNextMode == AP_NETWORK) {
 		/* SSID change for AP network - Will take effect on commit */
-		if (A_MEMCMP(ar->arSsid, ssid, 32) != 0) {
+		if (memcmp(ar->arSsid, ssid, 32) != 0) {
 			ar->arSsidLen = data->length - 1;
 			memcpy(ar->arSsid, ssid, ar->arSsidLen);
 			ar->ap_profile_flag = 1;	/* There is a change in profile */
@@ -608,7 +608,7 @@ ar6000_ioctl_siwessid(struct net_device *dev,
 	    ((ar->arSsidLen) || ((ar->arSsidLen == 0) && ar->arConnected)
 	     || (!data->flags))) {
 		if ((!data->flags)
-		    || (A_MEMCMP(ar->arSsid, ssid, ar->arSsidLen) != 0)
+		    || (memcmp(ar->arSsid, ssid, ar->arSsidLen) != 0)
 		    || (ar->arSsidLen != (data->length - 1))) {
 			/*
 			 * SSID set previously or essid off has been issued.
@@ -1662,7 +1662,7 @@ static int ar6000_set_wapi_key(struct net_device *dev,
 	keyLen = erq->length - sizeof(struct iw_encode_ext);
 	memcpy(wapiKeyRsc, ext->tx_seq, sizeof(wapiKeyRsc));
 
-	if (A_MEMCMP(ext->addr.sa_data, broadcastMac, sizeof(broadcastMac)) ==
+	if (memcmp(ext->addr.sa_data, broadcastMac, sizeof(broadcastMac)) ==
 	    0) {
 		keyUsage |= GROUP_USAGE;
 		PN = (u32 *) wapiKeyRsc;
@@ -2363,7 +2363,7 @@ ar6000_ioctl_siwap(struct net_device *dev,
 		return -EIO;
 	}
 
-	if (A_MEMCMP(&ap_addr->sa_data, bcast_mac, AR6000_ETH_ADDR_LEN) == 0) {
+	if (memcmp(&ap_addr->sa_data, bcast_mac, AR6000_ETH_ADDR_LEN) == 0) {
 		A_MEMZERO(ar->arReqBssid, sizeof(ar->arReqBssid));
 	} else {
 		memcpy(ar->arReqBssid, &ap_addr->sa_data,
diff --git a/drivers/staging/ath6kl/wlan/include/ieee80211.h b/drivers/staging/ath6kl/wlan/include/ieee80211.h
index fb992d4..1619223 100644
--- a/drivers/staging/ath6kl/wlan/include/ieee80211.h
+++ b/drivers/staging/ath6kl/wlan/include/ieee80211.h
@@ -66,7 +66,7 @@
 #define TKIP_MICLEN  IEEE80211_WEP_MICLEN
 
 #define IEEE80211_ADDR_EQ(addr1, addr2)     \
-    (A_MEMCMP(addr1, addr2, IEEE80211_ADDR_LEN) == 0)
+    (memcmp(addr1, addr2, IEEE80211_ADDR_LEN) == 0)
 
 #define IEEE80211_ADDR_COPY(dst,src)    memcpy(dst,src,IEEE80211_ADDR_LEN)
 
diff --git a/drivers/staging/ath6kl/wlan/src/wlan_node.c b/drivers/staging/ath6kl/wlan/src/wlan_node.c
index d066360..cf2bcf2 100644
--- a/drivers/staging/ath6kl/wlan/src/wlan_node.c
+++ b/drivers/staging/ath6kl/wlan/src/wlan_node.c
@@ -309,7 +309,7 @@ void wlan_refresh_inactive_nodes(struct ieee80211_node_table *nt)
 	bss = nt->nt_node_first;
 	while (bss != NULL) {
 		nextBss = bss->ni_list_next;
-		if (A_MEMCMP(myBssid, bss->ni_macaddr, sizeof(myBssid)) != 0) {
+		if (memcmp(myBssid, bss->ni_macaddr, sizeof(myBssid)) != 0) {
 			/*
 			 * free up all but the current bss - if set
 			 */
@@ -330,7 +330,7 @@ void wlan_refresh_inactive_nodes(struct ieee80211_node_table *nt)
 	bss = nt->nt_node_first;
 	while (bss != NULL) {
 		nextBss = bss->ni_list_next;
-		if (A_MEMCMP(myBssid, bss->ni_macaddr, sizeof(myBssid)) != 0) {
+		if (memcmp(myBssid, bss->ni_macaddr, sizeof(myBssid)) != 0) {
 
 			if (bss->ni_tstamp <= now || --bss->ni_actcnt == 0) {
 				/*
@@ -359,7 +359,7 @@ static void wlan_node_timeout(A_ATH_TIMER arg)
 	bss = nt->nt_node_first;
 	while (bss != NULL) {
 		nextBss = bss->ni_list_next;
-		if (A_MEMCMP(myBssid, bss->ni_macaddr, sizeof(myBssid)) != 0) {
+		if (memcmp(myBssid, bss->ni_macaddr, sizeof(myBssid)) != 0) {
 
 			if (bss->ni_tstamp <= A_GET_MS(0)) {
 				/*
@@ -488,7 +488,7 @@ bss_t *wlan_node_remove(struct ieee80211_node_table *nt, u8 * bssid)
 	while (bss != NULL) {
 		nextBss = bss->ni_list_next;
 
-		if (A_MEMCMP(bssid, bss->ni_macaddr, 6) == 0) {
+		if (memcmp(bssid, bss->ni_macaddr, 6) == 0) {
 			wlan_node_remove_core(nt, bss);
 			IEEE80211_NODE_UNLOCK(nt);
 			return bss;
-- 
1.7.4.15.g7811d

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux