Skip to content

Commit e43e505

Browse files
committed
Merge tag 'wireless-drivers-for-davem-2015-03-24' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers
iwlwifi: * avoid panic with lots of IBSS stations * Fix dvm's behavior after suspend resume * Allow to keep connection after CSA failure * Remove a noisy by harmless WARN_ON * New device IDs rtlwifi: * fix IOMMU mapping leak in AP mode brcmfmac: * disable MBSS feature for BCM43362 to get AP mode working again ath9k: * disable Transmit Power Control (TPC) again due to regressions * fix beaconing issue with AP+STA setup Signed-off-by: David S. Miller <[email protected]>
2 parents a6e95cc + 6ae4ccf commit e43e505

File tree

12 files changed

+68
-32
lines changed

12 files changed

+68
-32
lines changed

drivers/net/wireless/ath/ath9k/beacon.c

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,15 @@ void ath9k_beacon_remove_slot(struct ath_softc *sc, struct ieee80211_vif *vif)
219219
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
220220
struct ath_vif *avp = (void *)vif->drv_priv;
221221
struct ath_buf *bf = avp->av_bcbuf;
222+
struct ath_beacon_config *cur_conf = &sc->cur_chan->beacon;
222223

223224
ath_dbg(common, CONFIG, "Removing interface at beacon slot: %d\n",
224225
avp->av_bslot);
225226

226227
tasklet_disable(&sc->bcon_tasklet);
227228

