aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/atmel.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2015-03-02 22:54:49 -0500
committerDavid S. Miller <davem@davemloft.net>2015-03-03 17:01:36 -0500
commit93803b3385c653bc6fd391c0de00ef811b3dadc0 (patch)
treee235b7e13f190356597758d2f498ce4e79d6d5a8 /drivers/net/wireless/atmel.c
parent519983b129477cb8e0bbea334c72ecd4486b2d21 (diff)
wireless: Use eth_<foo>_addr instead of memset
Use the built-in function instead of memset. Miscellanea: Add #include <linux/etherdevice.h> where appropriate Use ETH_ALEN instead of 6 Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/atmel.c')
-rw-r--r--drivers/net/wireless/atmel.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c
index 55db9f03eb2a..6a1f03c271c1 100644
--- a/drivers/net/wireless/atmel.c
+++ b/drivers/net/wireless/atmel.c
@@ -1004,7 +1004,7 @@ static void frag_rx_path(struct atmel_private *priv,
1004 atmel_copy_to_host(priv->dev, (void *)&netcrc, rx_packet_loc + msdu_size, 4); 1004 atmel_copy_to_host(priv->dev, (void *)&netcrc, rx_packet_loc + msdu_size, 4);
1005 if ((crc ^ 0xffffffff) != netcrc) { 1005 if ((crc ^ 0xffffffff) != netcrc) {
1006 priv->dev->stats.rx_crc_errors++; 1006 priv->dev->stats.rx_crc_errors++;
1007 memset(priv->frag_source, 0xff, ETH_ALEN); 1007 eth_broadcast_addr(priv->frag_source);
1008 } 1008 }
1009 } 1009 }
1010 1010
@@ -1022,7 +1022,7 @@ static void frag_rx_path(struct atmel_private *priv,
1022 atmel_copy_to_host(priv->dev, (void *)&netcrc, rx_packet_loc + msdu_size, 4); 1022 atmel_copy_to_host(priv->dev, (void *)&netcrc, rx_packet_loc + msdu_size, 4);
1023 if ((crc ^ 0xffffffff) != netcrc) { 1023 if ((crc ^ 0xffffffff) != netcrc) {
1024 priv->dev->stats.rx_crc_errors++; 1024 priv->dev->stats.rx_crc_errors++;
1025 memset(priv->frag_source, 0xff, ETH_ALEN); 1025 eth_broadcast_addr(priv->frag_source);
1026 more_frags = 1; /* don't send broken assembly */ 1026 more_frags = 1; /* don't send broken assembly */
1027 } 1027 }
1028 } 1028 }
@@ -1031,7 +1031,7 @@ static void frag_rx_path(struct atmel_private *priv,
1031 priv->frag_no++; 1031 priv->frag_no++;
1032 1032
1033 if (!more_frags) { /* last one */ 1033 if (!more_frags) { /* last one */
1034 memset(priv->frag_source, 0xff, ETH_ALEN); 1034 eth_broadcast_addr(priv->frag_source);
1035 if (!(skb = dev_alloc_skb(priv->frag_len + 14))) { 1035 if (!(skb = dev_alloc_skb(priv->frag_len + 14))) {
1036 priv->dev->stats.rx_dropped++; 1036 priv->dev->stats.rx_dropped++;
1037 } else { 1037 } else {
@@ -1127,7 +1127,7 @@ static void rx_done_irq(struct atmel_private *priv)
1127 atmel_copy_to_host(priv->dev, (unsigned char *)&priv->rx_buf, rx_packet_loc + 24, msdu_size); 1127 atmel_copy_to_host(priv->dev, (unsigned char *)&priv->rx_buf, rx_packet_loc + 24, msdu_size);
1128 1128
1129 /* we use the same buffer for frag reassembly and control packets */ 1129 /* we use the same buffer for frag reassembly and control packets */
1130 memset(priv->frag_source, 0xff, ETH_ALEN); 1130 eth_broadcast_addr(priv->frag_source);
1131 1131
1132 if (priv->do_rx_crc) { 1132 if (priv->do_rx_crc) {
1133 /* last 4 octets is crc */ 1133 /* last 4 octets is crc */
@@ -1379,7 +1379,7 @@ static int atmel_close(struct net_device *dev)
1379 wrqu.data.length = 0; 1379 wrqu.data.length = 0;
1380 wrqu.data.flags = 0; 1380 wrqu.data.flags = 0;
1381 wrqu.ap_addr.sa_family = ARPHRD_ETHER; 1381 wrqu.ap_addr.sa_family = ARPHRD_ETHER;
1382 memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN); 1382 eth_zero_addr(wrqu.ap_addr.sa_data);
1383 wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL); 1383 wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL);
1384 } 1384 }
1385 1385
@@ -1555,7 +1555,7 @@ struct net_device *init_atmel_card(unsigned short irq, unsigned long port,
1555 priv->last_qual = jiffies; 1555 priv->last_qual = jiffies;
1556 priv->last_beacon_timestamp = 0; 1556 priv->last_beacon_timestamp = 0;
1557 memset(priv->frag_source, 0xff, sizeof(priv->frag_source)); 1557 memset(priv->frag_source, 0xff, sizeof(priv->frag_source));
1558 memset(priv->BSSID, 0, ETH_ALEN); 1558 eth_zero_addr(priv->BSSID);
1559 priv->CurrentBSSID[0] = 0xFF; /* Initialize to something invalid.... */ 1559 priv->CurrentBSSID[0] = 0xFF; /* Initialize to something invalid.... */
1560 priv->station_was_associated = 0; 1560 priv->station_was_associated = 0;
1561 1561
@@ -2760,7 +2760,7 @@ static void atmel_scan(struct atmel_private *priv, int specific_ssid)
2760 u8 SSID_size; 2760 u8 SSID_size;
2761 } cmd; 2761 } cmd;
2762 2762
2763 memset(cmd.BSSID, 0xff, ETH_ALEN); 2763 eth_broadcast_addr(cmd.BSSID);
2764 2764
2765 if (priv->fast_scan) { 2765 if (priv->fast_scan) {
2766 cmd.SSID_size = priv->SSID_size; 2766 cmd.SSID_size = priv->SSID_size;
@@ -4049,7 +4049,7 @@ static int reset_atmel_card(struct net_device *dev)
4049 wrqu.data.length = 0; 4049 wrqu.data.length = 0;
4050 wrqu.data.flags = 0; 4050 wrqu.data.flags = 0;
4051 wrqu.ap_addr.sa_family = ARPHRD_ETHER; 4051 wrqu.ap_addr.sa_family = ARPHRD_ETHER;
4052 memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN); 4052 eth_zero_addr(wrqu.ap_addr.sa_data);
4053 wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL); 4053 wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL);
4054 } 4054 }
4055 4055