Skip to content

Commit 6ae4ccf

Browse files
author
Kalle Valo
committed
* 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
2 parents be0b5e6 + 1f16ea2 commit 6ae4ccf

File tree

7 files changed

+41
-20
lines changed

7 files changed

+41
-20
lines changed

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)},

0 commit comments

Comments
 (0)