Commit 49fcf34a authored by David S. Miller's avatar David S. Miller

Merge tag 'wireless-2023-12-19' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless

Johannes Berg says:

====================
Just a couple of things:
 * debugfs fixes
 * rfkill fix in iwlwifi
 * remove mostly-not-working list
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 0ee2384a 0a3d898e
...@@ -4127,7 +4127,6 @@ M: Franky Lin <franky.lin@broadcom.com> ...@@ -4127,7 +4127,6 @@ M: Franky Lin <franky.lin@broadcom.com>
M: Hante Meuleman <hante.meuleman@broadcom.com> M: Hante Meuleman <hante.meuleman@broadcom.com>
L: linux-wireless@vger.kernel.org L: linux-wireless@vger.kernel.org
L: brcm80211-dev-list.pdl@broadcom.com L: brcm80211-dev-list.pdl@broadcom.com
L: SHA-cyfmac-dev-list@infineon.com
S: Supported S: Supported
F: drivers/net/wireless/broadcom/brcm80211/ F: drivers/net/wireless/broadcom/brcm80211/
......
...@@ -770,7 +770,7 @@ static inline void iwl_enable_rfkill_int(struct iwl_trans *trans) ...@@ -770,7 +770,7 @@ static inline void iwl_enable_rfkill_int(struct iwl_trans *trans)
} }
} }
void iwl_pcie_handle_rfkill_irq(struct iwl_trans *trans); void iwl_pcie_handle_rfkill_irq(struct iwl_trans *trans, bool from_irq);
static inline bool iwl_is_rfkill_set(struct iwl_trans *trans) static inline bool iwl_is_rfkill_set(struct iwl_trans *trans)
{ {
...@@ -817,7 +817,7 @@ static inline bool iwl_pcie_dbg_on(struct iwl_trans *trans) ...@@ -817,7 +817,7 @@ static inline bool iwl_pcie_dbg_on(struct iwl_trans *trans)
return (trans->dbg.dest_tlv || iwl_trans_dbg_ini_valid(trans)); return (trans->dbg.dest_tlv || iwl_trans_dbg_ini_valid(trans));
} }
void iwl_trans_pcie_rf_kill(struct iwl_trans *trans, bool state); void iwl_trans_pcie_rf_kill(struct iwl_trans *trans, bool state, bool from_irq);
void iwl_trans_pcie_dump_regs(struct iwl_trans *trans); void iwl_trans_pcie_dump_regs(struct iwl_trans *trans);
#ifdef CONFIG_IWLWIFI_DEBUGFS #ifdef CONFIG_IWLWIFI_DEBUGFS
......
...@@ -1783,7 +1783,7 @@ static u32 iwl_pcie_int_cause_ict(struct iwl_trans *trans) ...@@ -1783,7 +1783,7 @@ static u32 iwl_pcie_int_cause_ict(struct iwl_trans *trans)
return inta; return inta;
} }
void iwl_pcie_handle_rfkill_irq(struct iwl_trans *trans) void iwl_pcie_handle_rfkill_irq(struct iwl_trans *trans, bool from_irq)
{ {
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
struct isr_statistics *isr_stats = &trans_pcie->isr_stats; struct isr_statistics *isr_stats = &trans_pcie->isr_stats;
...@@ -1807,7 +1807,7 @@ void iwl_pcie_handle_rfkill_irq(struct iwl_trans *trans) ...@@ -1807,7 +1807,7 @@ void iwl_pcie_handle_rfkill_irq(struct iwl_trans *trans)
isr_stats->rfkill++; isr_stats->rfkill++;
if (prev != report) if (prev != report)
iwl_trans_pcie_rf_kill(trans, report); iwl_trans_pcie_rf_kill(trans, report, from_irq);
mutex_unlock(&trans_pcie->mutex); mutex_unlock(&trans_pcie->mutex);
if (hw_rfkill) { if (hw_rfkill) {
...@@ -1947,7 +1947,7 @@ irqreturn_t iwl_pcie_irq_handler(int irq, void *dev_id) ...@@ -1947,7 +1947,7 @@ irqreturn_t iwl_pcie_irq_handler(int irq, void *dev_id)
/* HW RF KILL switch toggled */ /* HW RF KILL switch toggled */
if (inta & CSR_INT_BIT_RF_KILL) { if (inta & CSR_INT_BIT_RF_KILL) {
iwl_pcie_handle_rfkill_irq(trans); iwl_pcie_handle_rfkill_irq(trans, true);
handled |= CSR_INT_BIT_RF_KILL; handled |= CSR_INT_BIT_RF_KILL;
} }
...@@ -2370,7 +2370,7 @@ irqreturn_t iwl_pcie_irq_msix_handler(int irq, void *dev_id) ...@@ -2370,7 +2370,7 @@ irqreturn_t iwl_pcie_irq_msix_handler(int irq, void *dev_id)
/* HW RF KILL switch toggled */ /* HW RF KILL switch toggled */
if (inta_hw & MSIX_HW_INT_CAUSES_REG_RF_KILL) if (inta_hw & MSIX_HW_INT_CAUSES_REG_RF_KILL)
iwl_pcie_handle_rfkill_irq(trans); iwl_pcie_handle_rfkill_irq(trans, true);
if (inta_hw & MSIX_HW_INT_CAUSES_REG_HW_ERR) { if (inta_hw & MSIX_HW_INT_CAUSES_REG_HW_ERR) {
IWL_ERR(trans, IWL_ERR(trans,
......
...@@ -1082,7 +1082,7 @@ bool iwl_pcie_check_hw_rf_kill(struct iwl_trans *trans) ...@@ -1082,7 +1082,7 @@ bool iwl_pcie_check_hw_rf_kill(struct iwl_trans *trans)
report = test_bit(STATUS_RFKILL_OPMODE, &trans->status); report = test_bit(STATUS_RFKILL_OPMODE, &trans->status);
if (prev != report) if (prev != report)
iwl_trans_pcie_rf_kill(trans, report); iwl_trans_pcie_rf_kill(trans, report, false);
return hw_rfkill; return hw_rfkill;
} }
...@@ -1237,7 +1237,7 @@ static void iwl_pcie_init_msix(struct iwl_trans_pcie *trans_pcie) ...@@ -1237,7 +1237,7 @@ static void iwl_pcie_init_msix(struct iwl_trans_pcie *trans_pcie)
trans_pcie->hw_mask = trans_pcie->hw_init_mask; trans_pcie->hw_mask = trans_pcie->hw_init_mask;
} }
static void _iwl_trans_pcie_stop_device(struct iwl_trans *trans) static void _iwl_trans_pcie_stop_device(struct iwl_trans *trans, bool from_irq)
{ {
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
...@@ -1264,6 +1264,7 @@ static void _iwl_trans_pcie_stop_device(struct iwl_trans *trans) ...@@ -1264,6 +1264,7 @@ static void _iwl_trans_pcie_stop_device(struct iwl_trans *trans)
if (test_and_clear_bit(STATUS_DEVICE_ENABLED, &trans->status)) { if (test_and_clear_bit(STATUS_DEVICE_ENABLED, &trans->status)) {
IWL_DEBUG_INFO(trans, IWL_DEBUG_INFO(trans,
"DEVICE_ENABLED bit was set and is now cleared\n"); "DEVICE_ENABLED bit was set and is now cleared\n");
if (!from_irq)
iwl_pcie_synchronize_irqs(trans); iwl_pcie_synchronize_irqs(trans);
iwl_pcie_rx_napi_sync(trans); iwl_pcie_rx_napi_sync(trans);
iwl_pcie_tx_stop(trans); iwl_pcie_tx_stop(trans);
...@@ -1454,7 +1455,7 @@ void iwl_trans_pcie_handle_stop_rfkill(struct iwl_trans *trans, ...@@ -1454,7 +1455,7 @@ void iwl_trans_pcie_handle_stop_rfkill(struct iwl_trans *trans,
clear_bit(STATUS_RFKILL_OPMODE, &trans->status); clear_bit(STATUS_RFKILL_OPMODE, &trans->status);
} }
if (hw_rfkill != was_in_rfkill) if (hw_rfkill != was_in_rfkill)
iwl_trans_pcie_rf_kill(trans, hw_rfkill); iwl_trans_pcie_rf_kill(trans, hw_rfkill, false);
} }
static void iwl_trans_pcie_stop_device(struct iwl_trans *trans) static void iwl_trans_pcie_stop_device(struct iwl_trans *trans)
...@@ -1469,12 +1470,12 @@ static void iwl_trans_pcie_stop_device(struct iwl_trans *trans) ...@@ -1469,12 +1470,12 @@ static void iwl_trans_pcie_stop_device(struct iwl_trans *trans)
mutex_lock(&trans_pcie->mutex); mutex_lock(&trans_pcie->mutex);
trans_pcie->opmode_down = true; trans_pcie->opmode_down = true;
was_in_rfkill = test_bit(STATUS_RFKILL_OPMODE, &trans->status); was_in_rfkill = test_bit(STATUS_RFKILL_OPMODE, &trans->status);
_iwl_trans_pcie_stop_device(trans); _iwl_trans_pcie_stop_device(trans, false);
iwl_trans_pcie_handle_stop_rfkill(trans, was_in_rfkill); iwl_trans_pcie_handle_stop_rfkill(trans, was_in_rfkill);
mutex_unlock(&trans_pcie->mutex); mutex_unlock(&trans_pcie->mutex);
} }
void iwl_trans_pcie_rf_kill(struct iwl_trans *trans, bool state) void iwl_trans_pcie_rf_kill(struct iwl_trans *trans, bool state, bool from_irq)
{ {
struct iwl_trans_pcie __maybe_unused *trans_pcie = struct iwl_trans_pcie __maybe_unused *trans_pcie =
IWL_TRANS_GET_PCIE_TRANS(trans); IWL_TRANS_GET_PCIE_TRANS(trans);
...@@ -1487,7 +1488,7 @@ void iwl_trans_pcie_rf_kill(struct iwl_trans *trans, bool state) ...@@ -1487,7 +1488,7 @@ void iwl_trans_pcie_rf_kill(struct iwl_trans *trans, bool state)
if (trans->trans_cfg->gen2) if (trans->trans_cfg->gen2)
_iwl_trans_pcie_gen2_stop_device(trans); _iwl_trans_pcie_gen2_stop_device(trans);
else else
_iwl_trans_pcie_stop_device(trans); _iwl_trans_pcie_stop_device(trans, from_irq);
} }
} }
...@@ -2887,7 +2888,7 @@ static ssize_t iwl_dbgfs_rfkill_write(struct file *file, ...@@ -2887,7 +2888,7 @@ static ssize_t iwl_dbgfs_rfkill_write(struct file *file,
IWL_WARN(trans, "changing debug rfkill %d->%d\n", IWL_WARN(trans, "changing debug rfkill %d->%d\n",
trans_pcie->debug_rfkill, new_value); trans_pcie->debug_rfkill, new_value);
trans_pcie->debug_rfkill = new_value; trans_pcie->debug_rfkill = new_value;
iwl_pcie_handle_rfkill_irq(trans); iwl_pcie_handle_rfkill_irq(trans, false);
return count; return count;
} }
......
...@@ -1043,9 +1043,12 @@ void ieee80211_debugfs_recreate_netdev(struct ieee80211_sub_if_data *sdata, ...@@ -1043,9 +1043,12 @@ void ieee80211_debugfs_recreate_netdev(struct ieee80211_sub_if_data *sdata,
{ {
ieee80211_debugfs_remove_netdev(sdata); ieee80211_debugfs_remove_netdev(sdata);
ieee80211_debugfs_add_netdev(sdata, mld_vif); ieee80211_debugfs_add_netdev(sdata, mld_vif);
if (sdata->flags & IEEE80211_SDATA_IN_DRIVER) {
drv_vif_add_debugfs(sdata->local, sdata); drv_vif_add_debugfs(sdata->local, sdata);
if (!mld_vif) if (!mld_vif)
ieee80211_link_debugfs_drv_add(&sdata->deflink); ieee80211_link_debugfs_drv_add(&sdata->deflink);
}
} }
void ieee80211_link_debugfs_add(struct ieee80211_link_data *link) void ieee80211_link_debugfs_add(struct ieee80211_link_data *link)
......
...@@ -75,9 +75,9 @@ int drv_add_interface(struct ieee80211_local *local, ...@@ -75,9 +75,9 @@ int drv_add_interface(struct ieee80211_local *local,
if (ret) if (ret)
return ret; return ret;
if (!(sdata->flags & IEEE80211_SDATA_IN_DRIVER)) {
sdata->flags |= IEEE80211_SDATA_IN_DRIVER; sdata->flags |= IEEE80211_SDATA_IN_DRIVER;
if (!local->in_reconfig) {
drv_vif_add_debugfs(local, sdata); drv_vif_add_debugfs(local, sdata);
/* initially vif is not MLD */ /* initially vif is not MLD */
ieee80211_link_debugfs_drv_add(&sdata->deflink); ieee80211_link_debugfs_drv_add(&sdata->deflink);
...@@ -113,9 +113,13 @@ void drv_remove_interface(struct ieee80211_local *local, ...@@ -113,9 +113,13 @@ void drv_remove_interface(struct ieee80211_local *local,
if (!check_sdata_in_driver(sdata)) if (!check_sdata_in_driver(sdata))
return; return;
sdata->flags &= ~IEEE80211_SDATA_IN_DRIVER;
/* Remove driver debugfs entries */
ieee80211_debugfs_recreate_netdev(sdata, sdata->vif.valid_links);
trace_drv_remove_interface(local, sdata); trace_drv_remove_interface(local, sdata);
local->ops->remove_interface(&local->hw, &sdata->vif); local->ops->remove_interface(&local->hw, &sdata->vif);
sdata->flags &= ~IEEE80211_SDATA_IN_DRIVER;
trace_drv_return_void(local); trace_drv_return_void(local);
} }
...@@ -534,7 +538,7 @@ int drv_change_vif_links(struct ieee80211_local *local, ...@@ -534,7 +538,7 @@ int drv_change_vif_links(struct ieee80211_local *local,
if (ret) if (ret)
return ret; return ret;
if (!local->in_reconfig) { if (!local->in_reconfig && !local->resuming) {
for_each_set_bit(link_id, &links_to_add, for_each_set_bit(link_id, &links_to_add,
IEEE80211_MLD_MAX_NUM_LINKS) { IEEE80211_MLD_MAX_NUM_LINKS) {
link = rcu_access_pointer(sdata->link[link_id]); link = rcu_access_pointer(sdata->link[link_id]);
...@@ -590,7 +594,7 @@ int drv_change_sta_links(struct ieee80211_local *local, ...@@ -590,7 +594,7 @@ int drv_change_sta_links(struct ieee80211_local *local,
return ret; return ret;
/* during reconfig don't add it to debugfs again */ /* during reconfig don't add it to debugfs again */
if (local->in_reconfig) if (local->in_reconfig || local->resuming)
return 0; return 0;
for_each_set_bit(link_id, &links_to_add, IEEE80211_MLD_MAX_NUM_LINKS) { for_each_set_bit(link_id, &links_to_add, IEEE80211_MLD_MAX_NUM_LINKS) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment