diff options
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/cfg.c | 3 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 11 |
2 files changed, 9 insertions, 5 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 516fbc96feff..0479c64aa83c 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -2004,7 +2004,8 @@ static int ieee80211_set_mcast_rate(struct wiphy *wiphy, struct net_device *dev, | |||
2004 | { | 2004 | { |
2005 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 2005 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
2006 | 2006 | ||
2007 | memcpy(sdata->vif.bss_conf.mcast_rate, rate, sizeof(rate)); | 2007 | memcpy(sdata->vif.bss_conf.mcast_rate, rate, |
2008 | sizeof(int) * IEEE80211_NUM_BANDS); | ||
2008 | 2009 | ||
2009 | return 0; | 2010 | return 0; |
2010 | } | 2011 | } |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index a3552929a21d..5107248af7fb 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -3400,6 +3400,7 @@ ieee80211_determine_chantype(struct ieee80211_sub_if_data *sdata, | |||
3400 | 3400 | ||
3401 | ret = 0; | 3401 | ret = 0; |
3402 | 3402 | ||
3403 | out: | ||
3403 | while (!cfg80211_chandef_usable(sdata->local->hw.wiphy, chandef, | 3404 | while (!cfg80211_chandef_usable(sdata->local->hw.wiphy, chandef, |
3404 | IEEE80211_CHAN_DISABLED)) { | 3405 | IEEE80211_CHAN_DISABLED)) { |
3405 | if (WARN_ON(chandef->width == NL80211_CHAN_WIDTH_20_NOHT)) { | 3406 | if (WARN_ON(chandef->width == NL80211_CHAN_WIDTH_20_NOHT)) { |
@@ -3408,14 +3409,13 @@ ieee80211_determine_chantype(struct ieee80211_sub_if_data *sdata, | |||
3408 | goto out; | 3409 | goto out; |
3409 | } | 3410 | } |
3410 | 3411 | ||
3411 | ret = chandef_downgrade(chandef); | 3412 | ret |= chandef_downgrade(chandef); |
3412 | } | 3413 | } |
3413 | 3414 | ||
3414 | if (chandef->width != vht_chandef.width) | 3415 | if (chandef->width != vht_chandef.width) |
3415 | sdata_info(sdata, | 3416 | sdata_info(sdata, |
3416 | "local regulatory prevented using AP HT/VHT configuration, downgraded\n"); | 3417 | "capabilities/regulatory prevented using AP HT/VHT configuration, downgraded\n"); |
3417 | 3418 | ||
3418 | out: | ||
3419 | WARN_ON_ONCE(!cfg80211_chandef_valid(chandef)); | 3419 | WARN_ON_ONCE(!cfg80211_chandef_valid(chandef)); |
3420 | return ret; | 3420 | return ret; |
3421 | } | 3421 | } |
@@ -3529,8 +3529,11 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata, | |||
3529 | */ | 3529 | */ |
3530 | ret = ieee80211_vif_use_channel(sdata, &chandef, | 3530 | ret = ieee80211_vif_use_channel(sdata, &chandef, |
3531 | IEEE80211_CHANCTX_SHARED); | 3531 | IEEE80211_CHANCTX_SHARED); |
3532 | while (ret && chandef.width != NL80211_CHAN_WIDTH_20_NOHT) | 3532 | while (ret && chandef.width != NL80211_CHAN_WIDTH_20_NOHT) { |
3533 | ifmgd->flags |= chandef_downgrade(&chandef); | 3533 | ifmgd->flags |= chandef_downgrade(&chandef); |
3534 | ret = ieee80211_vif_use_channel(sdata, &chandef, | ||
3535 | IEEE80211_CHANCTX_SHARED); | ||
3536 | } | ||
3534 | return ret; | 3537 | return ret; |
3535 | } | 3538 | } |
3536 | 3539 | ||