mirror of
https://github.com/torvalds/linux.git
synced 2026-08-01 12:11:59 +02:00
wifi: mac80211_hwsim: switch to use TXQs
Simply immediately TX all available packets on the corresponding queue. This removes the HWSIM_TM_CMD_STOP_QUEUES/HWSIM_TM_CMD_RESUME_QUEUES feature for now. It should be reasonably simple to add it back if it is needed. Signed-off-by: Benjamin Berg <benjamin.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20260504101829.c590948c1e45.Id3e629770663c44de00faa3ff9bac9c6b87459c6@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
df0cb6e244
commit
efaadc1ae3
|
|
@ -2198,6 +2198,17 @@ static void mac80211_hwsim_tx(struct ieee80211_hw *hw,
|
|||
ieee80211_tx_status_irqsafe(hw, skb);
|
||||
}
|
||||
|
||||
static void ieee80211_hwsim_wake_tx_queue(struct ieee80211_hw *hw,
|
||||
struct ieee80211_txq *txq)
|
||||
{
|
||||
struct ieee80211_tx_control control = {
|
||||
.sta = txq->sta,
|
||||
};
|
||||
struct sk_buff *skb;
|
||||
|
||||
while ((skb = ieee80211_tx_dequeue(hw, txq)))
|
||||
mac80211_hwsim_tx(hw, &control, skb);
|
||||
}
|
||||
|
||||
static int mac80211_hwsim_start(struct ieee80211_hw *hw)
|
||||
{
|
||||
|
|
@ -2943,11 +2954,7 @@ static int mac80211_hwsim_testmode_cmd(struct ieee80211_hw *hw,
|
|||
goto nla_put_failure;
|
||||
return cfg80211_testmode_reply(skb);
|
||||
case HWSIM_TM_CMD_STOP_QUEUES:
|
||||
ieee80211_stop_queues(hw);
|
||||
return 0;
|
||||
case HWSIM_TM_CMD_WAKE_QUEUES:
|
||||
ieee80211_wake_queues(hw);
|
||||
return 0;
|
||||
default:
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
|
@ -4051,7 +4058,7 @@ static int mac80211_hwsim_set_radar_background(struct ieee80211_hw *hw,
|
|||
|
||||
#define HWSIM_COMMON_OPS \
|
||||
.tx = mac80211_hwsim_tx, \
|
||||
.wake_tx_queue = ieee80211_handle_wake_tx_queue, \
|
||||
.wake_tx_queue = ieee80211_hwsim_wake_tx_queue, \
|
||||
.start = mac80211_hwsim_start, \
|
||||
.stop = mac80211_hwsim_stop, \
|
||||
.add_interface = mac80211_hwsim_add_interface, \
|
||||
|
|
@ -5530,6 +5537,8 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
|
|||
ieee80211_hw_set(hw, TDLS_WIDER_BW);
|
||||
ieee80211_hw_set(hw, SUPPORTS_MULTI_BSSID);
|
||||
ieee80211_hw_set(hw, STRICT);
|
||||
ieee80211_hw_set(hw, BUFF_MMPDU_TXQ);
|
||||
ieee80211_hw_set(hw, STA_MMPDU_TXQ);
|
||||
|
||||
if (param->mlo) {
|
||||
hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_MLO;
|
||||
|
|
@ -5588,6 +5597,7 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
|
|||
hw->vif_data_size = sizeof(struct hwsim_vif_priv);
|
||||
hw->sta_data_size = sizeof(struct hwsim_sta_priv);
|
||||
hw->chanctx_data_size = sizeof(struct hwsim_chanctx_priv);
|
||||
hw->txq_data_size = 0;
|
||||
|
||||
memcpy(data->channels_2ghz, hwsim_channels_2ghz,
|
||||
sizeof(hwsim_channels_2ghz));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user