Refresh all patches.
This contains fixes for CVE-2020-3702
1. These patches (ath, ath9k, mac80211) were included in kernel
versions since 4.14.245 and 4.19.205. They fix security vulnerability
CVE-2020-3702 [1] similar to KrØØk, which was found by ESET [2].
Thank you Josef Schlehofer for reporting this problem.
[1] https://nvd.nist.gov/vuln/detail/CVE-2020-3702
[2] https://www.welivesecurity.com/2020/08/06/beyond-kr00k-even-more-wifi-chips-vulnerable-eavesdropping/
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
PKG_NAME:=mac80211
-PKG_VERSION:=4.19.193-1
+PKG_VERSION:=4.19.207-1
PKG_RELEASE:=1
-PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v4.19.193/
-PKG_HASH:=560c0ce9e4079fd26d046e188453e008a5e766e5409d950c4749a23da53d6d0a
+PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v4.19.207/
+PKG_HASH:=e119fd57c868e22c0481171ff561902f8c1565f896d97a2163c0d138808cc5f7
PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -2976,7 +2976,8 @@ void ath9k_hw_apply_txpower(struct ath_h
+@@ -2978,7 +2978,8 @@ void ath9k_hw_apply_txpower(struct ath_h
{
struct ath_regulatory *reg = ath9k_hw_regulatory(ah);
struct ieee80211_channel *channel;
u16 ctl = NO_CTL;
if (!chan)
-@@ -2988,9 +2989,14 @@ void ath9k_hw_apply_txpower(struct ath_h
+@@ -2990,9 +2991,14 @@ void ath9k_hw_apply_txpower(struct ath_h
channel = chan->chan;
chan_pwr = min_t(int, channel->max_power * 2, MAX_RATE_POWER);
new_pwr = min_t(int, chan_pwr, reg->power_limit);
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -2995,6 +2995,10 @@ void ath9k_hw_apply_txpower(struct ath_h
+@@ -2997,6 +2997,10 @@ void ath9k_hw_apply_txpower(struct ath_h
if (ant_gain > max_gain)
ant_reduction = ant_gain - max_gain;
CFLAGS_trace.o := -I$(src)
--- a/drivers/net/wireless/ath/ath.h
+++ b/drivers/net/wireless/ath/ath.h
-@@ -316,14 +316,7 @@ void _ath_dbg(struct ath_common *common,
+@@ -317,14 +317,7 @@ void _ath_dbg(struct ath_common *common,
#endif /* CPTCFG_ATH_DEBUG */
/** Returns string describing opmode, or NULL if unknown mode. */
bool reset_power_on;
bool htc_reset_init;
-@@ -1073,6 +1081,7 @@ void ath9k_hw_check_nav(struct ath_hw *a
+@@ -1074,6 +1082,7 @@ void ath9k_hw_check_nav(struct ath_hw *a
bool ath9k_hw_check_alive(struct ath_hw *ah);
bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode);
struct ath_gen_timer *ath_gen_timer_alloc(struct ath_hw *ah,
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -1883,6 +1883,20 @@ u32 ath9k_hw_get_tsf_offset(struct times
+@@ -1882,6 +1882,20 @@ u32 ath9k_hw_get_tsf_offset(struct times
}
EXPORT_SYMBOL(ath9k_hw_get_tsf_offset);
int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
struct ath9k_hw_cal_data *caldata, bool fastcc)
{
-@@ -2091,6 +2105,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
+@@ -2090,6 +2104,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
ar9003_hw_disable_phy_restart(ah);
ath9k_hw_apply_gpio_override(ah);
REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, AR_BTCOEX_WL_LNADIV_FORCE_ON);
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -528,6 +528,11 @@ irqreturn_t ath_isr(int irq, void *dev)
+@@ -533,6 +533,11 @@ irqreturn_t ath_isr(int irq, void *dev)
if (test_bit(ATH_OP_HW_RESET, &common->op_flags))
return IRQ_HANDLED;
return true;
}
-@@ -1861,8 +1880,14 @@ static int ath9k_hw_do_fastcc(struct ath
+@@ -1860,8 +1879,14 @@ static int ath9k_hw_do_fastcc(struct ath
if (AR_SREV_9271(ah))
ar9002_hw_load_ani_reg(ah, chan);
return -EINVAL;
}
-@@ -2116,6 +2141,9 @@ int ath9k_hw_reset(struct ath_hw *ah, st
+@@ -2115,6 +2140,9 @@ int ath9k_hw_reset(struct ath_hw *ah, st
ath9k_hw_set_radar_params(ah);
}
u8 ath9k_parse_mpdudensity(u8 mpdudensity)
{
-@@ -649,6 +651,7 @@ void ath_reset_work(struct work_struct *
+@@ -654,6 +656,7 @@ void ath_reset_work(struct work_struct *
static int ath9k_start(struct ieee80211_hw *hw)
{
struct ath_softc *sc = hw->priv;
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
struct ieee80211_channel *curchan = sc->cur_chan->chandef.chan;
-@@ -727,6 +730,11 @@ static int ath9k_start(struct ieee80211_
+@@ -732,6 +735,11 @@ static int ath9k_start(struct ieee80211_
AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
}
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
-@@ -8293,6 +8293,21 @@ static int ath10k_mac_init_rd(struct ath
+@@ -8294,6 +8294,21 @@ static int ath10k_mac_init_rd(struct ath
return 0;
}
int ath10k_mac_register(struct ath10k *ar)
{
static const u32 cipher_suites[] = {
-@@ -8577,6 +8592,12 @@ int ath10k_mac_register(struct ath10k *a
+@@ -8578,6 +8593,12 @@ int ath10k_mac_register(struct ath10k *a
wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
if (ret)
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
-@@ -8609,7 +8609,7 @@ int ath10k_mac_register(struct ath10k *a
+@@ -8610,7 +8610,7 @@ int ath10k_mac_register(struct ath10k *a
wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
#ifdef CPTCFG_MAC80211_LEDS
static int ath10k_mac_get_max_vht_mcs_map(u16 mcs_map, int nss)
{
switch ((mcs_map >> (2 * nss)) & 0x3) {
-@@ -5478,9 +5494,10 @@ static void ath10k_bss_info_changed(stru
+@@ -5479,9 +5495,10 @@ static void ath10k_bss_info_changed(stru
struct cfg80211_chan_def def;
u32 vdev_param, pdev_param, slottime, preamble;
u16 bitrate, hw_value;
mutex_lock(&ar->conf_mutex);
-@@ -5686,6 +5703,30 @@ static void ath10k_bss_info_changed(stru
+@@ -5687,6 +5704,30 @@ static void ath10k_bss_info_changed(stru
arvif->vdev_id, ret);
}
if (ath10k_rates[i].bitrate == bitrate)
return hw_value_prefix | ath10k_rates[i].hw_value;
}
-@@ -5709,22 +5709,22 @@ static void ath10k_bss_info_changed(stru
+@@ -5710,22 +5710,22 @@ static void ath10k_bss_info_changed(stru
return;
}
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
-@@ -5494,8 +5494,8 @@ static void ath10k_bss_info_changed(stru
+@@ -5495,8 +5495,8 @@ static void ath10k_bss_info_changed(stru
struct cfg80211_chan_def def;
u32 vdev_param, pdev_param, slottime, preamble;
u16 bitrate, hw_value;
enum nl80211_band band;
const struct ieee80211_supported_band *sband;
-@@ -5668,7 +5668,11 @@ static void ath10k_bss_info_changed(stru
+@@ -5669,7 +5669,11 @@ static void ath10k_bss_info_changed(stru
if (changed & BSS_CHANGED_MCAST_RATE &&
!ath10k_mac_vif_chan(arvif->vif, &def)) {
band = def.chan->band;
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
-@@ -6657,6 +6657,12 @@ static s32 brcmf_config_dongle(struct br
+@@ -6660,6 +6660,12 @@ static s32 brcmf_config_dongle(struct br
brcmf_configure_arp_nd_offload(ifp, true);
return err;
}
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_RX_PACKETS) |
-@@ -2566,7 +2592,7 @@ brcmf_cfg80211_get_station(struct wiphy
+@@ -2567,7 +2593,7 @@ brcmf_cfg80211_get_station(struct wiphy
&sta_info_le,
sizeof(sta_info_le));
if (err < 0) {
goto done;
}
}
-@@ -2635,7 +2661,8 @@ brcmf_cfg80211_get_station(struct wiphy
+@@ -2638,7 +2664,8 @@ brcmf_cfg80211_get_station(struct wiphy
err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_RSSI,
&scb_val, sizeof(scb_val));
if (err) {
goto done;
} else {
rssi = le32_to_cpu(scb_val.val);
-@@ -2666,8 +2693,8 @@ brcmf_cfg80211_dump_station(struct wiphy
+@@ -2669,8 +2696,8 @@ brcmf_cfg80211_dump_station(struct wiphy
&cfg->assoclist,
sizeof(cfg->assoclist));
if (err) {
cfg->assoclist.count = 0;
return -EOPNOTSUPP;
}
-@@ -2715,9 +2742,9 @@ brcmf_cfg80211_set_power_mgmt(struct wip
+@@ -2718,9 +2745,9 @@ brcmf_cfg80211_set_power_mgmt(struct wip
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_PM, pm);
if (err) {
if (err == -ENODEV)
}
done:
brcmf_dbg(TRACE, "Exit\n");
-@@ -2740,7 +2767,7 @@ static s32 brcmf_inform_single_bss(struc
+@@ -2743,7 +2770,7 @@ static s32 brcmf_inform_single_bss(struc
struct cfg80211_inform_bss bss_data = {};
if (le32_to_cpu(bi->length) > WL_BSS_INFO_MAX) {
return 0;
}
-@@ -2799,6 +2826,7 @@ next_bss_le(struct brcmf_scan_results *l
+@@ -2802,6 +2829,7 @@ next_bss_le(struct brcmf_scan_results *l
static s32 brcmf_inform_bss(struct brcmf_cfg80211_info *cfg)
{
struct brcmf_scan_results *bss_list;
struct brcmf_bss_info_le *bi = NULL; /* must be initialized */
s32 err = 0;
-@@ -2807,8 +2835,8 @@ static s32 brcmf_inform_bss(struct brcmf
+@@ -2810,8 +2838,8 @@ static s32 brcmf_inform_bss(struct brcmf
bss_list = (struct brcmf_scan_results *)cfg->escan_info.escan_buf;
if (bss_list->count != 0 &&
bss_list->version != BRCMF_BSS_INFO_VERSION) {
return -EOPNOTSUPP;
}
brcmf_dbg(SCAN, "scanned AP count (%d)\n", bss_list->count);
-@@ -2852,7 +2880,7 @@ static s32 brcmf_inform_ibss(struct brcm
+@@ -2855,7 +2883,7 @@ static s32 brcmf_inform_ibss(struct brcm
err = brcmf_fil_cmd_data_get(netdev_priv(ndev), BRCMF_C_GET_BSS_INFO,
buf, WL_BSS_INFO_MAX);
if (err) {
goto CleanUp;
}
-@@ -2906,6 +2934,7 @@ CleanUp:
+@@ -2909,6 +2937,7 @@ CleanUp:
static s32 brcmf_update_bss_info(struct brcmf_cfg80211_info *cfg,
struct brcmf_if *ifp)
{
struct brcmf_bss_info_le *bi;
const struct brcmf_tlv *tim;
u16 beacon_interval;
-@@ -2922,7 +2951,7 @@ static s32 brcmf_update_bss_info(struct
+@@ -2925,7 +2954,7 @@ static s32 brcmf_update_bss_info(struct
err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_BSS_INFO,
cfg->extra_buf, WL_EXTRA_BUF_MAX);
if (err) {
goto update_bss_info_out;
}
-@@ -2947,7 +2976,7 @@ static s32 brcmf_update_bss_info(struct
+@@ -2950,7 +2979,7 @@ static s32 brcmf_update_bss_info(struct
u32 var;
err = brcmf_fil_iovar_int_get(ifp, "dtim_assoc", &var);
if (err) {
goto update_bss_info_out;
}
dtim_period = (u8)var;
-@@ -2985,9 +3014,10 @@ static void brcmf_escan_timeout(struct t
+@@ -2988,9 +3017,10 @@ static void brcmf_escan_timeout(struct t
{
struct brcmf_cfg80211_info *cfg =
from_timer(cfg, t, escan_timeout);
schedule_work(&cfg->escan_timeout_work);
}
}
-@@ -3036,6 +3066,7 @@ brcmf_cfg80211_escan_handler(struct brcm
+@@ -3039,6 +3069,7 @@ brcmf_cfg80211_escan_handler(struct brcm
const struct brcmf_event_msg *e, void *data)
{
struct brcmf_cfg80211_info *cfg = ifp->drvr->config;
s32 status;
struct brcmf_escan_result_le *escan_result_le;
u32 escan_buflen;
-@@ -3052,32 +3083,33 @@ brcmf_cfg80211_escan_handler(struct brcm
+@@ -3055,32 +3086,33 @@ brcmf_cfg80211_escan_handler(struct brcm
goto exit;
if (!test_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status)) {
goto exit;
}
bss_info_le = &escan_result_le->bss_info_le;
-@@ -3092,8 +3124,8 @@ brcmf_cfg80211_escan_handler(struct brcm
+@@ -3095,8 +3127,8 @@ brcmf_cfg80211_escan_handler(struct brcm
bi_length = le32_to_cpu(bss_info_le->length);
if (bi_length != escan_buflen - WL_ESCAN_RESULTS_FIXED_SIZE) {
goto exit;
}
-@@ -3101,7 +3133,7 @@ brcmf_cfg80211_escan_handler(struct brcm
+@@ -3104,7 +3136,7 @@ brcmf_cfg80211_escan_handler(struct brcm
BIT(NL80211_IFTYPE_ADHOC))) {
if (le16_to_cpu(bss_info_le->capability) &
WLAN_CAPABILITY_IBSS) {
goto exit;
}
}
-@@ -3109,7 +3141,7 @@ brcmf_cfg80211_escan_handler(struct brcm
+@@ -3112,7 +3144,7 @@ brcmf_cfg80211_escan_handler(struct brcm
list = (struct brcmf_scan_results *)
cfg->escan_info.escan_buf;
if (bi_length > BRCMF_ESCAN_BUF_SIZE - list->buflen) {
goto exit;
}
-@@ -3301,14 +3333,14 @@ brcmf_notify_sched_scan_results(struct b
+@@ -3304,14 +3336,14 @@ brcmf_notify_sched_scan_results(struct b
WARN_ON(status != BRCMF_PNO_SCAN_COMPLETE);
brcmf_dbg(SCAN, "PFN NET FOUND event. count: %d\n", result_count);
if (!result_count) {
goto out_err;
}
-@@ -3362,8 +3394,8 @@ brcmf_cfg80211_sched_scan_start(struct w
+@@ -3365,8 +3397,8 @@ brcmf_cfg80211_sched_scan_start(struct w
req->n_match_sets, req->n_ssids);
if (test_bit(BRCMF_SCAN_STATUS_SUPPRESS, &cfg->scan_status)) {
return -EAGAIN;
}
-@@ -3442,6 +3474,7 @@ brcmf_wowl_nd_results(struct brcmf_if *i
+@@ -3445,6 +3477,7 @@ brcmf_wowl_nd_results(struct brcmf_if *i
void *data)
{
struct brcmf_cfg80211_info *cfg = ifp->drvr->config;
struct brcmf_pno_scanresults_le *pfn_result;
struct brcmf_pno_net_info_le *netinfo;
-@@ -3460,8 +3493,8 @@ brcmf_wowl_nd_results(struct brcmf_if *i
+@@ -3463,8 +3496,8 @@ brcmf_wowl_nd_results(struct brcmf_if *i
}
if (le32_to_cpu(pfn_result->count) < 1) {
return -EINVAL;
}
-@@ -3500,7 +3533,7 @@ static void brcmf_report_wowl_wakeind(st
+@@ -3503,7 +3536,7 @@ static void brcmf_report_wowl_wakeind(st
err = brcmf_fil_iovar_data_get(ifp, "wowl_wakeind", &wake_ind_le,
sizeof(wake_ind_le));
if (err) {
return;
}
-@@ -3541,7 +3574,7 @@ static void brcmf_report_wowl_wakeind(st
+@@ -3544,7 +3577,7 @@ static void brcmf_report_wowl_wakeind(st
cfg->wowl.nd_data_completed,
BRCMF_ND_INFO_TIMEOUT);
if (!timeout)
else
wakeup_data.net_detect = cfg->wowl.nd_info;
}
-@@ -3749,7 +3782,7 @@ brcmf_cfg80211_set_pmksa(struct wiphy *w
+@@ -3752,7 +3785,7 @@ brcmf_cfg80211_set_pmksa(struct wiphy *w
cfg->pmk_list.npmk = cpu_to_le32(npmk);
}
} else {
return -EINVAL;
}
-@@ -3795,7 +3828,7 @@ brcmf_cfg80211_del_pmksa(struct wiphy *w
+@@ -3798,7 +3831,7 @@ brcmf_cfg80211_del_pmksa(struct wiphy *w
memset(&pmk[i], 0, sizeof(*pmk));
cfg->pmk_list.npmk = cpu_to_le32(npmk - 1);
} else {
return -EINVAL;
}
-@@ -3827,19 +3860,20 @@ brcmf_cfg80211_flush_pmksa(struct wiphy
+@@ -3830,19 +3863,20 @@ brcmf_cfg80211_flush_pmksa(struct wiphy
static s32 brcmf_configure_opensecurity(struct brcmf_if *ifp)
{
return err;
}
/* set upper-layer auth */
-@@ -3849,7 +3883,7 @@ static s32 brcmf_configure_opensecurity(
+@@ -3852,7 +3886,7 @@ static s32 brcmf_configure_opensecurity(
wpa_val = WPA_AUTH_DISABLED;
err = brcmf_fil_bsscfg_int_set(ifp, "wpa_auth", wpa_val);
if (err < 0) {
return err;
}
-@@ -3869,6 +3903,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
+@@ -3872,6 +3906,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
const struct brcmf_vs_tlv *wpa_ie,
bool is_rsn_ie)
{
u32 auth = 0; /* d11 open authentication */
u16 count;
s32 err = 0;
-@@ -3899,13 +3934,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
+@@ -3902,13 +3937,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
/* check for multicast cipher suite */
if (offset + WPA_IE_MIN_OUI_LEN > len) {
err = -EINVAL;
goto exit;
}
offset += TLV_OUI_LEN;
-@@ -3927,7 +3962,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
+@@ -3930,7 +3965,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
break;
default:
err = -EINVAL;
goto exit;
}
-@@ -3938,13 +3973,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
+@@ -3941,13 +3976,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
/* Check for unicast suite(s) */
if (offset + (WPA_IE_MIN_OUI_LEN * count) > len) {
err = -EINVAL;
goto exit;
}
offset += TLV_OUI_LEN;
-@@ -3962,7 +3997,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
+@@ -3965,7 +4000,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
pval |= AES_ENABLED;
break;
default:
}
offset++;
}
-@@ -3972,13 +4007,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
+@@ -3975,13 +4010,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
/* Check for auth key management suite(s) */
if (offset + (WPA_IE_MIN_OUI_LEN * count) > len) {
err = -EINVAL;
goto exit;
}
offset += TLV_OUI_LEN;
-@@ -4006,7 +4041,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
+@@ -4009,7 +4044,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
wpa_auth |= WPA2_AUTH_1X_SHA256;
break;
default:
}
offset++;
}
-@@ -4048,7 +4083,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
+@@ -4051,7 +4086,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
err = brcmf_fil_bsscfg_int_set(ifp, "wme_bss_disable",
wme_bss_disable);
if (err < 0) {
goto exit;
}
-@@ -4062,7 +4097,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
+@@ -4065,7 +4100,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
&data[offset],
WPA_IE_MIN_OUI_LEN);
if (err < 0) {
goto exit;
}
}
-@@ -4073,13 +4108,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
+@@ -4076,13 +4111,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
/* set auth */
err = brcmf_fil_bsscfg_int_set(ifp, "auth", auth);
if (err < 0) {
goto exit;
}
/* Configure MFP, this needs to go after wsec otherwise the wsec command
-@@ -4088,14 +4123,14 @@ brcmf_configure_wpaie(struct brcmf_if *i
+@@ -4091,14 +4126,14 @@ brcmf_configure_wpaie(struct brcmf_if *i
if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MFP)) {
err = brcmf_fil_bsscfg_int_set(ifp, "mfp", mfp);
if (err < 0) {
goto exit;
}
-@@ -4182,6 +4217,7 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
+@@ -4185,6 +4220,7 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
const u8 *vndr_ie_buf, u32 vndr_ie_len)
{
struct brcmf_if *ifp;
struct vif_saved_ie *saved_ie;
s32 err = 0;
u8 *iovar_ie_buf;
-@@ -4202,6 +4238,7 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
+@@ -4205,6 +4241,7 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
if (!vif)
return -ENODEV;
ifp = vif->ifp;
saved_ie = &vif->saved_ie;
brcmf_dbg(TRACE, "bsscfgidx %d, pktflag : 0x%02X\n", ifp->bsscfgidx,
-@@ -4233,13 +4270,13 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
+@@ -4236,13 +4273,13 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
break;
default:
err = -EPERM;
goto exit;
}
-@@ -4300,8 +4337,8 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
+@@ -4303,8 +4340,8 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
/* verify remained buf size before copy data */
if (remained_buf_len < (vndrie_info->vndrie.len +
VNDR_IE_VSIE_OFFSET)) {
break;
}
remained_buf_len -= (vndrie_info->ie_len +
-@@ -4332,7 +4369,7 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
+@@ -4335,7 +4372,7 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
err = brcmf_fil_bsscfg_data_set(ifp, "vndr_ie", iovar_ie_buf,
total_ie_buf_len);
if (err)
}
exit:
-@@ -4360,13 +4397,14 @@ static s32
+@@ -4363,13 +4400,14 @@ static s32
brcmf_config_ap_mgmt_ie(struct brcmf_cfg80211_vif *vif,
struct cfg80211_beacon_data *beacon)
{
return err;
}
brcmf_dbg(TRACE, "Applied Vndr IEs for Beacon\n");
-@@ -4376,7 +4414,7 @@ brcmf_config_ap_mgmt_ie(struct brcmf_cfg
+@@ -4379,7 +4417,7 @@ brcmf_config_ap_mgmt_ie(struct brcmf_cfg
beacon->proberesp_ies,
beacon->proberesp_ies_len);
if (err)
else
brcmf_dbg(TRACE, "Applied Vndr IEs for Probe Resp\n");
-@@ -4485,7 +4523,8 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
+@@ -4488,7 +4526,8 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_REGULATORY,
is_11d);
if (err < 0) {
goto exit;
}
}
-@@ -4493,8 +4532,8 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
+@@ -4496,8 +4535,8 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_BCNPRD,
settings->beacon_interval);
if (err < 0) {
goto exit;
}
}
-@@ -4502,7 +4541,8 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
+@@ -4505,7 +4544,8 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_DTIMPRD,
settings->dtim_period);
if (err < 0) {
goto exit;
}
}
-@@ -4512,7 +4552,8 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
+@@ -4515,7 +4555,8 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
!brcmf_feat_is_enabled(ifp, BRCMF_FEAT_RSDB))) {
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_DOWN, 1);
if (err < 0) {
goto exit;
}
brcmf_fil_iovar_int_set(ifp, "apsta", 0);
-@@ -4520,7 +4561,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
+@@ -4523,7 +4564,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_INFRA, 1);
if (err < 0) {
goto exit;
}
} else if (WARN_ON(supports_11d && (is_11d != ifp->vif->is_11d))) {
-@@ -4536,7 +4577,8 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
+@@ -4539,7 +4580,8 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_AP, 1);
if (err < 0) {
goto exit;
}
if (!mbss) {
-@@ -4545,14 +4587,14 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
+@@ -4548,14 +4590,14 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
*/
err = brcmf_fil_iovar_int_set(ifp, "chanspec", chanspec);
if (err < 0) {
goto exit;
}
/* On DOWN the firmware removes the WEP keys, reconfigure
-@@ -4567,14 +4609,14 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
+@@ -4570,14 +4612,14 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SSID,
&join_params, sizeof(join_params));
if (err < 0) {
goto exit;
}
}
-@@ -4583,14 +4625,14 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
+@@ -4586,14 +4628,14 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
} else if (dev_role == NL80211_IFTYPE_P2P_GO) {
err = brcmf_fil_iovar_int_set(ifp, "chanspec", chanspec);
if (err < 0) {
goto exit;
}
bss_enable.bsscfgidx = cpu_to_le32(ifp->bsscfgidx);
-@@ -4598,7 +4640,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
+@@ -4601,7 +4643,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
err = brcmf_fil_iovar_data_set(ifp, "bss", &bss_enable,
sizeof(bss_enable));
if (err < 0) {
goto exit;
}
-@@ -4646,13 +4688,13 @@ static int brcmf_cfg80211_stop_ap(struct
+@@ -4649,13 +4691,13 @@ static int brcmf_cfg80211_stop_ap(struct
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SSID,
&join_params, sizeof(join_params));
if (err < 0)
if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MBSS))
brcmf_fil_iovar_int_set(ifp, "mbss", 0);
brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_REGULATORY,
-@@ -4660,7 +4702,7 @@ static int brcmf_cfg80211_stop_ap(struct
+@@ -4663,7 +4705,7 @@ static int brcmf_cfg80211_stop_ap(struct
/* Bring device back up so it can be used again */
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_UP, 1);
if (err < 0)
brcmf_vif_clear_mgmt_ies(ifp->vif);
} else {
-@@ -4669,7 +4711,7 @@ static int brcmf_cfg80211_stop_ap(struct
+@@ -4672,7 +4714,7 @@ static int brcmf_cfg80211_stop_ap(struct
err = brcmf_fil_iovar_data_set(ifp, "bss", &bss_enable,
sizeof(bss_enable));
if (err < 0)
}
brcmf_set_mpc(ifp, 1);
brcmf_configure_arp_nd_offload(ifp, true);
-@@ -4717,7 +4759,8 @@ brcmf_cfg80211_del_station(struct wiphy
+@@ -4720,7 +4762,8 @@ brcmf_cfg80211_del_station(struct wiphy
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SCB_DEAUTHENTICATE_FOR_REASON,
&scbval, sizeof(scbval));
if (err)
brcmf_dbg(TRACE, "Exit\n");
return err;
-@@ -4747,7 +4790,7 @@ brcmf_cfg80211_change_station(struct wip
+@@ -4750,7 +4793,7 @@ brcmf_cfg80211_change_station(struct wip
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SCB_DEAUTHORIZE,
(void *)mac, ETH_ALEN);
if (err < 0)
return err;
}
-@@ -4797,7 +4840,7 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wip
+@@ -4800,7 +4843,7 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wip
mgmt = (const struct ieee80211_mgmt *)buf;
if (!ieee80211_is_mgmt(mgmt->frame_control)) {
return -EPERM;
}
-@@ -4828,13 +4871,13 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wip
+@@ -4831,13 +4874,13 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wip
GFP_KERNEL);
} else if (ieee80211_is_action(mgmt->frame_control)) {
if (len > BRCMF_FIL_ACTION_FRAME_SIZE + DOT11_MGMT_HDR_LEN) {
err = -ENOMEM;
goto exit;
}
-@@ -4892,7 +4935,7 @@ brcmf_cfg80211_cancel_remain_on_channel(
+@@ -4895,7 +4938,7 @@ brcmf_cfg80211_cancel_remain_on_channel(
vif = cfg->p2p.bss_idx[P2PAPI_BSSCFG_DEVICE].vif;
if (vif == NULL) {
err = -ENODEV;
goto exit;
}
-@@ -4920,7 +4963,7 @@ static int brcmf_cfg80211_get_channel(st
+@@ -4923,7 +4966,7 @@ static int brcmf_cfg80211_get_channel(st
err = brcmf_fil_iovar_int_get(ifp, "chanspec", &chanspec);
if (err) {
return err;
}
-@@ -5059,7 +5102,7 @@ static int brcmf_cfg80211_tdls_oper(stru
+@@ -5062,7 +5105,7 @@ static int brcmf_cfg80211_tdls_oper(stru
ret = brcmf_fil_iovar_data_set(ifp, "tdls_endpoint",
&info, sizeof(info));
if (ret < 0)
return ret;
}
-@@ -5080,7 +5123,7 @@ brcmf_cfg80211_update_conn_params(struct
+@@ -5083,7 +5126,7 @@ brcmf_cfg80211_update_conn_params(struct
err = brcmf_vif_set_mgmt_ie(ifp->vif, BRCMF_VNDR_IE_ASSOCREQ_FLAG,
sme->ie, sme->ie_len);
if (err)
else
brcmf_dbg(TRACE, "Applied Vndr IEs for Assoc request\n");
-@@ -5106,7 +5149,7 @@ brcmf_cfg80211_set_rekey_data(struct wip
+@@ -5109,7 +5152,7 @@ brcmf_cfg80211_set_rekey_data(struct wip
ret = brcmf_fil_iovar_data_set(ifp, "gtk_key_info", >k_le,
sizeof(gtk_le));
if (ret < 0)
return ret;
}
-@@ -5341,6 +5384,7 @@ static void brcmf_clear_assoc_ies(struct
+@@ -5344,6 +5387,7 @@ static void brcmf_clear_assoc_ies(struct
static s32 brcmf_get_assoc_ies(struct brcmf_cfg80211_info *cfg,
struct brcmf_if *ifp)
{
struct brcmf_cfg80211_assoc_ielen_le *assoc_info;
struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg);
u32 req_len;
-@@ -5352,7 +5396,7 @@ static s32 brcmf_get_assoc_ies(struct br
+@@ -5355,7 +5399,7 @@ static s32 brcmf_get_assoc_ies(struct br
err = brcmf_fil_iovar_data_get(ifp, "assoc_info",
cfg->extra_buf, WL_ASSOC_INFO_MAX);
if (err) {
return err;
}
assoc_info =
-@@ -5364,7 +5408,7 @@ static s32 brcmf_get_assoc_ies(struct br
+@@ -5367,7 +5411,7 @@ static s32 brcmf_get_assoc_ies(struct br
cfg->extra_buf,
WL_ASSOC_INFO_MAX);
if (err) {
return err;
}
conn_info->req_ie_len = req_len;
-@@ -5382,7 +5426,7 @@ static s32 brcmf_get_assoc_ies(struct br
+@@ -5385,7 +5429,7 @@ static s32 brcmf_get_assoc_ies(struct br
cfg->extra_buf,
WL_ASSOC_INFO_MAX);
if (err) {
return err;
}
conn_info->resp_ie_len = resp_len;
-@@ -5511,6 +5555,7 @@ brcmf_notify_connect_status_ap(struct br
+@@ -5514,6 +5558,7 @@ brcmf_notify_connect_status_ap(struct br
struct net_device *ndev,
const struct brcmf_event_msg *e, void *data)
{
static int generation;
u32 event = e->event_code;
u32 reason = e->reason;
-@@ -5528,7 +5573,7 @@ brcmf_notify_connect_status_ap(struct br
+@@ -5531,7 +5576,7 @@ brcmf_notify_connect_status_ap(struct br
if (((event == BRCMF_E_ASSOC_IND) || (event == BRCMF_E_REASSOC_IND)) &&
(reason == BRCMF_E_STATUS_SUCCESS)) {
if (!data) {
return -EINVAL;
}
-@@ -5820,6 +5865,7 @@ static void init_vif_event(struct brcmf_
+@@ -5823,6 +5868,7 @@ static void init_vif_event(struct brcmf_
static s32 brcmf_dongle_roam(struct brcmf_if *ifp)
{
s32 err;
u32 bcn_timeout;
__le32 roamtrigger[2];
-@@ -5832,7 +5878,7 @@ static s32 brcmf_dongle_roam(struct brcm
+@@ -5835,7 +5881,7 @@ static s32 brcmf_dongle_roam(struct brcm
bcn_timeout = BRCMF_DEFAULT_BCN_TIMEOUT_ROAM_ON;
err = brcmf_fil_iovar_int_set(ifp, "bcn_timeout", bcn_timeout);
if (err) {
goto roam_setup_done;
}
-@@ -5844,7 +5890,7 @@ static s32 brcmf_dongle_roam(struct brcm
+@@ -5847,7 +5893,7 @@ static s32 brcmf_dongle_roam(struct brcm
err = brcmf_fil_iovar_int_set(ifp, "roam_off",
ifp->drvr->settings->roamoff);
if (err) {
goto roam_setup_done;
}
-@@ -5853,7 +5899,7 @@ static s32 brcmf_dongle_roam(struct brcm
+@@ -5856,7 +5902,7 @@ static s32 brcmf_dongle_roam(struct brcm
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_ROAM_TRIGGER,
(void *)roamtrigger, sizeof(roamtrigger));
if (err) {
goto roam_setup_done;
}
-@@ -5862,7 +5908,7 @@ static s32 brcmf_dongle_roam(struct brcm
+@@ -5865,7 +5911,7 @@ static s32 brcmf_dongle_roam(struct brcm
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_ROAM_DELTA,
(void *)roam_delta, sizeof(roam_delta));
if (err) {
goto roam_setup_done;
}
-@@ -5873,25 +5919,26 @@ roam_setup_done:
+@@ -5876,25 +5922,26 @@ roam_setup_done:
static s32
brcmf_dongle_scantime(struct brcmf_if *ifp)
{
goto dongle_scantime_out;
}
-@@ -5923,10 +5970,10 @@ static void brcmf_update_bw40_channel_fl
+@@ -5926,10 +5973,10 @@ static void brcmf_update_bw40_channel_fl
static int brcmf_construct_chaninfo(struct brcmf_cfg80211_info *cfg,
u32 bw_cap[])
{
struct brcmf_chanspec_list *list;
struct brcmu_chan ch;
int err;
-@@ -5945,11 +5992,10 @@ static int brcmf_construct_chaninfo(stru
+@@ -5948,11 +5995,10 @@ static int brcmf_construct_chaninfo(stru
err = brcmf_fil_iovar_data_get(ifp, "chanspecs", pbuf,
BRCMF_DCMD_MEDLEN);
if (err) {
band = wiphy->bands[NL80211_BAND_2GHZ];
if (band)
for (i = 0; i < band->n_channels; i++)
-@@ -5969,7 +6015,8 @@ static int brcmf_construct_chaninfo(stru
+@@ -5972,7 +6018,8 @@ static int brcmf_construct_chaninfo(stru
} else if (ch.band == BRCMU_CHAN_BAND_5G) {
band = wiphy->bands[NL80211_BAND_5GHZ];
} else {
continue;
}
if (!band)
-@@ -5992,8 +6039,8 @@ static int brcmf_construct_chaninfo(stru
+@@ -5995,8 +6042,8 @@ static int brcmf_construct_chaninfo(stru
/* It seems firmware supports some channel we never
* considered. Something new in IEEE standard?
*/
continue;
}
-@@ -6039,6 +6086,7 @@ fail_pbuf:
+@@ -6042,6 +6089,7 @@ fail_pbuf:
static int brcmf_enable_bw40_2g(struct brcmf_cfg80211_info *cfg)
{
struct brcmf_if *ifp = brcmf_get_ifp(cfg->pub, 0);
struct ieee80211_supported_band *band;
struct brcmf_fil_bwcap_le band_bwcap;
-@@ -6085,7 +6133,7 @@ static int brcmf_enable_bw40_2g(struct b
+@@ -6088,7 +6136,7 @@ static int brcmf_enable_bw40_2g(struct b
err = brcmf_fil_iovar_data_get(ifp, "chanspecs", pbuf,
BRCMF_DCMD_MEDLEN);
if (err) {
kfree(pbuf);
return err;
}
-@@ -6116,6 +6164,7 @@ static int brcmf_enable_bw40_2g(struct b
+@@ -6119,6 +6167,7 @@ static int brcmf_enable_bw40_2g(struct b
static void brcmf_get_bwcap(struct brcmf_if *ifp, u32 bw_cap[])
{
u32 band, mimo_bwcap;
int err;
-@@ -6151,7 +6200,7 @@ static void brcmf_get_bwcap(struct brcmf
+@@ -6154,7 +6203,7 @@ static void brcmf_get_bwcap(struct brcmf
bw_cap[NL80211_BAND_5GHZ] |= WLC_BW_20MHZ_BIT;
break;
default:
}
}
-@@ -6227,7 +6276,7 @@ static void brcmf_update_vht_cap(struct
+@@ -6230,7 +6279,7 @@ static void brcmf_update_vht_cap(struct
static int brcmf_setup_wiphybands(struct brcmf_cfg80211_info *cfg)
{
struct brcmf_if *ifp = brcmf_get_ifp(cfg->pub, 0);
u32 nmode = 0;
u32 vhtmode = 0;
u32 bw_cap[2] = { WLC_BW_20MHZ_BIT, WLC_BW_20MHZ_BIT };
-@@ -6243,7 +6292,7 @@ static int brcmf_setup_wiphybands(struct
+@@ -6246,7 +6295,7 @@ static int brcmf_setup_wiphybands(struct
(void)brcmf_fil_iovar_int_get(ifp, "vhtmode", &vhtmode);
err = brcmf_fil_iovar_int_get(ifp, "nmode", &nmode);
if (err) {
} else {
brcmf_get_bwcap(ifp, bw_cap);
}
-@@ -6253,7 +6302,7 @@ static int brcmf_setup_wiphybands(struct
+@@ -6256,7 +6305,7 @@ static int brcmf_setup_wiphybands(struct
err = brcmf_fil_iovar_int_get(ifp, "rxchain", &rxchain);
if (err) {
nchain = 1;
} else {
for (nchain = 0; rxchain; nchain++)
-@@ -6263,7 +6312,7 @@ static int brcmf_setup_wiphybands(struct
+@@ -6266,7 +6315,7 @@ static int brcmf_setup_wiphybands(struct
err = brcmf_construct_chaninfo(cfg, bw_cap);
if (err) {
return err;
}
-@@ -6275,7 +6324,6 @@ static int brcmf_setup_wiphybands(struct
+@@ -6278,7 +6327,6 @@ static int brcmf_setup_wiphybands(struct
&txbf_bfr_cap);
}
for (i = 0; i < ARRAY_SIZE(wiphy->bands); i++) {
band = wiphy->bands[i];
if (band == NULL)
-@@ -6476,7 +6524,7 @@ static void brcmf_wiphy_wowl_params(stru
+@@ -6479,7 +6527,7 @@ static void brcmf_wiphy_wowl_params(stru
wowl = kmemdup(&brcmf_wowlan_support, sizeof(brcmf_wowlan_support),
GFP_KERNEL);
if (!wowl) {
wiphy->wowlan = &brcmf_wowlan_support;
return;
}
-@@ -6573,7 +6621,7 @@ static int brcmf_setup_wiphy(struct wiph
+@@ -6576,7 +6624,7 @@ static int brcmf_setup_wiphy(struct wiph
err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_BANDLIST, &bandlist,
sizeof(bandlist));
if (err) {
return err;
}
/* first entry in bandlist is number of bands */
-@@ -6622,6 +6670,7 @@ static int brcmf_setup_wiphy(struct wiph
+@@ -6625,6 +6673,7 @@ static int brcmf_setup_wiphy(struct wiph
static s32 brcmf_config_dongle(struct brcmf_cfg80211_info *cfg)
{
struct net_device *ndev;
struct wireless_dev *wdev;
struct brcmf_if *ifp;
-@@ -6659,7 +6708,7 @@ static s32 brcmf_config_dongle(struct br
+@@ -6662,7 +6711,7 @@ static s32 brcmf_config_dongle(struct br
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_FAKEFRAG, 1);
if (err) {
goto default_conf_out;
}
-@@ -6851,8 +6900,8 @@ static void brcmf_cfg80211_reg_notifier(
+@@ -6854,8 +6903,8 @@ static void brcmf_cfg80211_reg_notifier(
/* ignore non-ISO3166 country codes */
for (i = 0; i < 2; i++)
if (req->alpha2[i] < 'A' || req->alpha2[i] > 'Z') {
return;
}
-@@ -6861,7 +6910,7 @@ static void brcmf_cfg80211_reg_notifier(
+@@ -6864,7 +6913,7 @@ static void brcmf_cfg80211_reg_notifier(
err = brcmf_fil_iovar_data_get(ifp, "country", &ccreq, sizeof(ccreq));
if (err) {
return;
}
-@@ -6871,7 +6920,7 @@ static void brcmf_cfg80211_reg_notifier(
+@@ -6874,7 +6923,7 @@ static void brcmf_cfg80211_reg_notifier(
err = brcmf_fil_iovar_data_set(ifp, "country", &ccreq, sizeof(ccreq));
if (err) {
return;
}
brcmf_setup_wiphybands(cfg);
-@@ -6917,13 +6966,13 @@ struct brcmf_cfg80211_info *brcmf_cfg802
+@@ -6920,13 +6969,13 @@ struct brcmf_cfg80211_info *brcmf_cfg802
u16 *cap = NULL;
if (!ndev) {
return NULL;
}
-@@ -6944,7 +6993,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802
+@@ -6947,7 +6996,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802
err = wl_init_priv(cfg);
if (err) {
brcmf_free_vif(vif);
goto wiphy_out;
}
-@@ -6953,7 +7002,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802
+@@ -6956,7 +7005,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802
/* determine d11 io type before wiphy setup */
err = brcmf_fil_cmd_int_get(ifp, BRCMF_C_GET_VERSION, &io_type);
if (err) {
goto priv_out;
}
cfg->d11inf.io_type = (u8)io_type;
-@@ -6987,13 +7036,13 @@ struct brcmf_cfg80211_info *brcmf_cfg802
+@@ -6990,13 +7039,13 @@ struct brcmf_cfg80211_info *brcmf_cfg802
#endif
err = wiphy_register(wiphy);
if (err < 0) {
goto wiphy_unreg_out;
}
-@@ -7011,24 +7060,24 @@ struct brcmf_cfg80211_info *brcmf_cfg802
+@@ -7014,24 +7063,24 @@ struct brcmf_cfg80211_info *brcmf_cfg802
err = brcmf_fweh_activate_events(ifp);
if (err) {
brcmf_btcoex_detach(cfg);
brcmf_p2p_detach(&cfg->p2p);
goto wiphy_unreg_out;
-@@ -7048,7 +7097,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802
+@@ -7051,7 +7100,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802
/* (re-) activate FWEH event handling */
err = brcmf_fweh_activate_events(ifp);
if (err) {
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
-@@ -6050,11 +6050,18 @@ static int brcmf_construct_chaninfo(stru
+@@ -6053,11 +6053,18 @@ static int brcmf_construct_chaninfo(stru
/* assuming the chanspecs order is HT20,
* HT40 upper, HT40 lower, and VHT80.
*/
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
-@@ -6051,6 +6051,9 @@ static int brcmf_construct_chaninfo(stru
+@@ -6054,6 +6054,9 @@ static int brcmf_construct_chaninfo(stru
* HT40 upper, HT40 lower, and VHT80.
*/
switch (ch.bw) {
struct brcmf_scb_val_le scb_val;
s32 err = 0;
struct brcmf_sta_info_le sta_info_le;
-@@ -2592,7 +2612,7 @@ brcmf_cfg80211_get_station(struct wiphy
+@@ -2593,7 +2613,7 @@ brcmf_cfg80211_get_station(struct wiphy
&sta_info_le,
sizeof(sta_info_le));
if (err < 0) {
goto done;
}
}
-@@ -2661,7 +2681,7 @@ brcmf_cfg80211_get_station(struct wiphy
+@@ -2664,7 +2684,7 @@ brcmf_cfg80211_get_station(struct wiphy
err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_RSSI,
&scb_val, sizeof(scb_val));
if (err) {
err);
goto done;
} else {
-@@ -2683,6 +2703,7 @@ brcmf_cfg80211_dump_station(struct wiphy
+@@ -2686,6 +2706,7 @@ brcmf_cfg80211_dump_station(struct wiphy
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct brcmf_if *ifp = netdev_priv(ndev);
s32 err;
brcmf_dbg(TRACE, "Enter, idx %d\n", idx);
-@@ -2693,7 +2714,7 @@ brcmf_cfg80211_dump_station(struct wiphy
+@@ -2696,7 +2717,7 @@ brcmf_cfg80211_dump_station(struct wiphy
&cfg->assoclist,
sizeof(cfg->assoclist));
if (err) {
err);
cfg->assoclist.count = 0;
return -EOPNOTSUPP;
-@@ -2714,6 +2735,7 @@ brcmf_cfg80211_set_power_mgmt(struct wip
+@@ -2717,6 +2738,7 @@ brcmf_cfg80211_set_power_mgmt(struct wip
s32 err = 0;
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct brcmf_if *ifp = netdev_priv(ndev);
brcmf_dbg(TRACE, "Enter\n");
-@@ -2742,9 +2764,9 @@ brcmf_cfg80211_set_power_mgmt(struct wip
+@@ -2745,9 +2767,9 @@ brcmf_cfg80211_set_power_mgmt(struct wip
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_PM, pm);
if (err) {
if (err == -ENODEV)
}
done:
brcmf_dbg(TRACE, "Exit\n");
-@@ -2755,6 +2777,7 @@ static s32 brcmf_inform_single_bss(struc
+@@ -2758,6 +2780,7 @@ static s32 brcmf_inform_single_bss(struc
struct brcmf_bss_info_le *bi)
{
struct wiphy *wiphy = cfg_to_wiphy(cfg);
struct cfg80211_bss *bss;
enum nl80211_band band;
struct brcmu_chan ch;
-@@ -2767,7 +2790,7 @@ static s32 brcmf_inform_single_bss(struc
+@@ -2770,7 +2793,7 @@ static s32 brcmf_inform_single_bss(struc
struct cfg80211_inform_bss bss_data = {};
if (le32_to_cpu(bi->length) > WL_BSS_INFO_MAX) {
return 0;
}
-@@ -2826,7 +2849,7 @@ next_bss_le(struct brcmf_scan_results *l
+@@ -2829,7 +2852,7 @@ next_bss_le(struct brcmf_scan_results *l
static s32 brcmf_inform_bss(struct brcmf_cfg80211_info *cfg)
{
struct brcmf_scan_results *bss_list;
struct brcmf_bss_info_le *bi = NULL; /* must be initialized */
s32 err = 0;
-@@ -2835,7 +2858,7 @@ static s32 brcmf_inform_bss(struct brcmf
+@@ -2838,7 +2861,7 @@ static s32 brcmf_inform_bss(struct brcmf
bss_list = (struct brcmf_scan_results *)cfg->escan_info.escan_buf;
if (bss_list->count != 0 &&
bss_list->version != BRCMF_BSS_INFO_VERSION) {
bss_list->version);
return -EOPNOTSUPP;
}
-@@ -2853,6 +2876,7 @@ static s32 brcmf_inform_ibss(struct brcm
+@@ -2856,6 +2879,7 @@ static s32 brcmf_inform_ibss(struct brcm
struct net_device *ndev, const u8 *bssid)
{
struct wiphy *wiphy = cfg_to_wiphy(cfg);
struct ieee80211_channel *notify_channel;
struct brcmf_bss_info_le *bi = NULL;
struct ieee80211_supported_band *band;
-@@ -2880,7 +2904,7 @@ static s32 brcmf_inform_ibss(struct brcm
+@@ -2883,7 +2907,7 @@ static s32 brcmf_inform_ibss(struct brcm
err = brcmf_fil_cmd_data_get(netdev_priv(ndev), BRCMF_C_GET_BSS_INFO,
buf, WL_BSS_INFO_MAX);
if (err) {
goto CleanUp;
}
-@@ -2934,7 +2958,7 @@ CleanUp:
+@@ -2937,7 +2961,7 @@ CleanUp:
static s32 brcmf_update_bss_info(struct brcmf_cfg80211_info *cfg,
struct brcmf_if *ifp)
{
struct brcmf_bss_info_le *bi;
const struct brcmf_tlv *tim;
u16 beacon_interval;
-@@ -2951,7 +2975,7 @@ static s32 brcmf_update_bss_info(struct
+@@ -2954,7 +2978,7 @@ static s32 brcmf_update_bss_info(struct
err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_BSS_INFO,
cfg->extra_buf, WL_EXTRA_BUF_MAX);
if (err) {
goto update_bss_info_out;
}
-@@ -2976,7 +3000,7 @@ static s32 brcmf_update_bss_info(struct
+@@ -2979,7 +3003,7 @@ static s32 brcmf_update_bss_info(struct
u32 var;
err = brcmf_fil_iovar_int_get(ifp, "dtim_assoc", &var);
if (err) {
goto update_bss_info_out;
}
dtim_period = (u8)var;
-@@ -3014,10 +3038,10 @@ static void brcmf_escan_timeout(struct t
+@@ -3017,10 +3041,10 @@ static void brcmf_escan_timeout(struct t
{
struct brcmf_cfg80211_info *cfg =
from_timer(cfg, t, escan_timeout);
schedule_work(&cfg->escan_timeout_work);
}
}
-@@ -3065,8 +3089,8 @@ static s32
+@@ -3068,8 +3092,8 @@ static s32
brcmf_cfg80211_escan_handler(struct brcmf_if *ifp,
const struct brcmf_event_msg *e, void *data)
{
s32 status;
struct brcmf_escan_result_le *escan_result_le;
u32 escan_buflen;
-@@ -3083,7 +3107,7 @@ brcmf_cfg80211_escan_handler(struct brcm
+@@ -3086,7 +3110,7 @@ brcmf_cfg80211_escan_handler(struct brcm
goto exit;
if (!test_bit(BRCMF_SCAN_STATUS_BUSY, &cfg->scan_status)) {
ifp->bsscfgidx);
return -EPERM;
}
-@@ -3091,24 +3115,24 @@ brcmf_cfg80211_escan_handler(struct brcm
+@@ -3094,24 +3118,24 @@ brcmf_cfg80211_escan_handler(struct brcm
if (status == BRCMF_E_STATUS_PARTIAL) {
brcmf_dbg(SCAN, "ESCAN Partial result\n");
if (e->datalen < sizeof(*escan_result_le)) {
escan_result_le->bss_count);
goto exit;
}
-@@ -3124,7 +3148,7 @@ brcmf_cfg80211_escan_handler(struct brcm
+@@ -3127,7 +3151,7 @@ brcmf_cfg80211_escan_handler(struct brcm
bi_length = le32_to_cpu(bss_info_le->length);
if (bi_length != escan_buflen - WL_ESCAN_RESULTS_FIXED_SIZE) {
bi_length);
goto exit;
}
-@@ -3133,7 +3157,7 @@ brcmf_cfg80211_escan_handler(struct brcm
+@@ -3136,7 +3160,7 @@ brcmf_cfg80211_escan_handler(struct brcm
BIT(NL80211_IFTYPE_ADHOC))) {
if (le16_to_cpu(bss_info_le->capability) &
WLAN_CAPABILITY_IBSS) {
goto exit;
}
}
-@@ -3141,7 +3165,7 @@ brcmf_cfg80211_escan_handler(struct brcm
+@@ -3144,7 +3168,7 @@ brcmf_cfg80211_escan_handler(struct brcm
list = (struct brcmf_scan_results *)
cfg->escan_info.escan_buf;
if (bi_length > BRCMF_ESCAN_BUF_SIZE - list->buflen) {
goto exit;
}
-@@ -3300,7 +3324,8 @@ static s32
+@@ -3303,7 +3327,8 @@ static s32
brcmf_notify_sched_scan_results(struct brcmf_if *ifp,
const struct brcmf_event_msg *e, void *data)
{
struct brcmf_pno_net_info_le *netinfo, *netinfo_start;
struct cfg80211_scan_request *request = NULL;
struct wiphy *wiphy = cfg_to_wiphy(cfg);
-@@ -3333,14 +3358,14 @@ brcmf_notify_sched_scan_results(struct b
+@@ -3336,14 +3361,14 @@ brcmf_notify_sched_scan_results(struct b
WARN_ON(status != BRCMF_PNO_SCAN_COMPLETE);
brcmf_dbg(SCAN, "PFN NET FOUND event. count: %d\n", result_count);
if (!result_count) {
goto out_err;
}
-@@ -3387,14 +3412,15 @@ brcmf_cfg80211_sched_scan_start(struct w
+@@ -3390,14 +3415,15 @@ brcmf_cfg80211_sched_scan_start(struct w
struct net_device *ndev,
struct cfg80211_sched_scan_request *req)
{
cfg->scan_status);
return -EAGAIN;
}
-@@ -3473,8 +3499,8 @@ static s32
+@@ -3476,8 +3502,8 @@ static s32
brcmf_wowl_nd_results(struct brcmf_if *ifp, const struct brcmf_event_msg *e,
void *data)
{
struct brcmf_pno_scanresults_le *pfn_result;
struct brcmf_pno_net_info_le *netinfo;
-@@ -3493,7 +3519,7 @@ brcmf_wowl_nd_results(struct brcmf_if *i
+@@ -3496,7 +3522,7 @@ brcmf_wowl_nd_results(struct brcmf_if *i
}
if (le32_to_cpu(pfn_result->count) < 1) {
le32_to_cpu(pfn_result->count));
return -EINVAL;
}
-@@ -3523,6 +3549,7 @@ brcmf_wowl_nd_results(struct brcmf_if *i
+@@ -3526,6 +3552,7 @@ brcmf_wowl_nd_results(struct brcmf_if *i
static void brcmf_report_wowl_wakeind(struct wiphy *wiphy, struct brcmf_if *ifp)
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct brcmf_wowl_wakeind_le wake_ind_le;
struct cfg80211_wowlan_wakeup wakeup_data;
struct cfg80211_wowlan_wakeup *wakeup;
-@@ -3533,7 +3560,7 @@ static void brcmf_report_wowl_wakeind(st
+@@ -3536,7 +3563,7 @@ static void brcmf_report_wowl_wakeind(st
err = brcmf_fil_iovar_data_get(ifp, "wowl_wakeind", &wake_ind_le,
sizeof(wake_ind_le));
if (err) {
return;
}
-@@ -3574,7 +3601,7 @@ static void brcmf_report_wowl_wakeind(st
+@@ -3577,7 +3604,7 @@ static void brcmf_report_wowl_wakeind(st
cfg->wowl.nd_data_completed,
BRCMF_ND_INFO_TIMEOUT);
if (!timeout)
else
wakeup_data.net_detect = cfg->wowl.nd_info;
}
-@@ -3763,6 +3790,7 @@ brcmf_cfg80211_set_pmksa(struct wiphy *w
+@@ -3766,6 +3793,7 @@ brcmf_cfg80211_set_pmksa(struct wiphy *w
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct brcmf_if *ifp = netdev_priv(ndev);
struct brcmf_pmksa *pmk = &cfg->pmk_list.pmk[0];
s32 err;
u32 npmk, i;
-@@ -3782,7 +3810,7 @@ brcmf_cfg80211_set_pmksa(struct wiphy *w
+@@ -3785,7 +3813,7 @@ brcmf_cfg80211_set_pmksa(struct wiphy *w
cfg->pmk_list.npmk = cpu_to_le32(npmk);
}
} else {
return -EINVAL;
}
-@@ -3805,6 +3833,7 @@ brcmf_cfg80211_del_pmksa(struct wiphy *w
+@@ -3808,6 +3836,7 @@ brcmf_cfg80211_del_pmksa(struct wiphy *w
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct brcmf_if *ifp = netdev_priv(ndev);
struct brcmf_pmksa *pmk = &cfg->pmk_list.pmk[0];
s32 err;
u32 npmk, i;
-@@ -3828,7 +3857,7 @@ brcmf_cfg80211_del_pmksa(struct wiphy *w
+@@ -3831,7 +3860,7 @@ brcmf_cfg80211_del_pmksa(struct wiphy *w
memset(&pmk[i], 0, sizeof(*pmk));
cfg->pmk_list.npmk = cpu_to_le32(npmk - 1);
} else {
return -EINVAL;
}
-@@ -3860,20 +3889,20 @@ brcmf_cfg80211_flush_pmksa(struct wiphy
+@@ -3863,20 +3892,20 @@ brcmf_cfg80211_flush_pmksa(struct wiphy
static s32 brcmf_configure_opensecurity(struct brcmf_if *ifp)
{
return err;
}
/* set upper-layer auth */
-@@ -3883,7 +3912,7 @@ static s32 brcmf_configure_opensecurity(
+@@ -3886,7 +3915,7 @@ static s32 brcmf_configure_opensecurity(
wpa_val = WPA_AUTH_DISABLED;
err = brcmf_fil_bsscfg_int_set(ifp, "wpa_auth", wpa_val);
if (err < 0) {
return err;
}
-@@ -3903,7 +3932,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
+@@ -3906,7 +3935,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
const struct brcmf_vs_tlv *wpa_ie,
bool is_rsn_ie)
{
u32 auth = 0; /* d11 open authentication */
u16 count;
s32 err = 0;
-@@ -3934,13 +3963,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
+@@ -3937,13 +3966,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
/* check for multicast cipher suite */
if (offset + WPA_IE_MIN_OUI_LEN > len) {
err = -EINVAL;
goto exit;
}
offset += TLV_OUI_LEN;
-@@ -3962,7 +3991,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
+@@ -3965,7 +3994,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
break;
default:
err = -EINVAL;
goto exit;
}
-@@ -3973,13 +4002,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
+@@ -3976,13 +4005,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
/* Check for unicast suite(s) */
if (offset + (WPA_IE_MIN_OUI_LEN * count) > len) {
err = -EINVAL;
goto exit;
}
offset += TLV_OUI_LEN;
-@@ -3997,7 +4026,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
+@@ -4000,7 +4029,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
pval |= AES_ENABLED;
break;
default:
}
offset++;
}
-@@ -4007,13 +4036,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
+@@ -4010,13 +4039,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
/* Check for auth key management suite(s) */
if (offset + (WPA_IE_MIN_OUI_LEN * count) > len) {
err = -EINVAL;
goto exit;
}
offset += TLV_OUI_LEN;
-@@ -4041,7 +4070,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
+@@ -4044,7 +4073,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
wpa_auth |= WPA2_AUTH_1X_SHA256;
break;
default:
}
offset++;
}
-@@ -4083,7 +4112,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
+@@ -4086,7 +4115,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
err = brcmf_fil_bsscfg_int_set(ifp, "wme_bss_disable",
wme_bss_disable);
if (err < 0) {
goto exit;
}
-@@ -4097,7 +4126,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
+@@ -4100,7 +4129,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
&data[offset],
WPA_IE_MIN_OUI_LEN);
if (err < 0) {
goto exit;
}
}
-@@ -4108,13 +4137,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
+@@ -4111,13 +4140,13 @@ brcmf_configure_wpaie(struct brcmf_if *i
/* set auth */
err = brcmf_fil_bsscfg_int_set(ifp, "auth", auth);
if (err < 0) {
goto exit;
}
/* Configure MFP, this needs to go after wsec otherwise the wsec command
-@@ -4123,14 +4152,14 @@ brcmf_configure_wpaie(struct brcmf_if *i
+@@ -4126,14 +4155,14 @@ brcmf_configure_wpaie(struct brcmf_if *i
if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MFP)) {
err = brcmf_fil_bsscfg_int_set(ifp, "mfp", mfp);
if (err < 0) {
goto exit;
}
-@@ -4216,8 +4245,8 @@ brcmf_vndr_ie(u8 *iebuf, s32 pktflag, u8
+@@ -4219,8 +4248,8 @@ brcmf_vndr_ie(u8 *iebuf, s32 pktflag, u8
s32 brcmf_vif_set_mgmt_ie(struct brcmf_cfg80211_vif *vif, s32 pktflag,
const u8 *vndr_ie_buf, u32 vndr_ie_len)
{
struct vif_saved_ie *saved_ie;
s32 err = 0;
u8 *iovar_ie_buf;
-@@ -4238,7 +4267,7 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
+@@ -4241,7 +4270,7 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
if (!vif)
return -ENODEV;
ifp = vif->ifp;
saved_ie = &vif->saved_ie;
brcmf_dbg(TRACE, "bsscfgidx %d, pktflag : 0x%02X\n", ifp->bsscfgidx,
-@@ -4270,13 +4299,13 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
+@@ -4273,13 +4302,13 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
break;
default:
err = -EPERM;
goto exit;
}
-@@ -4337,7 +4366,7 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
+@@ -4340,7 +4369,7 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
/* verify remained buf size before copy data */
if (remained_buf_len < (vndrie_info->vndrie.len +
VNDR_IE_VSIE_OFFSET)) {
remained_buf_len);
break;
}
-@@ -4369,7 +4398,7 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
+@@ -4372,7 +4401,7 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
err = brcmf_fil_bsscfg_data_set(ifp, "vndr_ie", iovar_ie_buf,
total_ie_buf_len);
if (err)
}
exit:
-@@ -4397,14 +4426,14 @@ static s32
+@@ -4400,14 +4429,14 @@ static s32
brcmf_config_ap_mgmt_ie(struct brcmf_cfg80211_vif *vif,
struct cfg80211_beacon_data *beacon)
{
return err;
}
brcmf_dbg(TRACE, "Applied Vndr IEs for Beacon\n");
-@@ -4414,7 +4443,7 @@ brcmf_config_ap_mgmt_ie(struct brcmf_cfg
+@@ -4417,7 +4446,7 @@ brcmf_config_ap_mgmt_ie(struct brcmf_cfg
beacon->proberesp_ies,
beacon->proberesp_ies_len);
if (err)
else
brcmf_dbg(TRACE, "Applied Vndr IEs for Probe Resp\n");
-@@ -4428,6 +4457,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
+@@ -4431,6 +4460,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
s32 ie_offset;
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct brcmf_if *ifp = netdev_priv(ndev);
const struct brcmf_tlv *ssid_ie;
const struct brcmf_tlv *country_ie;
struct brcmf_ssid_le ssid_le;
-@@ -4523,7 +4553,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
+@@ -4526,7 +4556,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_REGULATORY,
is_11d);
if (err < 0) {
err);
goto exit;
}
-@@ -4532,7 +4562,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
+@@ -4535,7 +4565,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_BCNPRD,
settings->beacon_interval);
if (err < 0) {
err);
goto exit;
}
-@@ -4541,7 +4571,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
+@@ -4544,7 +4574,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_DTIMPRD,
settings->dtim_period);
if (err < 0) {
err);
goto exit;
}
-@@ -4552,7 +4582,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
+@@ -4555,7 +4585,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
!brcmf_feat_is_enabled(ifp, BRCMF_FEAT_RSDB))) {
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_DOWN, 1);
if (err < 0) {
err);
goto exit;
}
-@@ -4561,7 +4591,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
+@@ -4564,7 +4594,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_INFRA, 1);
if (err < 0) {
goto exit;
}
} else if (WARN_ON(supports_11d && (is_11d != ifp->vif->is_11d))) {
-@@ -4577,7 +4607,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
+@@ -4580,7 +4610,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_AP, 1);
if (err < 0) {
err);
goto exit;
}
-@@ -4587,14 +4617,14 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
+@@ -4590,14 +4620,14 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
*/
err = brcmf_fil_iovar_int_set(ifp, "chanspec", chanspec);
if (err < 0) {
goto exit;
}
/* On DOWN the firmware removes the WEP keys, reconfigure
-@@ -4609,14 +4639,14 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
+@@ -4612,14 +4642,14 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SSID,
&join_params, sizeof(join_params));
if (err < 0) {
goto exit;
}
}
-@@ -4625,14 +4655,14 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
+@@ -4628,14 +4658,14 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
} else if (dev_role == NL80211_IFTYPE_P2P_GO) {
err = brcmf_fil_iovar_int_set(ifp, "chanspec", chanspec);
if (err < 0) {
goto exit;
}
bss_enable.bsscfgidx = cpu_to_le32(ifp->bsscfgidx);
-@@ -4640,7 +4670,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
+@@ -4643,7 +4673,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wi
err = brcmf_fil_iovar_data_set(ifp, "bss", &bss_enable,
sizeof(bss_enable));
if (err < 0) {
goto exit;
}
-@@ -4663,7 +4693,9 @@ exit:
+@@ -4666,7 +4696,9 @@ exit:
static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev)
{
s32 err;
struct brcmf_fil_bss_enable_le bss_enable;
struct brcmf_join_params join_params;
-@@ -4688,13 +4720,13 @@ static int brcmf_cfg80211_stop_ap(struct
+@@ -4691,13 +4723,13 @@ static int brcmf_cfg80211_stop_ap(struct
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SSID,
&join_params, sizeof(join_params));
if (err < 0)
if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MBSS))
brcmf_fil_iovar_int_set(ifp, "mbss", 0);
brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_REGULATORY,
-@@ -4702,7 +4734,7 @@ static int brcmf_cfg80211_stop_ap(struct
+@@ -4705,7 +4737,7 @@ static int brcmf_cfg80211_stop_ap(struct
/* Bring device back up so it can be used again */
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_UP, 1);
if (err < 0)
brcmf_vif_clear_mgmt_ies(ifp->vif);
} else {
-@@ -4711,7 +4743,7 @@ static int brcmf_cfg80211_stop_ap(struct
+@@ -4714,7 +4746,7 @@ static int brcmf_cfg80211_stop_ap(struct
err = brcmf_fil_iovar_data_set(ifp, "bss", &bss_enable,
sizeof(bss_enable));
if (err < 0)
}
brcmf_set_mpc(ifp, 1);
brcmf_configure_arp_nd_offload(ifp, true);
-@@ -4740,6 +4772,7 @@ brcmf_cfg80211_del_station(struct wiphy
+@@ -4743,6 +4775,7 @@ brcmf_cfg80211_del_station(struct wiphy
struct station_del_parameters *params)
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct brcmf_scb_val_le scbval;
struct brcmf_if *ifp = netdev_priv(ndev);
s32 err;
-@@ -4759,7 +4792,7 @@ brcmf_cfg80211_del_station(struct wiphy
+@@ -4762,7 +4795,7 @@ brcmf_cfg80211_del_station(struct wiphy
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SCB_DEAUTHENTICATE_FOR_REASON,
&scbval, sizeof(scbval));
if (err)
err);
brcmf_dbg(TRACE, "Exit\n");
-@@ -4770,6 +4803,8 @@ static int
+@@ -4773,6 +4806,8 @@ static int
brcmf_cfg80211_change_station(struct wiphy *wiphy, struct net_device *ndev,
const u8 *mac, struct station_parameters *params)
{
struct brcmf_if *ifp = netdev_priv(ndev);
s32 err;
-@@ -4790,7 +4825,7 @@ brcmf_cfg80211_change_station(struct wip
+@@ -4793,7 +4828,7 @@ brcmf_cfg80211_change_station(struct wip
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SCB_DEAUTHORIZE,
(void *)mac, ETH_ALEN);
if (err < 0)
return err;
}
-@@ -4820,6 +4855,7 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wip
+@@ -4823,6 +4858,7 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wip
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct ieee80211_channel *chan = params->chan;
const u8 *buf = params->buf;
size_t len = params->len;
const struct ieee80211_mgmt *mgmt;
-@@ -4840,7 +4876,7 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wip
+@@ -4843,7 +4879,7 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wip
mgmt = (const struct ieee80211_mgmt *)buf;
if (!ieee80211_is_mgmt(mgmt->frame_control)) {
return -EPERM;
}
-@@ -4871,13 +4907,13 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wip
+@@ -4874,13 +4910,13 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wip
GFP_KERNEL);
} else if (ieee80211_is_action(mgmt->frame_control)) {
if (len > BRCMF_FIL_ACTION_FRAME_SIZE + DOT11_MGMT_HDR_LEN) {
err = -ENOMEM;
goto exit;
}
-@@ -4928,6 +4964,7 @@ brcmf_cfg80211_cancel_remain_on_channel(
+@@ -4931,6 +4967,7 @@ brcmf_cfg80211_cancel_remain_on_channel(
u64 cookie)
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct brcmf_cfg80211_vif *vif;
int err = 0;
-@@ -4935,7 +4972,7 @@ brcmf_cfg80211_cancel_remain_on_channel(
+@@ -4938,7 +4975,7 @@ brcmf_cfg80211_cancel_remain_on_channel(
vif = cfg->p2p.bss_idx[P2PAPI_BSSCFG_DEVICE].vif;
if (vif == NULL) {
err = -ENODEV;
goto exit;
}
-@@ -4950,6 +4987,7 @@ static int brcmf_cfg80211_get_channel(st
+@@ -4953,6 +4990,7 @@ static int brcmf_cfg80211_get_channel(st
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct net_device *ndev = wdev->netdev;
struct brcmf_if *ifp;
struct brcmu_chan ch;
enum nl80211_band band = 0;
-@@ -4963,7 +5001,7 @@ static int brcmf_cfg80211_get_channel(st
+@@ -4966,7 +5004,7 @@ static int brcmf_cfg80211_get_channel(st
err = brcmf_fil_iovar_int_get(ifp, "chanspec", &chanspec);
if (err) {
return err;
}
-@@ -5085,6 +5123,8 @@ static int brcmf_cfg80211_tdls_oper(stru
+@@ -5088,6 +5126,8 @@ static int brcmf_cfg80211_tdls_oper(stru
struct net_device *ndev, const u8 *peer,
enum nl80211_tdls_operation oper)
{
struct brcmf_if *ifp;
struct brcmf_tdls_iovar_le info;
int ret = 0;
-@@ -5102,7 +5142,7 @@ static int brcmf_cfg80211_tdls_oper(stru
+@@ -5105,7 +5145,7 @@ static int brcmf_cfg80211_tdls_oper(stru
ret = brcmf_fil_iovar_data_set(ifp, "tdls_endpoint",
&info, sizeof(info));
if (ret < 0)
return ret;
}
-@@ -5113,6 +5153,8 @@ brcmf_cfg80211_update_conn_params(struct
+@@ -5116,6 +5156,8 @@ brcmf_cfg80211_update_conn_params(struct
struct cfg80211_connect_params *sme,
u32 changed)
{
struct brcmf_if *ifp;
int err;
-@@ -5123,7 +5165,7 @@ brcmf_cfg80211_update_conn_params(struct
+@@ -5126,7 +5168,7 @@ brcmf_cfg80211_update_conn_params(struct
err = brcmf_vif_set_mgmt_ie(ifp->vif, BRCMF_VNDR_IE_ASSOCREQ_FLAG,
sme->ie, sme->ie_len);
if (err)
else
brcmf_dbg(TRACE, "Applied Vndr IEs for Assoc request\n");
-@@ -5135,6 +5177,8 @@ static int
+@@ -5138,6 +5180,8 @@ static int
brcmf_cfg80211_set_rekey_data(struct wiphy *wiphy, struct net_device *ndev,
struct cfg80211_gtk_rekey_data *gtk)
{
struct brcmf_if *ifp = netdev_priv(ndev);
struct brcmf_gtk_keyinfo_le gtk_le;
int ret;
-@@ -5149,7 +5193,7 @@ brcmf_cfg80211_set_rekey_data(struct wip
+@@ -5152,7 +5196,7 @@ brcmf_cfg80211_set_rekey_data(struct wip
ret = brcmf_fil_iovar_data_set(ifp, "gtk_key_info", >k_le,
sizeof(gtk_le));
if (ret < 0)
return ret;
}
-@@ -5384,7 +5428,7 @@ static void brcmf_clear_assoc_ies(struct
+@@ -5387,7 +5431,7 @@ static void brcmf_clear_assoc_ies(struct
static s32 brcmf_get_assoc_ies(struct brcmf_cfg80211_info *cfg,
struct brcmf_if *ifp)
{
struct brcmf_cfg80211_assoc_ielen_le *assoc_info;
struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg);
u32 req_len;
-@@ -5396,7 +5440,7 @@ static s32 brcmf_get_assoc_ies(struct br
+@@ -5399,7 +5443,7 @@ static s32 brcmf_get_assoc_ies(struct br
err = brcmf_fil_iovar_data_get(ifp, "assoc_info",
cfg->extra_buf, WL_ASSOC_INFO_MAX);
if (err) {
return err;
}
assoc_info =
-@@ -5408,7 +5452,7 @@ static s32 brcmf_get_assoc_ies(struct br
+@@ -5411,7 +5455,7 @@ static s32 brcmf_get_assoc_ies(struct br
cfg->extra_buf,
WL_ASSOC_INFO_MAX);
if (err) {
return err;
}
conn_info->req_ie_len = req_len;
-@@ -5426,7 +5470,7 @@ static s32 brcmf_get_assoc_ies(struct br
+@@ -5429,7 +5473,7 @@ static s32 brcmf_get_assoc_ies(struct br
cfg->extra_buf,
WL_ASSOC_INFO_MAX);
if (err) {
return err;
}
conn_info->resp_ie_len = resp_len;
-@@ -5555,7 +5599,7 @@ brcmf_notify_connect_status_ap(struct br
+@@ -5558,7 +5602,7 @@ brcmf_notify_connect_status_ap(struct br
struct net_device *ndev,
const struct brcmf_event_msg *e, void *data)
{
static int generation;
u32 event = e->event_code;
u32 reason = e->reason;
-@@ -5573,7 +5617,7 @@ brcmf_notify_connect_status_ap(struct br
+@@ -5576,7 +5620,7 @@ brcmf_notify_connect_status_ap(struct br
if (((event == BRCMF_E_ASSOC_IND) || (event == BRCMF_E_REASSOC_IND)) &&
(reason == BRCMF_E_STATUS_SUCCESS)) {
if (!data) {
return -EINVAL;
}
-@@ -5865,7 +5909,7 @@ static void init_vif_event(struct brcmf_
+@@ -5868,7 +5912,7 @@ static void init_vif_event(struct brcmf_
static s32 brcmf_dongle_roam(struct brcmf_if *ifp)
{
s32 err;
u32 bcn_timeout;
__le32 roamtrigger[2];
-@@ -5878,7 +5922,7 @@ static s32 brcmf_dongle_roam(struct brcm
+@@ -5881,7 +5925,7 @@ static s32 brcmf_dongle_roam(struct brcm
bcn_timeout = BRCMF_DEFAULT_BCN_TIMEOUT_ROAM_ON;
err = brcmf_fil_iovar_int_set(ifp, "bcn_timeout", bcn_timeout);
if (err) {
goto roam_setup_done;
}
-@@ -5890,7 +5934,7 @@ static s32 brcmf_dongle_roam(struct brcm
+@@ -5893,7 +5937,7 @@ static s32 brcmf_dongle_roam(struct brcm
err = brcmf_fil_iovar_int_set(ifp, "roam_off",
ifp->drvr->settings->roamoff);
if (err) {
goto roam_setup_done;
}
-@@ -5899,7 +5943,7 @@ static s32 brcmf_dongle_roam(struct brcm
+@@ -5902,7 +5946,7 @@ static s32 brcmf_dongle_roam(struct brcm
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_ROAM_TRIGGER,
(void *)roamtrigger, sizeof(roamtrigger));
if (err) {
goto roam_setup_done;
}
-@@ -5908,7 +5952,7 @@ static s32 brcmf_dongle_roam(struct brcm
+@@ -5911,7 +5955,7 @@ static s32 brcmf_dongle_roam(struct brcm
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_ROAM_DELTA,
(void *)roam_delta, sizeof(roam_delta));
if (err) {
goto roam_setup_done;
}
-@@ -5919,26 +5963,26 @@ roam_setup_done:
+@@ -5922,26 +5966,26 @@ roam_setup_done:
static s32
brcmf_dongle_scantime(struct brcmf_if *ifp)
{
goto dongle_scantime_out;
}
-@@ -5971,7 +6015,8 @@ static int brcmf_construct_chaninfo(stru
+@@ -5974,7 +6018,8 @@ static int brcmf_construct_chaninfo(stru
u32 bw_cap[])
{
struct wiphy *wiphy = cfg_to_wiphy(cfg);
struct ieee80211_supported_band *band;
struct ieee80211_channel *channel;
struct brcmf_chanspec_list *list;
-@@ -5992,7 +6037,7 @@ static int brcmf_construct_chaninfo(stru
+@@ -5995,7 +6040,7 @@ static int brcmf_construct_chaninfo(stru
err = brcmf_fil_iovar_data_get(ifp, "chanspecs", pbuf,
BRCMF_DCMD_MEDLEN);
if (err) {
goto fail_pbuf;
}
-@@ -6015,7 +6060,7 @@ static int brcmf_construct_chaninfo(stru
+@@ -6018,7 +6063,7 @@ static int brcmf_construct_chaninfo(stru
} else if (ch.band == BRCMU_CHAN_BAND_5G) {
band = wiphy->bands[NL80211_BAND_5GHZ];
} else {
ch.chspec);
continue;
}
-@@ -6039,7 +6084,7 @@ static int brcmf_construct_chaninfo(stru
+@@ -6042,7 +6087,7 @@ static int brcmf_construct_chaninfo(stru
/* It seems firmware supports some channel we never
* considered. Something new in IEEE standard?
*/
ch.control_ch_num);
continue;
}
-@@ -6096,8 +6141,8 @@ fail_pbuf:
+@@ -6099,8 +6144,8 @@ fail_pbuf:
static int brcmf_enable_bw40_2g(struct brcmf_cfg80211_info *cfg)
{
struct ieee80211_supported_band *band;
struct brcmf_fil_bwcap_le band_bwcap;
struct brcmf_chanspec_list *list;
-@@ -6143,7 +6188,7 @@ static int brcmf_enable_bw40_2g(struct b
+@@ -6146,7 +6191,7 @@ static int brcmf_enable_bw40_2g(struct b
err = brcmf_fil_iovar_data_get(ifp, "chanspecs", pbuf,
BRCMF_DCMD_MEDLEN);
if (err) {
kfree(pbuf);
return err;
}
-@@ -6174,7 +6219,7 @@ static int brcmf_enable_bw40_2g(struct b
+@@ -6177,7 +6222,7 @@ static int brcmf_enable_bw40_2g(struct b
static void brcmf_get_bwcap(struct brcmf_if *ifp, u32 bw_cap[])
{
u32 band, mimo_bwcap;
int err;
-@@ -6210,7 +6255,7 @@ static void brcmf_get_bwcap(struct brcmf
+@@ -6213,7 +6258,7 @@ static void brcmf_get_bwcap(struct brcmf
bw_cap[NL80211_BAND_5GHZ] |= WLC_BW_20MHZ_BIT;
break;
default:
}
}
-@@ -6285,7 +6330,8 @@ static void brcmf_update_vht_cap(struct
+@@ -6288,7 +6333,8 @@ static void brcmf_update_vht_cap(struct
static int brcmf_setup_wiphybands(struct brcmf_cfg80211_info *cfg)
{
struct wiphy *wiphy = cfg_to_wiphy(cfg);
u32 nmode = 0;
u32 vhtmode = 0;
-@@ -6302,7 +6348,7 @@ static int brcmf_setup_wiphybands(struct
+@@ -6305,7 +6351,7 @@ static int brcmf_setup_wiphybands(struct
(void)brcmf_fil_iovar_int_get(ifp, "vhtmode", &vhtmode);
err = brcmf_fil_iovar_int_get(ifp, "nmode", &nmode);
if (err) {
} else {
brcmf_get_bwcap(ifp, bw_cap);
}
-@@ -6312,7 +6358,7 @@ static int brcmf_setup_wiphybands(struct
+@@ -6315,7 +6361,7 @@ static int brcmf_setup_wiphybands(struct
err = brcmf_fil_iovar_int_get(ifp, "rxchain", &rxchain);
if (err) {
nchain = 1;
} else {
for (nchain = 0; rxchain; nchain++)
-@@ -6322,7 +6368,7 @@ static int brcmf_setup_wiphybands(struct
+@@ -6325,7 +6371,7 @@ static int brcmf_setup_wiphybands(struct
err = brcmf_construct_chaninfo(cfg, bw_cap);
if (err) {
return err;
}
-@@ -6529,12 +6575,13 @@ static void brcmf_wiphy_wowl_params(stru
+@@ -6532,12 +6578,13 @@ static void brcmf_wiphy_wowl_params(stru
{
#ifdef CONFIG_PM
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
wiphy->wowlan = &brcmf_wowlan_support;
return;
}
-@@ -6631,7 +6678,7 @@ static int brcmf_setup_wiphy(struct wiph
+@@ -6634,7 +6681,7 @@ static int brcmf_setup_wiphy(struct wiph
err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_BANDLIST, &bandlist,
sizeof(bandlist));
if (err) {
return err;
}
/* first entry in bandlist is number of bands */
-@@ -6680,7 +6727,7 @@ static int brcmf_setup_wiphy(struct wiph
+@@ -6683,7 +6730,7 @@ static int brcmf_setup_wiphy(struct wiph
static s32 brcmf_config_dongle(struct brcmf_cfg80211_info *cfg)
{
struct net_device *ndev;
struct wireless_dev *wdev;
struct brcmf_if *ifp;
-@@ -6718,7 +6765,7 @@ static s32 brcmf_config_dongle(struct br
+@@ -6721,7 +6768,7 @@ static s32 brcmf_config_dongle(struct br
err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_FAKEFRAG, 1);
if (err) {
goto default_conf_out;
}
-@@ -6899,6 +6946,7 @@ static void brcmf_cfg80211_reg_notifier(
+@@ -6902,6 +6949,7 @@ static void brcmf_cfg80211_reg_notifier(
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct brcmf_if *ifp = brcmf_get_ifp(cfg->pub, 0);
struct brcmf_fil_country_le ccreq;
s32 err;
int i;
-@@ -6910,7 +6958,7 @@ static void brcmf_cfg80211_reg_notifier(
+@@ -6913,7 +6961,7 @@ static void brcmf_cfg80211_reg_notifier(
/* ignore non-ISO3166 country codes */
for (i = 0; i < 2; i++)
if (req->alpha2[i] < 'A' || req->alpha2[i] > 'Z') {
req->alpha2[0], req->alpha2[1]);
return;
}
-@@ -6920,7 +6968,7 @@ static void brcmf_cfg80211_reg_notifier(
+@@ -6923,7 +6971,7 @@ static void brcmf_cfg80211_reg_notifier(
err = brcmf_fil_iovar_data_get(ifp, "country", &ccreq, sizeof(ccreq));
if (err) {
return;
}
-@@ -6930,7 +6978,7 @@ static void brcmf_cfg80211_reg_notifier(
+@@ -6933,7 +6981,7 @@ static void brcmf_cfg80211_reg_notifier(
err = brcmf_fil_iovar_data_set(ifp, "country", &ccreq, sizeof(ccreq));
if (err) {
return;
}
brcmf_setup_wiphybands(cfg);
-@@ -6976,13 +7024,13 @@ struct brcmf_cfg80211_info *brcmf_cfg802
+@@ -6979,13 +7027,13 @@ struct brcmf_cfg80211_info *brcmf_cfg802
u16 *cap = NULL;
if (!ndev) {
return NULL;
}
-@@ -7003,7 +7051,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802
+@@ -7006,7 +7054,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802
err = wl_init_priv(cfg);
if (err) {
brcmf_free_vif(vif);
goto wiphy_out;
}
-@@ -7012,7 +7060,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802
+@@ -7015,7 +7063,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802
/* determine d11 io type before wiphy setup */
err = brcmf_fil_cmd_int_get(ifp, BRCMF_C_GET_VERSION, &io_type);
if (err) {
goto priv_out;
}
cfg->d11inf.io_type = (u8)io_type;
-@@ -7046,13 +7094,13 @@ struct brcmf_cfg80211_info *brcmf_cfg802
+@@ -7049,13 +7097,13 @@ struct brcmf_cfg80211_info *brcmf_cfg802
#endif
err = wiphy_register(wiphy);
if (err < 0) {
goto wiphy_unreg_out;
}
-@@ -7070,24 +7118,24 @@ struct brcmf_cfg80211_info *brcmf_cfg802
+@@ -7073,24 +7121,24 @@ struct brcmf_cfg80211_info *brcmf_cfg802
err = brcmf_fweh_activate_events(ifp);
if (err) {
brcmf_btcoex_detach(cfg);
brcmf_p2p_detach(&cfg->p2p);
goto wiphy_unreg_out;
-@@ -7107,7 +7155,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802
+@@ -7110,7 +7158,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802
/* (re-) activate FWEH event handling */
err = brcmf_fweh_activate_events(ifp);
if (err) {
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
-@@ -6728,6 +6728,11 @@ static int brcmf_setup_wiphy(struct wiph
+@@ -6731,6 +6731,11 @@ static int brcmf_setup_wiphy(struct wiph
}
}
vif->profile.use_fwsup = BRCMF_PROFILE_FWSUP_NONE;
}
brcmf_dbg(TRACE, "Exit\n");
-@@ -4996,18 +5001,16 @@ static int brcmf_cfg80211_get_channel(st
+@@ -4999,18 +5004,16 @@ static int brcmf_cfg80211_get_channel(st
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct net_device *ndev = wdev->netdev;
struct brcmf_pub *drvr = cfg->pub;
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
-@@ -2974,8 +2974,6 @@ static s32 brcmf_update_bss_info(struct
+@@ -2977,8 +2977,6 @@ static s32 brcmf_update_bss_info(struct
struct brcmf_pub *drvr = cfg->pub;
struct brcmf_bss_info_le *bi;
const struct brcmf_tlv *tim;
size_t ie_len;
u8 *ie;
s32 err = 0;
-@@ -2999,12 +2997,9 @@ static s32 brcmf_update_bss_info(struct
+@@ -3002,12 +3000,9 @@ static s32 brcmf_update_bss_info(struct
ie = ((u8 *)bi) + le16_to_cpu(bi->ie_offset);
ie_len = le32_to_cpu(bi->ie_length);
/*
* active scan was done so we could not get dtim
* information out of probe response.
-@@ -3016,7 +3011,6 @@ static s32 brcmf_update_bss_info(struct
+@@ -3019,7 +3014,6 @@ static s32 brcmf_update_bss_info(struct
bphy_err(drvr, "wl dtim_assoc failed (%d)\n", err);
goto update_bss_info_out;
}
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
-@@ -4236,9 +4236,7 @@ next:
+@@ -4239,9 +4239,7 @@ next:
static u32
brcmf_vndr_ie(u8 *iebuf, s32 pktflag, u8 *ie_ptr, u32 ie_len, s8 *add_del_cmd)
{
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
-@@ -4214,10 +4214,8 @@ brcmf_parse_vndr_ies(const u8 *vndr_ie_b
+@@ -4217,10 +4217,8 @@ brcmf_parse_vndr_ies(const u8 *vndr_ie_b
vndr_ies->count++;
parsed_info->vndrie.oui_type);
if (vndr_ies->count >= VNDR_IE_PARSE_LIMIT)
-@@ -4341,12 +4339,10 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
+@@ -4344,12 +4342,10 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
for (i = 0; i < old_vndr_ies.count; i++) {
vndrie_info = &old_vndr_ies.ie_info[i];
del_add_ie_buf_len = brcmf_vndr_ie(curr_ie_buf, pktflag,
vndrie_info->ie_ptr,
-@@ -4378,12 +4374,10 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
+@@ -4381,12 +4377,10 @@ s32 brcmf_vif_set_mgmt_ie(struct brcmf_c
remained_buf_len -= (vndrie_info->ie_len +
VNDR_IE_VSIE_OFFSET);
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
-@@ -7197,7 +7197,6 @@ void brcmf_cfg80211_detach(struct brcmf_
+@@ -7200,7 +7200,6 @@ void brcmf_cfg80211_detach(struct brcmf_
brcmf_pno_detach(cfg);
brcmf_btcoex_detach(cfg);
wiphy_unregister(cfg->wiphy);
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
-@@ -5939,19 +5939,17 @@ static s32 brcmf_dongle_roam(struct brcm
+@@ -5942,19 +5942,17 @@ static s32 brcmf_dongle_roam(struct brcm
roamtrigger[1] = cpu_to_le32(BRCM_BAND_ALL);
err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_ROAM_TRIGGER,
(void *)roamtrigger, sizeof(roamtrigger));
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
-@@ -6447,6 +6447,9 @@ brcmf_txrx_stypes[NUM_NL80211_IFTYPES] =
+@@ -6450,6 +6450,9 @@ brcmf_txrx_stypes[NUM_NL80211_IFTYPES] =
* #STA <= 1, #AP <= 1, channels = 1, 2 total
* #AP <= 4, matching BI, channels = 1, 4 total
*
* p2p, no mchan, and mbss:
*
* #STA <= 1, #P2P-DEV <= 1, #{P2P-CL, P2P-GO} <= 1, channels = 1, 3 total
-@@ -6458,6 +6461,10 @@ brcmf_txrx_stypes[NUM_NL80211_IFTYPES] =
+@@ -6461,6 +6464,10 @@ brcmf_txrx_stypes[NUM_NL80211_IFTYPES] =
* #STA <= 1, #P2P-DEV <= 1, #{P2P-CL, P2P-GO} <= 1, channels = 2, 3 total
* #STA <= 1, #P2P-DEV <= 1, #AP <= 1, #P2P-CL <= 1, channels = 1, 4 total
* #AP <= 4, matching BI, channels = 1, 4 total
*/
static int brcmf_setup_ifmodes(struct wiphy *wiphy, struct brcmf_if *ifp)
{
-@@ -6465,13 +6472,14 @@ static int brcmf_setup_ifmodes(struct wi
+@@ -6468,13 +6475,14 @@ static int brcmf_setup_ifmodes(struct wi
struct ieee80211_iface_limit *c0_limits = NULL;
struct ieee80211_iface_limit *p2p_limits = NULL;
struct ieee80211_iface_limit *mbss_limits = NULL;
combo = kcalloc(n_combos, sizeof(*combo), GFP_KERNEL);
if (!combo)
goto err;
-@@ -6482,16 +6490,36 @@ static int brcmf_setup_ifmodes(struct wi
+@@ -6485,16 +6493,36 @@ static int brcmf_setup_ifmodes(struct wi
c = 0;
i = 0;
wiphy->interface_modes |= BIT(NL80211_IFTYPE_P2P_CLIENT) |
BIT(NL80211_IFTYPE_P2P_GO) |
BIT(NL80211_IFTYPE_P2P_DEVICE);
-@@ -6500,16 +6528,26 @@ static int brcmf_setup_ifmodes(struct wi
+@@ -6503,16 +6531,26 @@ static int brcmf_setup_ifmodes(struct wi
c0_limits[i].max = 1;
c0_limits[i++].types = BIT(NL80211_IFTYPE_P2P_CLIENT) |
BIT(NL80211_IFTYPE_P2P_GO);
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
-@@ -5293,6 +5293,7 @@ struct brcmf_cfg80211_vif *brcmf_alloc_v
+@@ -5296,6 +5296,7 @@ struct brcmf_cfg80211_vif *brcmf_alloc_v
struct brcmf_cfg80211_vif *vif_walk;
struct brcmf_cfg80211_vif *vif;
bool mbss;
brcmf_dbg(TRACE, "allocating virtual interface (size=%zu)\n",
sizeof(*vif));
-@@ -5305,7 +5306,8 @@ struct brcmf_cfg80211_vif *brcmf_alloc_v
+@@ -5308,7 +5309,8 @@ struct brcmf_cfg80211_vif *brcmf_alloc_v
brcmf_init_prof(&vif->profile);
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
-@@ -6474,12 +6474,13 @@ static int brcmf_setup_ifmodes(struct wi
+@@ -6477,12 +6477,13 @@ static int brcmf_setup_ifmodes(struct wi
struct ieee80211_iface_limit *c0_limits = NULL;
struct ieee80211_iface_limit *p2p_limits = NULL;
struct ieee80211_iface_limit *mbss_limits = NULL;
n_combos = 1 + !!(p2p && !rsdb) + !!mbss;
combo = kcalloc(n_combos, sizeof(*combo), GFP_KERNEL);
-@@ -6489,6 +6490,10 @@ static int brcmf_setup_ifmodes(struct wi
+@@ -6492,6 +6493,10 @@ static int brcmf_setup_ifmodes(struct wi
wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
BIT(NL80211_IFTYPE_ADHOC) |
BIT(NL80211_IFTYPE_AP);
c = 0;
i = 0;
-@@ -6500,48 +6505,28 @@ static int brcmf_setup_ifmodes(struct wi
+@@ -6503,48 +6508,28 @@ static int brcmf_setup_ifmodes(struct wi
c0_limits = kcalloc(2, sizeof(*c0_limits), GFP_KERNEL);
if (!c0_limits)
goto err;
case NL80211_IFTYPE_AP:
return brcmf_cfg80211_del_ap_iface(wiphy, wdev);
case NL80211_IFTYPE_P2P_CLIENT:
-@@ -6474,9 +6553,10 @@ static int brcmf_setup_ifmodes(struct wi
+@@ -6477,9 +6556,10 @@ static int brcmf_setup_ifmodes(struct wi
struct ieee80211_iface_limit *c0_limits = NULL;
struct ieee80211_iface_limit *p2p_limits = NULL;
struct ieee80211_iface_limit *mbss_limits = NULL;
mbss = brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MBSS);
p2p = brcmf_feat_is_enabled(ifp, BRCMF_FEAT_P2P);
rsdb = brcmf_feat_is_enabled(ifp, BRCMF_FEAT_RSDB);
-@@ -6490,6 +6570,8 @@ static int brcmf_setup_ifmodes(struct wi
+@@ -6493,6 +6573,8 @@ static int brcmf_setup_ifmodes(struct wi
wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
BIT(NL80211_IFTYPE_ADHOC) |
BIT(NL80211_IFTYPE_AP);
if (p2p)
wiphy->interface_modes |= BIT(NL80211_IFTYPE_P2P_CLIENT) |
BIT(NL80211_IFTYPE_P2P_GO) |
-@@ -6497,18 +6579,18 @@ static int brcmf_setup_ifmodes(struct wi
+@@ -6500,18 +6582,18 @@ static int brcmf_setup_ifmodes(struct wi
c = 0;
i = 0;
if (p2p) {
c0_limits[i].max = 1;
c0_limits[i++].types = BIT(NL80211_IFTYPE_P2P_DEVICE);
-@@ -6557,14 +6639,20 @@ static int brcmf_setup_ifmodes(struct wi
+@@ -6560,14 +6642,20 @@ static int brcmf_setup_ifmodes(struct wi
if (mbss) {
c++;
i = 0;
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
-@@ -2866,6 +2866,10 @@ brcmf_cfg80211_set_power_mgmt(struct wip
+@@ -2869,6 +2869,10 @@ brcmf_cfg80211_set_power_mgmt(struct wip
* preference in cfg struct to apply this to
* FW later while initializing the dongle
*/
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
-@@ -3833,6 +3833,12 @@ out:
+@@ -3841,6 +3841,12 @@ out:
netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
struct net_device *dev)
{
(unsigned long) local);
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
-@@ -3498,13 +3498,19 @@ struct sk_buff *ieee80211_tx_dequeue(str
+@@ -3506,13 +3506,19 @@ struct sk_buff *ieee80211_tx_dequeue(str
struct ieee80211_tx_info *info;
struct ieee80211_tx_data tx;
ieee80211_tx_result r;
/* Make sure fragments stay together. */
skb = __skb_dequeue(&txqi->frags);
if (skb)
-@@ -3617,6 +3623,7 @@ begin:
+@@ -3625,6 +3631,7 @@ begin:
}
IEEE80211_SKB_CB(skb)->control.vif = vif;
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
-@@ -1441,6 +1441,7 @@ void ieee80211_txq_init(struct ieee80211
+@@ -1447,6 +1447,7 @@ void ieee80211_txq_init(struct ieee80211
codel_vars_init(&txqi->def_cvars);
codel_stats_init(&txqi->cstats);
__skb_queue_head_init(&txqi->frags);
txqi->txq.vif = &sdata->vif;
-@@ -1464,6 +1465,9 @@ void ieee80211_txq_purge(struct ieee8021
+@@ -1470,6 +1471,9 @@ void ieee80211_txq_purge(struct ieee8021
fq_tin_reset(fq, tin, fq_skb_free_func);
ieee80211_purge_tx_queue(&local->hw, &txqi->frags);
}
void ieee80211_txq_set_params(struct ieee80211_local *local)
-@@ -1580,7 +1584,7 @@ static bool ieee80211_queue_skb(struct i
+@@ -1586,7 +1590,7 @@ static bool ieee80211_queue_skb(struct i
ieee80211_txq_enqueue(local, txqi, skb);
spin_unlock_bh(&fq->lock);
return true;
}
-@@ -3631,6 +3635,60 @@ out:
+@@ -3639,6 +3643,60 @@ out:
}
EXPORT_SYMBOL(ieee80211_tx_dequeue);
};
/* policy for the key attributes */
-@@ -4715,6 +4716,11 @@ static int nl80211_send_station(struct s
+@@ -4716,6 +4717,11 @@ static int nl80211_send_station(struct s
PUT_SINFO(PLID, plid, u16);
PUT_SINFO(PLINK_STATE, plink_state, u8);
PUT_SINFO_U64(RX_DURATION, rx_duration);
switch (rdev->wiphy.signal_type) {
case CFG80211_SIGNAL_TYPE_MBM:
-@@ -5351,6 +5357,15 @@ static int nl80211_set_station(struct sk
+@@ -5352,6 +5358,15 @@ static int nl80211_set_station(struct sk
nla_get_u8(info->attrs[NL80211_ATTR_OPMODE_NOTIF]);
}
/* Include parameters for TDLS peer (will check later) */
err = nl80211_set_station_tdls(info, ¶ms);
if (err)
-@@ -5489,6 +5504,15 @@ static int nl80211_new_station(struct sk
+@@ -5490,6 +5505,15 @@ static int nl80211_new_station(struct sk
return -EINVAL;
}
/* if the dir failed, don't put all the other things into the root! */
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
-@@ -178,9 +178,9 @@ static ssize_t sta_aqm_read(struct file
+@@ -179,9 +179,9 @@ static ssize_t sta_aqm_read(struct file
txqi->tin.tx_bytes,
txqi->tin.tx_packets,
txqi->flags,
}
rcu_read_unlock();
-@@ -192,6 +192,64 @@ static ssize_t sta_aqm_read(struct file
+@@ -193,6 +193,64 @@ static ssize_t sta_aqm_read(struct file
}
STA_OPS(aqm);
static ssize_t sta_agg_status_read(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos)
{
-@@ -546,6 +604,10 @@ void ieee80211_sta_debugfs_add(struct st
+@@ -547,6 +605,10 @@ void ieee80211_sta_debugfs_add(struct st
if (local->ops->wake_tx_queue)
DEBUGFS_ADD(aqm);
}
for (i = 0; i < IEEE80211_NUM_TIDS; i++)
-@@ -1842,6 +1842,27 @@ void ieee80211_sta_set_buffered(struct i
+@@ -1837,6 +1837,27 @@ void ieee80211_sta_set_buffered(struct i
}
EXPORT_SYMBOL(ieee80211_sta_set_buffered);
int sta_info_move_state(struct sta_info *sta,
enum ieee80211_sta_state new_state)
{
-@@ -2212,6 +2233,23 @@ void sta_set_sinfo(struct sta_info *sta,
+@@ -2207,6 +2228,23 @@ void sta_set_sinfo(struct sta_info *sta,
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_FAILED);
}
for_each_possible_cpu(cpu) {
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
-@@ -128,6 +128,16 @@ enum ieee80211_agg_stop_reason {
+@@ -129,6 +129,16 @@ enum ieee80211_agg_stop_reason {
AGG_STOP_DESTROY_STA,
};
struct sta_info;
/**
-@@ -593,6 +603,9 @@ struct sta_info {
+@@ -594,6 +604,9 @@ struct sta_info {
} tx_stats;
u16 tid_seq[IEEE80211_QOS_CTL_TID_MASK + 1];
if (sta->status_stats.lost_packets)
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
-@@ -1463,8 +1463,11 @@ void ieee80211_txq_purge(struct ieee8021
+@@ -1469,8 +1469,11 @@ void ieee80211_txq_purge(struct ieee8021
struct fq *fq = &local->fq;
struct fq_tin *tin = &txqi->tin;
spin_lock_bh(&local->active_txq_lock[txqi->txq.ac]);
list_del_init(&txqi->schedule_order);
spin_unlock_bh(&local->active_txq_lock[txqi->txq.ac]);
-@@ -3642,11 +3645,28 @@ struct ieee80211_txq *ieee80211_next_txq
+@@ -3650,11 +3653,28 @@ struct ieee80211_txq *ieee80211_next_txq
lockdep_assert_held(&local->active_txq_lock[ac]);
return NULL;
list_del_init(&txqi->schedule_order);
-@@ -3664,12 +3684,74 @@ void ieee80211_return_txq(struct ieee802
+@@ -3672,12 +3692,74 @@ void ieee80211_return_txq(struct ieee802
lockdep_assert_held(&local->active_txq_lock[txq->ac]);
if (list_empty(&txqi->schedule_order) &&
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
-@@ -3704,6 +3704,19 @@ void ieee80211_return_txq(struct ieee802
+@@ -3712,6 +3712,19 @@ void ieee80211_return_txq(struct ieee802
}
EXPORT_SYMBOL(ieee80211_return_txq);
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
-@@ -925,7 +925,7 @@ ieee80211_tx_h_fragment(struct ieee80211
+@@ -931,7 +931,7 @@ ieee80211_tx_h_fragment(struct ieee80211
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
struct ieee80211_hdr *hdr = (void *)skb->data;
int frag_threshold = tx->local->hw.wiphy->frag_threshold;
int fragnum;
/* no matter what happens, tx->skb moves to tx->skbs */
-@@ -946,8 +946,6 @@ ieee80211_tx_h_fragment(struct ieee80211
+@@ -952,8 +952,6 @@ ieee80211_tx_h_fragment(struct ieee80211
if (WARN_ON(info->flags & IEEE80211_TX_CTL_AMPDU))
return TX_DROP;
/* internal error, why isn't DONTFRAG set? */
if (WARN_ON(skb->len + FCS_LEN <= frag_threshold))
return TX_DROP;
-@@ -1178,6 +1176,8 @@ ieee80211_tx_prepare(struct ieee80211_su
+@@ -1184,6 +1182,8 @@ ieee80211_tx_prepare(struct ieee80211_su
hdr = (struct ieee80211_hdr *) skb->data;
if (likely(sta)) {
if (!IS_ERR(sta))
tx->sta = sta;
-@@ -3536,6 +3536,7 @@ begin:
+@@ -3544,6 +3544,7 @@ begin:
tx.local = local;
tx.skb = skb;
tx.sdata = vif_to_sdata(info->control.vif);
if (txq->sta) {
tx.sta = container_of(txq->sta, struct sta_info, sta);
-@@ -3580,7 +3581,7 @@ begin:
+@@ -3588,7 +3589,7 @@ begin:
if (tx.key &&
(tx.key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV))
ieee80211_xmit_fast_finish(sta->sdata, sta, pn_offs,
tx.key, skb);
-@@ -4039,6 +4040,7 @@ ieee80211_build_data_template(struct iee
+@@ -4047,6 +4048,7 @@ ieee80211_build_data_template(struct iee
hdr = (void *)skb->data;
tx.sta = sta_info_get(sdata, hdr->addr1);
tx.skb = skb;
if (!(mshdr->flags & MESH_FLAGS_AE)) {
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
-@@ -2705,7 +2705,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
+@@ -2702,7 +2702,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
struct ieee80211_local *local = rx->local;
struct ieee80211_sub_if_data *sdata = rx->sdata;
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
int tailroom = 0;
hdr = (struct ieee80211_hdr *) skb->data;
-@@ -2798,7 +2798,9 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
+@@ -2795,7 +2795,9 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
if (sdata->crypto_tx_tailroom_needed_cnt)
tailroom = IEEE80211_ENCRYPT_TAILROOM;
sdata->encrypt_headroom,
tailroom, GFP_ATOMIC);
if (!fwd_skb)
-@@ -2830,6 +2832,12 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
+@@ -2827,6 +2829,12 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
return RX_DROP_MONITOR;
}
out:
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
-@@ -312,7 +312,7 @@ struct ieee80211_fast_tx {
+@@ -313,7 +313,7 @@ struct ieee80211_fast_tx {
u8 hdr_len;
u8 sa_offs, da_offs, pn_offs;
u8 band;
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
-@@ -1175,8 +1175,7 @@ ieee80211_tx_prepare(struct ieee80211_su
+@@ -1181,8 +1181,7 @@ ieee80211_tx_prepare(struct ieee80211_su
info->flags &= ~IEEE80211_TX_INTFL_NEED_TXPROCESSING;
hdr = (struct ieee80211_hdr *) skb->data;
if (likely(sta)) {
if (!IS_ERR(sta))
-@@ -2233,7 +2232,7 @@ netdev_tx_t ieee80211_monitor_start_xmit
+@@ -2239,7 +2238,7 @@ netdev_tx_t ieee80211_monitor_start_xmit
goto fail;
hdr = (struct ieee80211_hdr *)(skb->data + len_rthdr);
if (skb->len < len_rthdr + hdrlen)
goto fail;
-@@ -2452,7 +2451,7 @@ static struct sk_buff *ieee80211_build_h
+@@ -2458,7 +2457,7 @@ static struct sk_buff *ieee80211_build_h
struct ieee80211_chanctx_conf *chanctx_conf;
struct ieee80211_sub_if_data *ap_sdata;
enum nl80211_band band;
if (IS_ERR(sta))
sta = NULL;
-@@ -2751,7 +2750,9 @@ static struct sk_buff *ieee80211_build_h
+@@ -2757,7 +2756,9 @@ static struct sk_buff *ieee80211_build_h
}
skb_pull(skb, skip_header_bytes);
/*
* So we need to modify the skb header and hence need a copy of
-@@ -2784,6 +2785,9 @@ static struct sk_buff *ieee80211_build_h
+@@ -2790,6 +2791,9 @@ static struct sk_buff *ieee80211_build_h
memcpy(skb_push(skb, meshhdrlen), &mesh_hdr, meshhdrlen);
#endif
if (ieee80211_is_data_qos(fc)) {
__le16 *qos_control;
-@@ -2960,6 +2964,8 @@ void ieee80211_check_fast_xmit(struct st
+@@ -2966,6 +2970,8 @@ void ieee80211_check_fast_xmit(struct st
fc |= cpu_to_le16(IEEE80211_STYPE_QOS_DATA);
}
/* We store the key here so there's no point in using rcu_dereference()
* but that's fine because the code that changes the pointers will call
* this function after doing so. For a single CPU that would be enough,
-@@ -3536,7 +3542,7 @@ begin:
+@@ -3544,7 +3550,7 @@ begin:
tx.local = local;
tx.skb = skb;
tx.sdata = vif_to_sdata(info->control.vif);
if (txq->sta) {
tx.sta = container_of(txq->sta, struct sta_info, sta);
-@@ -4040,7 +4046,7 @@ ieee80211_build_data_template(struct iee
+@@ -4048,7 +4054,7 @@ ieee80211_build_data_template(struct iee
hdr = (void *)skb->data;
tx.sta = sta_info_get(sdata, hdr->addr1);
tx.skb = skb;
* ieee80211_txq_may_transmit - check whether TXQ is allowed to transmit
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
-@@ -3648,16 +3648,17 @@ EXPORT_SYMBOL(ieee80211_tx_dequeue);
+@@ -3656,16 +3656,17 @@ EXPORT_SYMBOL(ieee80211_tx_dequeue);
struct ieee80211_txq *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac)
{
struct ieee80211_local *local = hw_to_local(hw);
if (txqi->txq.sta) {
struct sta_info *sta = container_of(txqi->txq.sta,
-@@ -3674,21 +3675,25 @@ struct ieee80211_txq *ieee80211_next_txq
+@@ -3682,21 +3683,25 @@ struct ieee80211_txq *ieee80211_next_txq
if (txqi->schedule_round == local->schedule_round[ac])
if (list_empty(&txqi->schedule_order) &&
(!skb_queue_empty(&txqi->frags) || txqi->tin.backlog_packets)) {
-@@ -3708,18 +3713,7 @@ void ieee80211_return_txq(struct ieee802
+@@ -3716,18 +3721,7 @@ void ieee80211_return_txq(struct ieee802
list_add_tail(&txqi->schedule_order,
&local->active_txqs[txq->ac]);
}
spin_unlock_bh(&local->active_txq_lock[txq->ac]);
}
EXPORT_SYMBOL(ieee80211_schedule_txq);
-@@ -3732,7 +3726,7 @@ bool ieee80211_txq_may_transmit(struct i
+@@ -3740,7 +3734,7 @@ bool ieee80211_txq_may_transmit(struct i
struct sta_info *sta;
u8 ac = txq->ac;
if (!txqi->txq.sta)
goto out;
-@@ -3762,34 +3756,27 @@ bool ieee80211_txq_may_transmit(struct i
+@@ -3770,34 +3764,27 @@ bool ieee80211_txq_may_transmit(struct i
sta->airtime[ac].deficit += sta->airtime_weight;
list_move_tail(&txqi->schedule_order, &local->active_txqs[ac]);
flow->backlog += skb->len;
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
-@@ -1390,11 +1390,15 @@ static void ieee80211_txq_enqueue(struct
+@@ -1396,11 +1396,15 @@ static void ieee80211_txq_enqueue(struct
{
struct fq *fq = &local->fq;
struct fq_tin *tin = &txqi->tin;
}
static bool fq_vlan_filter_func(struct fq *fq, struct fq_tin *tin,
-@@ -1564,7 +1568,6 @@ static bool ieee80211_queue_skb(struct i
+@@ -1570,7 +1574,6 @@ static bool ieee80211_queue_skb(struct i
struct sta_info *sta,
struct sk_buff *skb)
{
struct ieee80211_vif *vif;
struct txq_info *txqi;
-@@ -1582,9 +1585,7 @@ static bool ieee80211_queue_skb(struct i
+@@ -1588,9 +1591,7 @@ static bool ieee80211_queue_skb(struct i
if (!txqi)
return false;
schedule_and_wake_txq(local, txqi);
-@@ -3211,6 +3212,7 @@ static bool ieee80211_amsdu_aggregate(st
+@@ -3219,6 +3220,7 @@ static bool ieee80211_amsdu_aggregate(st
u8 max_subframes = sta->sta.max_amsdu_subframes;
int max_frags = local->hw.max_tx_fragments;
int max_amsdu_len = sta->sta.max_amsdu_len;
int orig_truesize;
__be16 len;
void *data;
-@@ -3233,6 +3235,8 @@ static bool ieee80211_amsdu_aggregate(st
+@@ -3241,6 +3243,8 @@ static bool ieee80211_amsdu_aggregate(st
max_amsdu_len = min_t(int, max_amsdu_len,
sta->sta.max_rc_amsdu_len);
spin_lock_bh(&fq->lock);
/* TODO: Ideally aggregation should be done on dequeue to remain
-@@ -3240,7 +3244,8 @@ static bool ieee80211_amsdu_aggregate(st
+@@ -3248,7 +3252,8 @@ static bool ieee80211_amsdu_aggregate(st
*/
tin = &txqi->tin;
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
-@@ -3518,6 +3518,7 @@ struct sk_buff *ieee80211_tx_dequeue(str
+@@ -3526,6 +3526,7 @@ struct sk_buff *ieee80211_tx_dequeue(str
ieee80211_tx_result r;
struct ieee80211_vif *vif = txq->vif;
spin_lock_bh(&fq->lock);
if (test_bit(IEEE80211_TXQ_STOP, &txqi->flags) ||
-@@ -3534,11 +3535,12 @@ struct sk_buff *ieee80211_tx_dequeue(str
+@@ -3542,11 +3543,12 @@ struct sk_buff *ieee80211_tx_dequeue(str
if (skb)
goto out;
hdr = (struct ieee80211_hdr *)skb->data;
info = IEEE80211_SKB_CB(skb);
-@@ -3602,8 +3604,11 @@ begin:
+@@ -3610,8 +3612,11 @@ begin:
skb = __skb_dequeue(&tx.skbs);
}
if (skb && skb_has_frag_list(skb) &&
-@@ -3642,6 +3647,7 @@ begin:
+@@ -3650,6 +3655,7 @@ begin:
}
IEEE80211_SKB_CB(skb)->control.vif = vif;
/**
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
-@@ -3698,8 +3698,9 @@ out:
+@@ -3706,8 +3706,9 @@ out:
}
EXPORT_SYMBOL(ieee80211_next_txq);
{
struct ieee80211_local *local = hw_to_local(hw);
struct txq_info *txqi = to_txq_info(txq);
-@@ -3707,7 +3708,8 @@ void ieee80211_schedule_txq(struct ieee8
+@@ -3715,7 +3716,8 @@ void ieee80211_schedule_txq(struct ieee8
spin_lock_bh(&local->active_txq_lock[txq->ac]);
if (list_empty(&txqi->schedule_order) &&
/* If airtime accounting is active, always enqueue STAs at the
* head of the list to ensure that they only get moved to the
* back by the airtime DRR scheduler once they have a negative
-@@ -3727,7 +3729,7 @@ void ieee80211_schedule_txq(struct ieee8
+@@ -3735,7 +3737,7 @@ void ieee80211_schedule_txq(struct ieee8
spin_unlock_bh(&local->active_txq_lock[txq->ac]);
}
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
-@@ -3797,6 +3797,7 @@ void __ieee80211_subif_start_xmit(struct
+@@ -3805,6 +3805,7 @@ void __ieee80211_subif_start_xmit(struct
u32 ctrl_flags)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct sta_info *sta;
struct sk_buff *next;
-@@ -3810,7 +3811,15 @@ void __ieee80211_subif_start_xmit(struct
+@@ -3818,7 +3819,15 @@ void __ieee80211_subif_start_xmit(struct
if (ieee80211_lookup_ra_sta(sdata, skb, &sta))
goto out_free;
__NL80211_SURVEY_INFO_AFTER_LAST,
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
-@@ -8379,6 +8379,10 @@ static int nl80211_send_survey(struct sk
+@@ -8380,6 +8380,10 @@ static int nl80211_send_survey(struct sk
nla_put_u64_64bit(msg, NL80211_SURVEY_INFO_TIME_SCAN,
survey->time_scan, NL80211_SURVEY_INFO_PAD))
goto nla_put_failure;