diff options
author | Joe Perches <joe@perches.com> | 2015-03-02 19:54:49 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-03 17:01:36 -0500 |
commit | 93803b3385c653bc6fd391c0de00ef811b3dadc0 (patch) | |
tree | e235b7e13f190356597758d2f498ce4e79d6d5a8 /drivers/net/wireless/atmel.c | |
parent | 519983b129477cb8e0bbea334c72ecd4486b2d21 (diff) | |
download | linux-93803b3385c653bc6fd391c0de00ef811b3dadc0.tar.bz2 |
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.c | 16 |
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, atmel_copy_to_host(priv->dev, (void *)&netcrc, rx_packet_loc + msdu_size, 4); if ((crc ^ 0xffffffff) != netcrc) { priv->dev->stats.rx_crc_errors++; - memset(priv->frag_source, 0xff, ETH_ALEN); + eth_broadcast_addr(priv->frag_source); } } @@ -1022,7 +1022,7 @@ static void frag_rx_path(struct atmel_private *priv, atmel_copy_to_host(priv->dev, (void *)&netcrc, rx_packet_loc + msdu_size, 4); if ((crc ^ 0xffffffff) != netcrc) { priv->dev->stats.rx_crc_errors++; - memset(priv->frag_source, 0xff, ETH_ALEN); + eth_broadcast_addr(priv->frag_source); more_frags = 1; /* don't send broken assembly */ } } @@ -1031,7 +1031,7 @@ static void frag_rx_path(struct atmel_private *priv, priv->frag_no++; if (!more_frags) { /* last one */ - memset(priv->frag_source, 0xff, ETH_ALEN); + eth_broadcast_addr(priv->frag_source); if (!(skb = dev_alloc_skb(priv->frag_len + 14))) { priv->dev->stats.rx_dropped++; } else { @@ -1127,7 +1127,7 @@ static void rx_done_irq(struct atmel_private *priv) atmel_copy_to_host(priv->dev, (unsigned char *)&priv->rx_buf, rx_packet_loc + 24, msdu_size); /* we use the same buffer for frag reassembly and control packets */ - memset(priv->frag_source, 0xff, ETH_ALEN); + eth_broadcast_addr(priv->frag_source); if (priv->do_rx_crc) { /* last 4 octets is crc */ @@ -1379,7 +1379,7 @@ static int atmel_close(struct net_device *dev) wrqu.data.length = 0; wrqu.data.flags = 0; wrqu.ap_addr.sa_family = ARPHRD_ETHER; - memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN); + eth_zero_addr(wrqu.ap_addr.sa_data); wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL); } @@ -1555,7 +1555,7 @@ struct net_device *init_atmel_card(unsigned short irq, unsigned long port, priv->last_qual = jiffies; priv->last_beacon_timestamp = 0; memset(priv->frag_source, 0xff, sizeof(priv->frag_source)); - memset(priv->BSSID, 0, ETH_ALEN); + eth_zero_addr(priv->BSSID); priv->CurrentBSSID[0] = 0xFF; /* Initialize to something invalid.... */ priv->station_was_associated = 0; @@ -2760,7 +2760,7 @@ static void atmel_scan(struct atmel_private *priv, int specific_ssid) u8 SSID_size; } cmd; - memset(cmd.BSSID, 0xff, ETH_ALEN); + eth_broadcast_addr(cmd.BSSID); if (priv->fast_scan) { cmd.SSID_size = priv->SSID_size; @@ -4049,7 +4049,7 @@ static int reset_atmel_card(struct net_device *dev) wrqu.data.length = 0; wrqu.data.flags = 0; wrqu.ap_addr.sa_family = ARPHRD_ETHER; - memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN); + eth_zero_addr(wrqu.ap_addr.sa_data); wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL); } |