sync bes2600/ to v7.0-danctnix1 baseline (rebasing reference)

This commit is contained in:
2026-05-19 09:04:33 +02:00
parent fe73571183
commit e0d752aae9
15 changed files with 1410 additions and 43 deletions
+29 -8
View File
@@ -42,6 +42,8 @@
#include "bes2600_factory.h"
#endif
#include "txrx_opt.h"
#define WEP_ENCRYPT_HDR_SIZE 4
#define WEP_ENCRYPT_TAIL_SIZE 4
#define WPA_ENCRYPT_HDR_SIZE 8
@@ -219,7 +221,7 @@ void bes2600_stop(struct ieee80211_hw *dev, bool suspend)
cancel_delayed_work_sync(&hw_priv->advance_scan_timeout);
#endif
flush_workqueue(hw_priv->workqueue);
del_timer_sync(&hw_priv->ba_timer);
timer_delete_sync(&hw_priv->ba_timer);
down(&hw_priv->conf_lock);
@@ -259,7 +261,7 @@ void bes2600_stop(struct ieee80211_hw *dev, bool suspend)
cancel_delayed_work_sync(&priv->bss_loss_work);
cancel_delayed_work_sync(&priv->connection_loss_work);
cancel_delayed_work_sync(&priv->link_id_gc_work);
del_timer_sync(&priv->mcast_timeout);
timer_delete_sync(&priv->mcast_timeout);
}
#ifdef WIFI_BT_COEXIST_EPTA_ENABLE
@@ -375,9 +377,23 @@ void bes2600_remove_interface(struct ieee80211_hw *dev,
atomic_set(&priv->enabled, 0);
down(&hw_priv->scan.lock);
down(&hw_priv->conf_lock);
if (!__cw12xx_hwpriv_to_vifpriv(hw_priv, priv->if_id)) {
/*
* There's a chance remove_interface will run again on the same
* (already removed) interface.
*
* Currently this only happens when NetworkManager creates a P2P_DEVICE
* alongside a STA.
*
* But there can be other cases where this may run as well. So if that
* happens, let's throw a warning and decrease the vifs count by one.
*/
if (WARN_ON(!__cw12xx_hwpriv_to_vifpriv(hw_priv, priv->if_id))) {
bes_devel(" !!! %s: interface addr %pM already removed\n",
__func__, vif->addr);
atomic_dec(&hw_priv->num_vifs);
up(&hw_priv->conf_lock);
up(&hw_priv->scan.lock);
return;
@@ -449,7 +465,7 @@ void bes2600_remove_interface(struct ieee80211_hw *dev,
cancel_delayed_work_sync(&priv->set_cts_work);
cancel_delayed_work_sync(&priv->pending_offchanneltx_work);
del_timer_sync(&priv->mcast_timeout);
timer_delete_sync(&priv->mcast_timeout);
/* TODO:COMBO: May be reset of these variables "delayed_link_loss and
* join_status to default can be removed as dev_priv will be freed by
* mac80211 */
@@ -502,7 +518,7 @@ int bes2600_change_interface(struct ieee80211_hw *dev,
return ret;
}
int bes2600_config(struct ieee80211_hw *dev, u32 changed)
int bes2600_config(struct ieee80211_hw *dev, int radio_idx, u32 changed)
{
int ret = 0;
struct bes2600_common *hw_priv = dev->priv;
@@ -1137,7 +1153,7 @@ void bes2600_wep_key_work(struct work_struct *work)
wsm_unlock_tx(hw_priv);
}
int bes2600_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
int bes2600_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, u32 value)
{
struct bes2600_common *hw_priv = hw->priv;
int ret;
@@ -2169,6 +2185,8 @@ void bes2600_join_work(struct work_struct *work)
wsm_unlock_tx(hw_priv);
return;
}
rcu_read_lock();
ssidie = ieee80211_bss_get_ie(bss, WLAN_EID_SSID);
dtimie = ieee80211_bss_get_ie(bss, WLAN_EID_TIM);
if (dtimie)
@@ -2252,6 +2270,8 @@ void bes2600_join_work(struct work_struct *work)
bes2600_rate_mask_to_wsm(hw_priv, 0xFF0);
}
rcu_read_unlock();
bes2600_pwr_set_busy_event(hw_priv, BES_PWR_LOCK_ON_JOIN);
wsm_flush_tx(hw_priv);
@@ -2358,7 +2378,7 @@ void bes2600_unjoin_work(struct work_struct *work)
int i;
struct bes2600_vif *tmp_priv;
del_timer_sync(&hw_priv->ba_timer);
timer_delete_sync(&hw_priv->ba_timer);
down(&hw_priv->conf_lock);
if (unlikely(atomic_read(&hw_priv->scan.in_progress)
|| atomic_read(&priv->connect_in_process))) {
@@ -2567,7 +2587,7 @@ void bes2600_ba_work(struct work_struct *work)
void bes2600_ba_timer(struct timer_list *t)
{
bool ba_ena;
struct bes2600_common *hw_priv = from_timer(hw_priv, t, ba_timer);
struct bes2600_common *hw_priv = timer_container_of(hw_priv, t, ba_timer);
spin_lock_bh(&hw_priv->ba_lock);
bes2600_debug_ba(hw_priv, hw_priv->ba_cnt, hw_priv->ba_acc,
@@ -2789,6 +2809,7 @@ void bes2600_dynamic_opt_txrx_work(struct work_struct *work)
if (priv != NULL && priv->join_status > BES2600_JOIN_STATUS_MONITOR) {
multivif_connected = true;
}
bes2600_txrx_opt_multivif_connected_handler(hw_priv, multivif_connected);
}