Skip to content

Commit da2e852

Browse files
committed
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John Linville says: ==================== Amitkumar Karwar gives us a cfg80211 fix that changes some state tracking in order to avoid a WARNING. Arik Nemtsov provide a mac80211 fix for an RCU-related race. Avinash Patil shares a pair of mwifiex fixes, one which invalidates some stale configuration data before a channel change and another to restrict hidden SSID support to zero-length SSIDs only. Chun-Yeow Yeoh brings a mac80211 fix for a mesh problem triggered when combining multiple mesh networks into one. Felix Fietkau provides a mac80211 lockdep fix. Joe Perches fixes a couple of thinkos related to bitwise operations. Johannes Berg comes through with a flurry of fixes. The iwlwifi ones address a problem Linus recently reported, and some of the fallout discovered while fixing it. The mac80211 fix properly cleans-up remain-on-channel work on an interface that is stopped. The others are clean-ups for regressions caused by stricter checking of possible virtual interfaces supported by wireless drivers. Meenakshi Venkataraman provides a mac80211 fix for an off-by-one error. Seth Forshee provides a fix to make the wireless adapters used in some Mac boxes work after being in S3 power saving state. Stanislaw Gruszka offers a copule of fixes, a fix for a mac80211 scanning regression and an rt2x00 fix to avoid some lockdep spew. Last but not least, Vinicius Costa Gomes provides a bluetooth fix for a typo that "was preventing important features of Bluetooth from working". ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents 55432d2 + 4e924fe commit da2e852

24 files changed

Lines changed: 180 additions & 48 deletions

File tree

‎drivers/bcma/driver_chipcommon_pmu.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ void bcma_pmu_workarounds(struct bcma_drv_cc *cc)
139139
bcma_chipco_chipctl_maskset(cc, 0, ~0, 0x7);
140140
break;
141141
case 0x4331:
142-
/* BCM4331 workaround is SPROM-related, we put it in sprom.c */
142+
case 43431:
143+
/* Ext PA lines must be enabled for tx on BCM4331 */
144+
bcma_chipco_bcm4331_ext_pa_lines_ctl(cc, true);
143145
break;
144146
case 43224:
145147
if (bus->chipinfo.rev == 0) {

‎drivers/bcma/sprom.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -579,13 +579,13 @@ int bcma_sprom_get(struct bcma_bus *bus)
579579
if (!sprom)
580580
return -ENOMEM;
581581

582-
if (bus->chipinfo.id == 0x4331)
582+
if (bus->chipinfo.id == 0x4331 || bus->chipinfo.id == 43431)
583583
bcma_chipco_bcm4331_ext_pa_lines_ctl(&bus->drv_cc, false);
584584

585585
pr_debug("SPROM offset 0x%x\n", offset);
586586
bcma_sprom_read(bus, offset, sprom);
587587

588-
if (bus->chipinfo.id == 0x4331)
588+
if (bus->chipinfo.id == 0x4331 || bus->chipinfo.id == 43431)
589589
bcma_chipco_bcm4331_ext_pa_lines_ctl(&bus->drv_cc, true);
590590

591591
err = bcma_sprom_valid(sprom);

‎drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ int brcmf_sdio_intr_register(struct brcmf_sdio_dev *sdiodev)
8989
data |= 1 << SDIO_FUNC_1 | 1 << SDIO_FUNC_2 | 1;
9090
brcmf_sdio_regwb(sdiodev, SDIO_CCCR_IENx, data, &ret);
9191

92-
/* redirect, configure ane enable io for interrupt signal */
92+
/* redirect, configure and enable io for interrupt signal */
9393
data = SDIO_SEPINT_MASK | SDIO_SEPINT_OE;
94-
if (sdiodev->irq_flags | IRQF_TRIGGER_HIGH)
94+
if (sdiodev->irq_flags & IRQF_TRIGGER_HIGH)
9595
data |= SDIO_SEPINT_ACT_HI;
9696
brcmf_sdio_regwb(sdiodev, SDIO_CCCR_BRCM_SEPINT, data, &ret);
9797

‎drivers/net/wireless/iwlwifi/iwl-drv.c‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -861,13 +861,18 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context)
861861

