mac80211: use struct assignment for he_obss_pd
authorJohannes Berg <johannes.berg@intel.com>
Sun, 6 Dec 2020 12:54:41 +0000 (14:54 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 11 Dec 2020 12:20:05 +0000 (13:20 +0100)
Use a struct assignment here, which is clearer than the
memcpy() and type-safe as well.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20201206145305.2ab3aad7d5fc.Iaca4ee6db651b7de17e4351f4be7973ff8600186@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/cfg.c

index 1344ce2..e0f4662 100644 (file)
@@ -1122,8 +1122,7 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev,
        sdata->vif.bss_conf.enable_beacon = true;
        sdata->vif.bss_conf.allow_p2p_go_ps = sdata->vif.p2p;
        sdata->vif.bss_conf.twt_responder = params->twt_responder;
-       memcpy(&sdata->vif.bss_conf.he_obss_pd, &params->he_obss_pd,
-              sizeof(struct ieee80211_he_obss_pd));
+       sdata->vif.bss_conf.he_obss_pd = params->he_obss_pd;
        sdata->vif.bss_conf.he_bss_color = params->he_bss_color;
        sdata->vif.bss_conf.s1g = params->chandef.chan->band ==
                                  NL80211_BAND_S1GHZ;