229+
cur_conf->enable_beacon &= ~BIT(avp->av_bslot);
230+
228231
if (bf && bf->bf_mpdu) {
229232
struct sk_buff *skb = bf->bf_mpdu;
230233
dma_unmap_single(sc->dev, bf->bf_buf_addr,
@@ -521,8 +524,7 @@ static bool ath9k_allow_beacon_config(struct ath_softc *sc,
521524
}
522525

523526
if (sc->sc_ah->opmode == NL80211_IFTYPE_AP) {
524-
if ((vif->type != NL80211_IFTYPE_AP) ||
525-
(sc->nbcnvifs > 1)) {
527+
if (vif->type != NL80211_IFTYPE_AP) {
526528
ath_dbg(common, CONFIG,
527529
"An AP interface is already present !\n");
528530
return false;
@@ -616,12 +618,14 @@ void ath9k_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif,
616618
* enabling/disabling SWBA.
617619
*/
618620
if (changed & BSS_CHANGED_BEACON_ENABLED) {
619-
if (!bss_conf->enable_beacon &&
620-
(sc->nbcnvifs <= 1)) {
621-
cur_conf->enable_beacon = false;
622-
} else if (bss_conf->enable_beacon) {
623-
cur_conf->enable_beacon = true;
624-
ath9k_cache_beacon_config(sc, ctx, bss_conf);
621+
bool enabled = cur_conf->enable_beacon;
622+
623+
if (!bss_conf->enable_beacon) {
624+
cur_conf->enable_beacon &= ~BIT(avp->av_bslot);
625+
} else {
626+
cur_conf->enable_beacon |= BIT(avp->av_bslot);
627+
if (!enabled)
628+
ath9k_cache_beacon_config(sc, ctx, bss_conf);
625629
}
626630
}
627631

drivers/net/wireless/ath/ath9k/common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ struct ath_beacon_config {
5454
u16 dtim_period;
5555
u16 bmiss_timeout;
5656
u8 dtim_count;
57-
bool enable_beacon;
57+
u8 enable_beacon;
5858
bool ibss_creator;
5959
u32 nexttbtt;
6060
u32 intval;

drivers/net/wireless/ath/ath9k/hw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ static void ath9k_hw_init_defaults(struct ath_hw *ah)
424424
ah->power_mode = ATH9K_PM_UNDEFINED;
425425
ah->htc_reset_init = true;
426426

427-
ah->tpc_enabled = true;
427+
ah->tpc_enabled = false;
428428

429429
ah->ani_function = ATH9K_ANI_ALL;
430430
if (!AR_SREV_9300_20_OR_LATER(ah))

drivers/net/wireless/brcm80211/brcmfmac/feature.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ void brcmf_feat_attach(struct brcmf_pub *drvr)
126126
brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_MCHAN, "mchan");
127127
if (drvr->bus_if->wowl_supported)
128128
brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_WOWL, "wowl");
129-
brcmf_feat_iovar_int_set(ifp, BRCMF_FEAT_MBSS, "mbss", 0);
129+
if (drvr->bus_if->chip != BRCM_CC_43362_CHIP_ID)
130+
brcmf_feat_iovar_int_set(ifp, BRCMF_FEAT_MBSS, "mbss", 0);
130131

131132
/* set chip related quirks */
132133
switch (drvr->bus_if->chip) {

drivers/net/wireless/iwlwifi/dvm/dev.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,6 @@ struct iwl_priv {
708708
unsigned long reload_jiffies;
709709
int reload_count;
710710
bool ucode_loaded;
711-
bool init_ucode_run; /* Don't run init uCode again */
712711

713712
u8 plcp_delta_threshold;
714713

drivers/net/wireless/iwlwifi/dvm/mac80211.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,16 +1114,17 @@ static void iwlagn_mac_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
11141114
scd_queues &= ~(BIT(IWL_IPAN_CMD_QUEUE_NUM) |
11151115
BIT(IWL_DEFAULT_CMD_QUEUE_NUM));
11161116

1117-
if (vif)
1118-
scd_queues &= ~BIT(vif->hw_queue[IEEE80211_AC_VO]);
1119-
1120-
IWL_DEBUG_TX_QUEUES(priv, "Flushing SCD queues: 0x%x\n", scd_queues);
1121-
if (iwlagn_txfifo_flush(priv, scd_queues)) {
1122-
IWL_ERR(priv, "flush request fail\n");
1123-
goto done;
1117+
if (drop) {
1118+
IWL_DEBUG_TX_QUEUES(priv, "Flushing SCD queues: 0x%x\n",
1119+
scd_queues);
1120+
if (iwlagn_txfifo_flush(priv, scd_queues)) {
1121+
IWL_ERR(priv, "flush request fail\n");
1122+
goto done;
1123+
}
11241124
}
1125+
11251126
IWL_DEBUG_TX_QUEUES(priv, "wait transmit/flush all frames\n");
1126-
iwl_trans_wait_tx_queue_empty(priv->trans, 0xffffffff);
1127+
iwl_trans_wait_tx_queue_empty(priv->trans, scd_queues);
11271128
done:
11281129
mutex_unlock(&priv->mutex);
11291130
IWL_DEBUG_MAC80211(priv, "leave\n");

drivers/net/wireless/iwlwifi/dvm/ucode.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -418,9 +418,6 @@ int iwl_run_init_ucode(struct iwl_priv *priv)
418418
if (!priv->fw->img[IWL_UCODE_INIT].sec[0].len)
419419
return 0;
420420

421-
if (priv->init_ucode_run)
422-
return 0;
423-
424421
iwl_init_notification_wait(&priv->notif_wait, &calib_wait,
425422
calib_complete, ARRAY_SIZE(calib_complete),
426423
iwlagn_wait_calib, priv);
@@ -440,8 +437,6 @@ int iwl_run_init_ucode(struct iwl_priv *priv)
440437
*/
441438
ret = iwl_wait_notification(&priv->notif_wait, &calib_wait,
442439
UCODE_CALIB_TIMEOUT);
443-
if (!ret)
444-
priv->init_ucode_run = true;
445440

446441
goto out;
447442

drivers/net/wireless/iwlwifi/mvm/rs.c

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,6 +1278,9 @@ static void rs_mac80211_tx_status(void *mvm_r,
12781278
struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode);
12791279
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
12801280

1281+
if (!iwl_mvm_sta_from_mac80211(sta)->vif)
1282+
return;
1283+
12811284
if (!ieee80211_is_data(hdr->frame_control) ||
12821285
info->flags & IEEE80211_TX_CTL_NO_ACK)
12831286
return;
@@ -2511,6 +2514,14 @@ static void rs_get_rate(void *mvm_r, struct ieee80211_sta *sta, void *mvm_sta,
25112514
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
25122515
struct iwl_lq_sta *lq_sta = mvm_sta;
25132516

2517+
if (sta && !iwl_mvm_sta_from_mac80211(sta)->vif) {
2518+
/* if vif isn't initialized mvm doesn't know about
2519+
* this station, so don't do anything with the it
2520+
*/
2521+
sta = NULL;
2522+
mvm_sta = NULL;
2523+
}
2524+
25142525
/* TODO: handle rate_idx_mask and rate_idx_mcs_mask */
25152526

25162527
/* Treat uninitialized rate scaling data same as non-existing. */
@@ -2827,6 +2838,9 @@ static void rs_rate_update(void *mvm_r,
28272838
(struct iwl_op_mode *)mvm_r;
28282839
struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode);
28292840

2841+
if (!iwl_mvm_sta_from_mac80211(sta)->vif)
2842+
return;
2843+
28302844
/* Stop any ongoing aggregations as rs starts off assuming no agg */
28312845
for (tid = 0; tid < IWL_MAX_TID_COUNT; tid++)
28322846
ieee80211_stop_tx_ba_session(sta, tid);
@@ -3587,9 +3601,15 @@ static ssize_t iwl_dbgfs_ss_force_write(struct iwl_lq_sta *lq_sta, char *buf,
35873601

35883602
MVM_DEBUGFS_READ_WRITE_FILE_OPS(ss_force, 32);
35893603

3590-
static void rs_add_debugfs(void *mvm, void *mvm_sta, struct dentry *dir)
3604+
static void rs_add_debugfs(void *mvm, void *priv_sta, struct dentry *dir)
35913605
{
3592-
struct iwl_lq_sta *lq_sta = mvm_sta;
3606+
struct iwl_lq_sta *lq_sta = priv_sta;
3607+
struct iwl_mvm_sta *mvmsta;
3608+
3609+
mvmsta = container_of(lq_sta, struct iwl_mvm_sta, lq_sta);
3610+
3611+
if (!mvmsta->vif)
3612+
return;
35933613

35943614
debugfs_create_file("rate_scale_table", S_IRUSR | S_IWUSR, dir,
35953615
lq_sta, &rs_sta_dbgfs_scale_table_ops);

drivers/net/wireless/iwlwifi/mvm/time-event.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ iwl_mvm_te_handle_notify_csa(struct iwl_mvm *mvm,
197197
struct iwl_time_event_notif *notif)
198198
{
199199
if (!le32_to_cpu(notif->status)) {
200+
if (te_data->vif->type == NL80211_IFTYPE_STATION)
201+
ieee80211_connection_loss(te_data->vif);
200202
IWL_DEBUG_TE(mvm, "CSA time event failed to start\n");
201203
iwl_mvm_te_clear_data(mvm, te_data);
202204
return;

drivers/net/wireless/iwlwifi/mvm/tx.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -949,8 +949,10 @@ int iwl_mvm_rx_ba_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb,
949949
mvmsta = iwl_mvm_sta_from_mac80211(sta);
950950
tid_data = &mvmsta->tid_data[tid];
951951

952-
if (WARN_ONCE(tid_data->txq_id != scd_flow, "Q %d, tid %d, flow %d",
953-
tid_data->txq_id, tid, scd_flow)) {
952+
if (tid_data->txq_id != scd_flow) {
953+
IWL_ERR(mvm,
954+
"invalid BA notification: Q %d, tid %d, flow %d\n",
955+
tid_data->txq_id, tid, scd_flow);
954956
rcu_read_unlock();
955957
return 0;
956958
}

drivers/net/wireless/iwlwifi/pcie/drv.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,10 +368,12 @@ static const struct pci_device_id iwl_hw_card_ids[] = {
368368
/* 3165 Series */
369369
{IWL_PCI_DEVICE(0x3165, 0x4010, iwl3165_2ac_cfg)},
370370
{IWL_PCI_DEVICE(0x3165, 0x4012, iwl3165_2ac_cfg)},
371-
{IWL_PCI_DEVICE(0x3165, 0x4110, iwl3165_2ac_cfg)},
372-
{IWL_PCI_DEVICE(0x3165, 0x4210, iwl3165_2ac_cfg)},
373371
{IWL_PCI_DEVICE(0x3165, 0x4410, iwl3165_2ac_cfg)},
374372
{IWL_PCI_DEVICE(0x3165, 0x4510, iwl3165_2ac_cfg)},
373+
{IWL_PCI_DEVICE(0x3165, 0x4110, iwl3165_2ac_cfg)},
374+
{IWL_PCI_DEVICE(0x3166, 0x4310, iwl3165_2ac_cfg)},
375+
{IWL_PCI_DEVICE(0x3166, 0x4210, iwl3165_2ac_cfg)},
376+
{IWL_PCI_DEVICE(0x3165, 0x8010, iwl3165_2ac_cfg)},
375377

376378
/* 7265 Series */
377379
{IWL_PCI_DEVICE(0x095A, 0x5010, iwl7265_2ac_cfg)},

drivers/net/wireless/rtlwifi/pci.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1124,12 +1124,22 @@ static void _rtl_pci_prepare_bcn_tasklet(struct ieee80211_hw *hw)
11241124
/*This is for new trx flow*/
11251125
struct rtl_tx_buffer_desc *pbuffer_desc = NULL;
11261126
u8 temp_one = 1;
1127+
u8 *entry;
11271128

11281129
memset(&tcb_desc, 0, sizeof(struct rtl_tcb_desc));
11291130
ring = &rtlpci->tx_ring[BEACON_QUEUE];
11301131
pskb = __skb_dequeue(&ring->queue);
1131-
if (pskb)
1132+
if (rtlpriv->use_new_trx_flow)
1133+
entry = (u8 *)(&ring->buffer_desc[ring->idx]);
1134+
else
1135+
entry = (u8 *)(&ring->desc[ring->idx]);
1136+
if (pskb) {
1137+
pci_unmap_single(rtlpci->pdev,
1138+
rtlpriv->cfg->ops->get_desc(
1139+
(u8 *)entry, true, HW_DESC_TXBUFF_ADDR),
1140+
pskb->len, PCI_DMA_TODEVICE);
11321141
kfree_skb(pskb);
1142+
}
11331143

11341144
/*NB: the beacon data buffer must be 32-bit aligned. */
11351145
pskb = ieee80211_beacon_get(hw, mac->vif);

0 commit comments

Comments
 (0)