862862
/* We have our copies now, allow OS release its copies */
863863
release_firmware(ucode_raw);
864-
complete(&drv->request_firmware_complete);
865864

866865
drv->op_mode = iwl_dvm_ops.start(drv->trans, drv->cfg, &drv->fw);
867866

868867
if (!drv->op_mode)
869-
goto out_free_fw;
868+
goto out_unbind;
870869

870+
/*
871+
* Complete the firmware request last so that
872+
* a driver unbind (stop) doesn't run while we
873+
* are doing the start() above.
874+
*/
875+
complete(&drv->request_firmware_complete);
871876
return;
872877

873878
try_again:

‎drivers/net/wireless/iwlwifi/iwl-eeprom.c‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -568,28 +568,28 @@ static int iwl_find_otp_image(struct iwl_trans *trans,
568568
* iwl_get_max_txpower_avg - get the highest tx power from all chains.
569569
* find the highest tx power from all chains for the channel
570570
*/
571-
static s8 iwl_get_max_txpower_avg(const struct iwl_cfg *cfg,
571+
static s8 iwl_get_max_txpower_avg(struct iwl_priv *priv,
572572
struct iwl_eeprom_enhanced_txpwr *enhanced_txpower,
573573
int element, s8 *max_txpower_in_half_dbm)
574574
{
575575
s8 max_txpower_avg = 0; /* (dBm) */
576576

577577
/* Take the highest tx power from any valid chains */
578-
if ((cfg->valid_tx_ant & ANT_A) &&
578+
if ((priv->hw_params.valid_tx_ant & ANT_A) &&
579579
(enhanced_txpower[element].chain_a_max > max_txpower_avg))
580580
max_txpower_avg = enhanced_txpower[element].chain_a_max;
581-
if ((cfg->valid_tx_ant & ANT_B) &&
581+
if ((priv->hw_params.valid_tx_ant & ANT_B) &&
582582
(enhanced_txpower[element].chain_b_max > max_txpower_avg))
583583
max_txpower_avg = enhanced_txpower[element].chain_b_max;
584-
if ((cfg->valid_tx_ant & ANT_C) &&
584+
if ((priv->hw_params.valid_tx_ant & ANT_C) &&
585585
(enhanced_txpower[element].chain_c_max > max_txpower_avg))
586586
max_txpower_avg = enhanced_txpower[element].chain_c_max;
587-
if (((cfg->valid_tx_ant == ANT_AB) |
588-
(cfg->valid_tx_ant == ANT_BC) |
589-
(cfg->valid_tx_ant == ANT_AC)) &&
587+
if (((priv->hw_params.valid_tx_ant == ANT_AB) |
588+
(priv->hw_params.valid_tx_ant == ANT_BC) |
589+
(priv->hw_params.valid_tx_ant == ANT_AC)) &&
590590
(enhanced_txpower[element].mimo2_max > max_txpower_avg))
591591
max_txpower_avg = enhanced_txpower[element].mimo2_max;
592-
if ((cfg->valid_tx_ant == ANT_ABC) &&
592+
if ((priv->hw_params.valid_tx_ant == ANT_ABC) &&
593593
(enhanced_txpower[element].mimo3_max > max_txpower_avg))
594594
max_txpower_avg = enhanced_txpower[element].mimo3_max;
595595

@@ -691,7 +691,7 @@ static void iwl_eeprom_enhanced_txpower(struct iwl_priv *priv)
691691
((txp->delta_20_in_40 & 0xf0) >> 4),
692692
(txp->delta_20_in_40 & 0x0f));
693693

694-
max_txp_avg = iwl_get_max_txpower_avg(priv->cfg, txp_array, idx,
694+
max_txp_avg = iwl_get_max_txpower_avg(priv, txp_array, idx,
695695
&max_txp_avg_halfdbm);
696696

697697
/*

‎drivers/net/wireless/iwlwifi/iwl-mac80211.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv,
199199
WIPHY_FLAG_DISABLE_BEACON_HINTS |
200200
WIPHY_FLAG_IBSS_RSN;
201201

202+
#ifdef CONFIG_PM_SLEEP
202203
if (priv->fw->img[IWL_UCODE_WOWLAN].sec[0].len &&
203204
priv->trans->ops->wowlan_suspend &&
204205
device_can_wakeup(priv->trans->dev)) {
@@ -217,6 +218,7 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv,
217218
hw->wiphy->wowlan.pattern_max_len =
218219
IWLAGN_WOWLAN_MAX_PATTERN_LEN;
219220
}
221+
#endif
220222

221223
if (iwlwifi_mod_params.power_save)
222224
hw->wiphy->flags |= WIPHY_FLAG_PS_ON_BY_DEFAULT;
@@ -249,6 +251,7 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv,
249251
ret = ieee80211_register_hw(priv->hw);
250252
if (ret) {
251253
IWL_ERR(priv, "Failed to register hw (error %d)\n", ret);
254+
iwl_leds_exit(priv);
252255
return ret;
253256
}
254257
priv->mac80211_registered = 1;

‎drivers/net/wireless/mac80211_hwsim.c‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1721,6 +1721,24 @@ static void hwsim_exit_netlink(void)
17211721
"unregister family %i\n", ret);
17221722
}
17231723

1724+
static const struct ieee80211_iface_limit hwsim_if_limits[] = {
1725+
{ .max = 1, .types = BIT(NL80211_IFTYPE_ADHOC) },
1726+
{ .max = 2048, .types = BIT(NL80211_IFTYPE_STATION) |
1727+
BIT(NL80211_IFTYPE_P2P_CLIENT) |
1728+
#ifdef CONFIG_MAC80211_MESH
1729+
BIT(NL80211_IFTYPE_MESH_POINT) |
1730+
#endif
1731+
BIT(NL80211_IFTYPE_AP) |
1732+
BIT(NL80211_IFTYPE_P2P_GO) },
1733+
};
1734+
1735+
static const struct ieee80211_iface_combination hwsim_if_comb = {
1736+
.limits = hwsim_if_limits,
1737+
.n_limits = ARRAY_SIZE(hwsim_if_limits),
1738+
.max_interfaces = 2048,
1739+
.num_different_channels = 1,
1740+
};
1741+
17241742
static int __init init_mac80211_hwsim(void)
17251743
{
17261744
int i, err = 0;
@@ -1782,6 +1800,9 @@ static int __init init_mac80211_hwsim(void)
17821800
hw->wiphy->n_addresses = 2;
17831801
hw->wiphy->addresses = data->addresses;
17841802

1803+
hw->wiphy->iface_combinations = &hwsim_if_comb;
1804+
hw->wiphy->n_iface_combinations = 1;
1805+
17851806
if (fake_hw_scan) {
17861807
hw->wiphy->max_scan_ssids = 255;
17871808
hw->wiphy->max_scan_ie_len = IEEE80211_MAX_DATA_LEN;

‎drivers/net/wireless/mwifiex/cfg80211.c‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -948,6 +948,19 @@ static int mwifiex_cfg80211_start_ap(struct wiphy *wiphy,
948948
bss_cfg->ssid.ssid_len = params->ssid_len;
949949
}
950950

951+
switch (params->hidden_ssid) {
952+
case NL80211_HIDDEN_SSID_NOT_IN_USE:
953+
bss_cfg->bcast_ssid_ctl = 1;
954+
break;
955+
case NL80211_HIDDEN_SSID_ZERO_LEN:
956+
bss_cfg->bcast_ssid_ctl = 0;
957+
break;
958+
case NL80211_HIDDEN_SSID_ZERO_CONTENTS:
959+
/* firmware doesn't support this type of hidden SSID */
960+
default:
961+
return -EINVAL;
962+
}
963+
951964
if (mwifiex_set_secure_params(priv, bss_cfg, params)) {
952965
kfree(bss_cfg);
953966
wiphy_err(wiphy, "Failed to parse secuirty parameters!\n");

‎drivers/net/wireless/mwifiex/fw.h‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ enum MWIFIEX_802_11_PRIVACY_FILTER {
122122
#define TLV_TYPE_CHANNELBANDLIST (PROPRIETARY_TLV_BASE_ID + 42)
123123
#define TLV_TYPE_UAP_BEACON_PERIOD (PROPRIETARY_TLV_BASE_ID + 44)
124124
#define TLV_TYPE_UAP_DTIM_PERIOD (PROPRIETARY_TLV_BASE_ID + 45)
125+
#define TLV_TYPE_UAP_BCAST_SSID (PROPRIETARY_TLV_BASE_ID + 48)
125126
#define TLV_TYPE_UAP_RTS_THRESHOLD (PROPRIETARY_TLV_BASE_ID + 51)
126127
#define TLV_TYPE_UAP_WPA_PASSPHRASE (PROPRIETARY_TLV_BASE_ID + 60)
127128
#define TLV_TYPE_UAP_ENCRY_PROTOCOL (PROPRIETARY_TLV_BASE_ID + 64)
@@ -1209,6 +1210,11 @@ struct host_cmd_tlv_ssid {
12091210
u8 ssid[0];
12101211
} __packed;
12111212

1213+
struct host_cmd_tlv_bcast_ssid {
1214+
struct host_cmd_tlv tlv;
1215+
u8 bcast_ctl;
1216+
} __packed;
1217+
12121218
struct host_cmd_tlv_beacon_period {
12131219
struct host_cmd_tlv tlv;
12141220
__le16 period;

‎drivers/net/wireless/mwifiex/uap_cmd.c‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ mwifiex_uap_bss_param_prepare(u8 *tlv, void *cmd_buf, u16 *param_size)
132132
struct host_cmd_tlv_dtim_period *dtim_period;
133133
struct host_cmd_tlv_beacon_period *beacon_period;
134134
struct host_cmd_tlv_ssid *ssid;
135+
struct host_cmd_tlv_bcast_ssid *bcast_ssid;
135136
struct host_cmd_tlv_channel_band *chan_band;
136137
struct host_cmd_tlv_frag_threshold *frag_threshold;
137138
struct host_cmd_tlv_rts_threshold *rts_threshold;
@@ -153,6 +154,14 @@ mwifiex_uap_bss_param_prepare(u8 *tlv, void *cmd_buf, u16 *param_size)
153154
cmd_size += sizeof(struct host_cmd_tlv) +
154155
bss_cfg->ssid.ssid_len;
155156
tlv += sizeof(struct host_cmd_tlv) + bss_cfg->ssid.ssid_len;
157+
158+
bcast_ssid = (struct host_cmd_tlv_bcast_ssid *)tlv;
159+
bcast_ssid->tlv.type = cpu_to_le16(TLV_TYPE_UAP_BCAST_SSID);
160+
bcast_ssid->tlv.len =
161+
cpu_to_le16(sizeof(bcast_ssid->bcast_ctl));
162+
bcast_ssid->bcast_ctl = bss_cfg->bcast_ssid_ctl;
163+
cmd_size += sizeof(struct host_cmd_tlv_bcast_ssid);
164+
tlv += sizeof(struct host_cmd_tlv_bcast_ssid);
156165
}
157166
if (bss_cfg->channel && bss_cfg->channel <= MAX_CHANNEL_BAND_BG) {
158167
chan_band = (struct host_cmd_tlv_channel_band *)tlv;
@@ -416,6 +425,7 @@ int mwifiex_uap_set_channel(struct mwifiex_private *priv, int channel)
416425
if (!bss_cfg)
417426
return -ENOMEM;
418427

428+
mwifiex_set_sys_config_invalid_data(bss_cfg);
419429
bss_cfg->band_cfg = BAND_CONFIG_MANUAL;
420430
bss_cfg->channel = channel;
421431

0 commit comments

Comments
 (0)