summary refs log tree commit diff
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-12-19 08:36:18 -0800
committerDavid S. Miller <davem@davemloft.net>2018-12-19 08:36:18 -0800
commit5a862f86b8e86562fc8532160c5530a13e1e944b (patch)
tree0fa13538752825a01dc98c34dc175271c9341815 /net/mac80211/iface.c
parent33f18c96afdf4da20014f834874e2820ee880cde (diff)
parentd359bbce0601c6a19203a4b813a7e3910fcba282 (diff)
downloadlinux-5a862f86b8e86562fc8532160c5530a13e1e944b.tar.gz
Merge tag 'mac80211-next-for-davem-2018-12-19' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Johannes Berg says:

====================
This time we have too many changes to list, highlights:
 * virt_wifi - wireless control simulation on top of
   another network interface
 * hwsim configurability to test capabilities similar
   to real hardware
 * various mesh improvements
 * various radiotap vendor data fixes in mac80211
 * finally the nl_set_extack_cookie_u64() we talked
   about previously, used for
 * peer measurement APIs, right now only with FTM
   (flight time measurement) for location
 * made nl80211 radio/interface announcements more complete
 * various new HE (802.11ax) things:
   updates, TWT support, ...
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r--net/mac80211/iface.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 5f3c81e705c7..e9652e623a31 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1801,7 +1801,7 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
 		}
 
 		ieee80211_assign_perm_addr(local, ndev->perm_addr, type);
-		if (params && is_valid_ether_addr(params->macaddr))
+		if (is_valid_ether_addr(params->macaddr))
 			memcpy(ndev->dev_addr, params->macaddr, ETH_ALEN);
 		else
 			memcpy(ndev->dev_addr, ndev->perm_addr, ETH_ALEN);
@@ -1870,11 +1870,9 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
 	ieee80211_setup_sdata(sdata, type);
 
 	if (ndev) {
-		if (params) {
-			ndev->ieee80211_ptr->use_4addr = params->use_4addr;
-			if (type == NL80211_IFTYPE_STATION)
-				sdata->u.mgd.use_4addr = params->use_4addr;
-		}
+		ndev->ieee80211_ptr->use_4addr = params->use_4addr;
+		if (type == NL80211_IFTYPE_STATION)
+			sdata->u.mgd.use_4addr = params->use_4addr;
 
 		ndev->features |= local->hw.netdev_features;