mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 11:03:43 +02:00
wifi: rsi_91x_usb: do not pause rfkill polling when stopping mac80211
Removing rsi_91x USB adapter could cause rtnetlink to lock up. When rsi_mac80211_stop is called, wiphy_lock is locked. Call to wiphy_rfkill_stop_polling would wait until the work queue has finished, but because the work queue waits for wiphy_lock, that would never happen. Moving the call to rsi_disconnect avoids the lock up. Signed-off-by: Ville Nummela <ville.nummela@kempower.com> Link: https://patch.msgid.link/20260318081912.87744-1-ville.nummela@kempower.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
eb092b188f
commit
777d8ba5aa
|
|
@ -325,6 +325,22 @@ void rsi_mac80211_detach(struct rsi_hw *adapter)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(rsi_mac80211_detach);
|
||||
|
||||
/**
|
||||
* rsi_mac80211_rfkill_exit() - This function is used to stop rfkill polling
|
||||
* when the device is removed.
|
||||
* @adapter: Pointer to the adapter structure.
|
||||
*
|
||||
* Return: None.
|
||||
*/
|
||||
void rsi_mac80211_rfkill_exit(struct rsi_hw *adapter)
|
||||
{
|
||||
struct ieee80211_hw *hw = adapter->hw;
|
||||
|
||||
if (hw)
|
||||
wiphy_rfkill_stop_polling(hw->wiphy);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rsi_mac80211_rfkill_exit);
|
||||
|
||||
/**
|
||||
* rsi_indicate_tx_status() - This function indicates the transmit status.
|
||||
* @adapter: Pointer to the adapter structure.
|
||||
|
|
@ -422,7 +438,6 @@ static void rsi_mac80211_stop(struct ieee80211_hw *hw, bool suspend)
|
|||
rsi_dbg(ERR_ZONE, "===> Interface DOWN <===\n");
|
||||
mutex_lock(&common->mutex);
|
||||
common->iface_down = true;
|
||||
wiphy_rfkill_stop_polling(hw->wiphy);
|
||||
|
||||
/* Block all rx frames */
|
||||
rsi_send_rx_filter_frame(common, 0xffff);
|
||||
|
|
|
|||
|
|
@ -877,6 +877,8 @@ static void rsi_disconnect(struct usb_interface *pfunction)
|
|||
if (!adapter)
|
||||
return;
|
||||
|
||||
rsi_mac80211_rfkill_exit(adapter);
|
||||
|
||||
rsi_mac80211_detach(adapter);
|
||||
|
||||
if (IS_ENABLED(CONFIG_RSI_COEX) && adapter->priv->coex_mode > 1 &&
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ static inline int rsi_kill_thread(struct rsi_thread *handle)
|
|||
}
|
||||
|
||||
void rsi_mac80211_detach(struct rsi_hw *hw);
|
||||
void rsi_mac80211_rfkill_exit(struct rsi_hw *hw);
|
||||
u16 rsi_get_connected_channel(struct ieee80211_vif *vif);
|
||||
struct rsi_hw *rsi_91x_init(u16 oper_mode);
|
||||
void rsi_91x_deinit(struct rsi_hw *adapter);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user