diff options
author | Joe Perches <joe@perches.com> | 2015-03-03 06:54:49 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-04 01:01:36 +0300 |
commit | 93803b3385c653bc6fd391c0de00ef811b3dadc0 (patch) | |
tree | e235b7e13f190356597758d2f498ce4e79d6d5a8 /drivers/net/wireless/mwifiex/cfg80211.c | |
parent | 519983b129477cb8e0bbea334c72ecd4486b2d21 (diff) | |
download | linux-93803b3385c653bc6fd391c0de00ef811b3dadc0.tar.xz |
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/mwifiex/cfg80211.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/cfg80211.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index 41c8e25df954..7c3ca2f50186 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c @@ -1563,7 +1563,7 @@ mwifiex_cfg80211_del_station(struct wiphy *wiphy, struct net_device *dev, wiphy_dbg(wiphy, "%s: mac address %pM\n", __func__, params->mac); - memset(deauth_mac, 0, ETH_ALEN); + eth_zero_addr(deauth_mac); spin_lock_irqsave(&priv->sta_list_spinlock, flags); sta_node = mwifiex_get_sta_entry(priv, params->mac); @@ -1786,7 +1786,7 @@ mwifiex_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *dev, wiphy_dbg(wiphy, "info: successfully disconnected from %pM:" " reason code %d\n", priv->cfg_bssid, reason_code); - memset(priv->cfg_bssid, 0, ETH_ALEN); + eth_zero_addr(priv->cfg_bssid); priv->hs2_enabled = false; return 0; @@ -2046,7 +2046,7 @@ mwifiex_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, dev_dbg(priv->adapter->dev, "info: association to bssid %pM failed\n", priv->cfg_bssid); - memset(priv->cfg_bssid, 0, ETH_ALEN); + eth_zero_addr(priv->cfg_bssid); if (ret > 0) cfg80211_connect_result(priv->netdev, priv->cfg_bssid, @@ -2194,7 +2194,7 @@ mwifiex_cfg80211_leave_ibss(struct wiphy *wiphy, struct net_device *dev) if (mwifiex_deauthenticate(priv, NULL)) return -EFAULT; - memset(priv->cfg_bssid, 0, ETH_ALEN); + eth_zero_addr(priv->cfg_bssid); return 0; } |