Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 64fc309e26 | |||
| cdb6bd07d3 | |||
| fc327b2ff6 | |||
| d95453c98e | |||
| 8cd10f487c | |||
| 093a5038b8 | |||
| 87a3d65960 |
+3
-3
@@ -829,19 +829,19 @@ int bes2600_queue_get_skb(struct bes2600_queue *queue, u32 packetID,
|
|||||||
bes2600_queue_parse_id(packetID, &queue_generation, &queue_id,
|
bes2600_queue_parse_id(packetID, &queue_generation, &queue_id,
|
||||||
&item_generation, &item_id, &if_id, &link_id);
|
&item_generation, &item_id, &if_id, &link_id);
|
||||||
|
|
||||||
spin_lock(&queue->stats->hw_priv->tx_loop.pending_record_lock);
|
spin_lock_bh(&queue->stats->hw_priv->tx_loop.pending_record_lock);
|
||||||
if (!list_empty(&queue->stats->hw_priv->tx_loop.pending_record_list)) {
|
if (!list_empty(&queue->stats->hw_priv->tx_loop.pending_record_list)) {
|
||||||
list_for_each_entry_safe(record_item, temp_record_item, &queue->stats->hw_priv->tx_loop.pending_record_list, head) {
|
list_for_each_entry_safe(record_item, temp_record_item, &queue->stats->hw_priv->tx_loop.pending_record_list, head) {
|
||||||
if (record_item->packetID == packetID) {
|
if (record_item->packetID == packetID) {
|
||||||
list_del(&record_item->head);
|
list_del(&record_item->head);
|
||||||
dev_kfree_skb(record_item->skb);
|
dev_kfree_skb(record_item->skb);
|
||||||
kfree(record_item);
|
kfree(record_item);
|
||||||
spin_unlock(&queue->stats->hw_priv->tx_loop.pending_record_lock);
|
spin_unlock_bh(&queue->stats->hw_priv->tx_loop.pending_record_lock);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
spin_unlock(&queue->stats->hw_priv->tx_loop.pending_record_lock);
|
spin_unlock_bh(&queue->stats->hw_priv->tx_loop.pending_record_lock);
|
||||||
|
|
||||||
item = &queue->pool[item_id];
|
item = &queue->pool[item_id];
|
||||||
|
|
||||||
|
|||||||
@@ -238,6 +238,36 @@ int bes2600_hw_scan(struct ieee80211_hw *hw,
|
|||||||
/* Scan when P2P_GO corrupt firmware MiniAP mode */
|
/* Scan when P2P_GO corrupt firmware MiniAP mode */
|
||||||
if (priv->join_status == BES2600_JOIN_STATUS_AP)
|
if (priv->join_status == BES2600_JOIN_STATUS_AP)
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Firmware refuses WSM start-scan for 5 GHz with status 2 ("rejected
|
||||||
|
* by policy"); see besser issue #1. mac80211 splits multi-band
|
||||||
|
* hw_scan requests per-band when the driver does not set
|
||||||
|
* IEEE80211_HW_SINGLE_SCAN_ON_ALL_BANDS (we don't -- see
|
||||||
|
* ieee80211_hw_set() calls in bes2600_main.c), so each per-band call
|
||||||
|
* has req->channels[] from one band only (see ieee80211_prep_hw_scan
|
||||||
|
* in net/mac80211/scan.c). Refuse the 5 GHz iteration at the driver
|
||||||
|
* boundary so userspace gets a clean aborted-scan for that portion
|
||||||
|
* rather than waiting for the firmware reject to cascade up.
|
||||||
|
*
|
||||||
|
* Only the multi-channel case is refused (n_channels > 1): that's
|
||||||
|
* the per-band-sweep pattern mac80211 issues internally and the
|
||||||
|
* one that triggers the firmware storm at the per-band loop
|
||||||
|
* boundary. Single-channel 5 GHz scans (BSS verification, NM's
|
||||||
|
* per-freq iteration when 802-11-wireless.band=a is set) pass
|
||||||
|
* through to firmware, which generally accepts them since the
|
||||||
|
* storm is the back-to-back per-band issue, not a blanket 5 GHz
|
||||||
|
* reject. This preserves 5 GHz association via the
|
||||||
|
* "wpa_supplicant iterates freq_list per channel" path.
|
||||||
|
*
|
||||||
|
* Contract: per include/net/mac80211.h struct ieee80211_ops.hw_scan
|
||||||
|
* documentation, a negative return aborts the scan without requiring
|
||||||
|
* ieee80211_scan_completed().
|
||||||
|
*/
|
||||||
|
if (req->n_channels > 1 &&
|
||||||
|
req->channels[0]->band == NL80211_BAND_5GHZ)
|
||||||
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if (work_pending(&priv->offchannel_work) ||
|
if (work_pending(&priv->offchannel_work) ||
|
||||||
(hw_priv->roc_if_id != -1)) {
|
(hw_priv->roc_if_id != -1)) {
|
||||||
|
|||||||
+42
-3
@@ -2209,9 +2209,10 @@ void bes2600_join_work(struct work_struct *work)
|
|||||||
struct wsm_template_frame probe_tmp = {
|
struct wsm_template_frame probe_tmp = {
|
||||||
.frame_type = WSM_FRAME_TYPE_PROBE_REQUEST,
|
.frame_type = WSM_FRAME_TYPE_PROBE_REQUEST,
|
||||||
};
|
};
|
||||||
/*struct wsm_reset reset = {
|
struct wsm_reset join_fail_reset = {
|
||||||
.reset_statistics = true,
|
.reset_statistics = false,
|
||||||
};*/
|
};
|
||||||
|
bool join_failed = false;
|
||||||
|
|
||||||
|
|
||||||
BUG_ON(queueId >= 4);
|
BUG_ON(queueId >= 4);
|
||||||
@@ -2390,6 +2391,33 @@ void bes2600_join_work(struct work_struct *work)
|
|||||||
#endif /*CONFIG_BES2600_TESTMODE*/
|
#endif /*CONFIG_BES2600_TESTMODE*/
|
||||||
cancel_delayed_work_sync(&priv->join_timeout);
|
cancel_delayed_work_sync(&priv->join_timeout);
|
||||||
bes2600_pwr_clear_busy_event(priv->hw_priv, BES_PWR_LOCK_ON_JOIN);
|
bes2600_pwr_clear_busy_event(priv->hw_priv, BES_PWR_LOCK_ON_JOIN);
|
||||||
|
/*
|
||||||
|
* Firmware rejected WSM_JOIN (wsm_join_confirm ret 1).
|
||||||
|
* Issue wsm_reset so the firmware returns to a clean
|
||||||
|
* IDLE state before the next association attempt.
|
||||||
|
*
|
||||||
|
* Without this reset the firmware sits in an
|
||||||
|
* intermediate post-reject state. A rapid second
|
||||||
|
* JOIN (e.g. wpa_supplicant retrying after the
|
||||||
|
* PREV_AUTH_NOT_VALID deauth that follows) hits an
|
||||||
|
* inconsistent firmware context, causing
|
||||||
|
* bes2600_sdio_read_rx_batch to return SDIO error
|
||||||
|
* which cascades into wifi_force_close.
|
||||||
|
*
|
||||||
|
* cw1200 ancestor (drivers/net/wireless/st/cw1200/
|
||||||
|
* sta.c:1339) queues unjoin_work on join failure for
|
||||||
|
* the same reason; bes2600_unjoin_work gates its
|
||||||
|
* wsm_reset on join_status != PASSIVE, so after a
|
||||||
|
* failed JOIN (join_status stays PASSIVE) that path
|
||||||
|
* never fires — call wsm_reset directly here instead.
|
||||||
|
*
|
||||||
|
* Contract: wsm_reset takes only wsm_cmd_lock; safe
|
||||||
|
* to call while conf_lock is held. wsm_oper_unlock
|
||||||
|
* was already called in wsm_join_confirm() before
|
||||||
|
* wsm_join() returned the error.
|
||||||
|
*/
|
||||||
|
WARN_ON(wsm_reset(hw_priv, &join_fail_reset, priv->if_id));
|
||||||
|
join_failed = true;
|
||||||
} else {
|
} else {
|
||||||
/* Upload keys */
|
/* Upload keys */
|
||||||
#ifdef CONFIG_BES2600_TESTMODE
|
#ifdef CONFIG_BES2600_TESTMODE
|
||||||
@@ -2414,7 +2442,18 @@ void bes2600_join_work(struct work_struct *work)
|
|||||||
up(&hw_priv->conf_lock);
|
up(&hw_priv->conf_lock);
|
||||||
if (bss)
|
if (bss)
|
||||||
cfg80211_put_bss(hw_priv->hw->wiphy, bss);
|
cfg80211_put_bss(hw_priv->hw->wiphy, bss);
|
||||||
|
/*
|
||||||
|
* On join failure: queue unjoin_work so the next association
|
||||||
|
* attempt is serialised after any lingering cleanup, matching
|
||||||
|
* cw1200 sta.c:1344 "Tx lock still held, unjoin will clear it."
|
||||||
|
* If unjoin_work is already queued, release TX immediately.
|
||||||
|
*/
|
||||||
|
if (join_failed) {
|
||||||
|
if (queue_work(hw_priv->workqueue, &priv->unjoin_work) <= 0)
|
||||||
wsm_unlock_tx(hw_priv);
|
wsm_unlock_tx(hw_priv);
|
||||||
|
} else {
|
||||||
|
wsm_unlock_tx(hw_priv);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void bes2600_join_timeout(struct work_struct *work)
|
void bes2600_join_timeout(struct work_struct *work)
|
||||||
|
|||||||
+2
-2
@@ -109,9 +109,9 @@ void bes2600_tx_loop_set_enable(struct bes2600_common *hw_priv, bool need_warn)
|
|||||||
bes2600_queue_iterate_pending_packet(&hw_priv->tx_queue[i],
|
bes2600_queue_iterate_pending_packet(&hw_priv->tx_queue[i],
|
||||||
bes2600_tx_loop_item_pending_item);
|
bes2600_tx_loop_item_pending_item);
|
||||||
}
|
}
|
||||||
spin_lock(&hw_priv->tx_loop.pending_record_lock);
|
spin_lock_bh(&hw_priv->tx_loop.pending_record_lock);
|
||||||
bes2600_queue_iterate_record_pending_packet(hw_priv, bes2600_tx_loop_item_pending_item);
|
bes2600_queue_iterate_record_pending_packet(hw_priv, bes2600_tx_loop_item_pending_item);
|
||||||
spin_unlock(&hw_priv->tx_loop.pending_record_lock);
|
spin_unlock_bh(&hw_priv->tx_loop.pending_record_lock);
|
||||||
|
|
||||||
if (atomic_read(&hw_priv->bh_rx) > 0)
|
if (atomic_read(&hw_priv->bh_rx) > 0)
|
||||||
wake_up(&hw_priv->bh_wq);
|
wake_up(&hw_priv->bh_wq);
|
||||||
|
|||||||
Reference in New Issue
Block a user