mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 11:03:43 +02:00
wifi: iwlwifi: mld: move aux_sta member from iwl_mld_link to iwl_mld_vif
This change reflects the correct ownership of aux_sta, as it is not a property of the link but rather of the virtual interface. Updated the initialization, cleanup and access logic for the aux_sta member to align with its new location within iwl_mld_vif. Signed-off-by: Pagadala Yesu Anjaneyulu <pagadala.yesu.anjaneyulu@intel.com> Reviewed-by: Somashekhar Puttagangaiah <somashekhar.puttagangaiah@intel.com> Link: https://patch.msgid.link/20250509104454.2582160-12-miriam.rachel.korenblit@intel.com Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
This commit is contained in:
parent
db8c12f7c3
commit
35a29b14c8
|
|
@ -22,6 +22,9 @@ void iwl_mld_cleanup_vif(void *data, u8 *mac, struct ieee80211_vif *vif)
|
||||||
struct iwl_mld *mld = mld_vif->mld;
|
struct iwl_mld *mld = mld_vif->mld;
|
||||||
struct iwl_mld_link *link;
|
struct iwl_mld_link *link;
|
||||||
|
|
||||||
|
if (mld_vif->aux_sta.sta_id != IWL_INVALID_STA)
|
||||||
|
iwl_mld_free_internal_sta(mld, &mld_vif->aux_sta);
|
||||||
|
|
||||||
/* EMLSR is turned back on during recovery */
|
/* EMLSR is turned back on during recovery */
|
||||||
vif->driver_flags &= ~IEEE80211_VIF_EML_ACTIVE;
|
vif->driver_flags &= ~IEEE80211_VIF_EML_ACTIVE;
|
||||||
|
|
||||||
|
|
@ -408,6 +411,7 @@ iwl_mld_init_vif(struct iwl_mld *mld, struct ieee80211_vif *vif)
|
||||||
wiphy_delayed_work_init(&mld_vif->emlsr.tmp_non_bss_done_wk,
|
wiphy_delayed_work_init(&mld_vif->emlsr.tmp_non_bss_done_wk,
|
||||||
iwl_mld_emlsr_tmp_non_bss_done_wk);
|
iwl_mld_emlsr_tmp_non_bss_done_wk);
|
||||||
}
|
}
|
||||||
|
iwl_mld_init_internal_sta(&mld_vif->aux_sta);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -143,6 +143,7 @@ struct iwl_mld_emlsr {
|
||||||
* @dbgfs_slink: debugfs symlink for this interface
|
* @dbgfs_slink: debugfs symlink for this interface
|
||||||
* @roc_activity: the id of the roc_activity running. Relevant for p2p device
|
* @roc_activity: the id of the roc_activity running. Relevant for p2p device
|
||||||
* only. Set to %ROC_NUM_ACTIVITIES when not in use.
|
* only. Set to %ROC_NUM_ACTIVITIES when not in use.
|
||||||
|
* @aux_sta: station used for remain on channel. Used in P2P device.
|
||||||
*/
|
*/
|
||||||
struct iwl_mld_vif {
|
struct iwl_mld_vif {
|
||||||
/* Add here fields that need clean up on restart */
|
/* Add here fields that need clean up on restart */
|
||||||
|
|
@ -177,6 +178,7 @@ struct iwl_mld_vif {
|
||||||
struct dentry *dbgfs_slink;
|
struct dentry *dbgfs_slink;
|
||||||
#endif
|
#endif
|
||||||
enum iwl_roc_activity roc_activity;
|
enum iwl_roc_activity roc_activity;
|
||||||
|
struct iwl_mld_int_sta aux_sta;
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline struct iwl_mld_vif *
|
static inline struct iwl_mld_vif *
|
||||||
|
|
|
||||||
|
|
@ -782,7 +782,6 @@ iwl_mld_init_link(struct iwl_mld *mld, struct ieee80211_bss_conf *link,
|
||||||
|
|
||||||
iwl_mld_init_internal_sta(&mld_link->bcast_sta);
|
iwl_mld_init_internal_sta(&mld_link->bcast_sta);
|
||||||
iwl_mld_init_internal_sta(&mld_link->mcast_sta);
|
iwl_mld_init_internal_sta(&mld_link->mcast_sta);
|
||||||
iwl_mld_init_internal_sta(&mld_link->aux_sta);
|
|
||||||
iwl_mld_init_internal_sta(&mld_link->mon_sta);
|
iwl_mld_init_internal_sta(&mld_link->mon_sta);
|
||||||
|
|
||||||
if (!mld->fw_status.in_hw_restart)
|
if (!mld->fw_status.in_hw_restart)
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@ struct iwl_probe_resp_data {
|
||||||
* @vif: the vif this link belongs to
|
* @vif: the vif this link belongs to
|
||||||
* @bcast_sta: station used for broadcast packets. Used in AP, GO and IBSS.
|
* @bcast_sta: station used for broadcast packets. Used in AP, GO and IBSS.
|
||||||
* @mcast_sta: station used for multicast packets. Used in AP, GO and IBSS.
|
* @mcast_sta: station used for multicast packets. Used in AP, GO and IBSS.
|
||||||
* @aux_sta: station used for remain on channel. Used in P2P device.
|
|
||||||
* @mon_sta: station used for TX injection in monitor interface.
|
* @mon_sta: station used for TX injection in monitor interface.
|
||||||
* @link_id: over the air link ID
|
* @link_id: over the air link ID
|
||||||
* @ap_early_keys: The firmware cannot install keys before bcast/mcast STAs,
|
* @ap_early_keys: The firmware cannot install keys before bcast/mcast STAs,
|
||||||
|
|
@ -73,7 +72,6 @@ struct iwl_mld_link {
|
||||||
struct ieee80211_vif *vif;
|
struct ieee80211_vif *vif;
|
||||||
struct iwl_mld_int_sta bcast_sta;
|
struct iwl_mld_int_sta bcast_sta;
|
||||||
struct iwl_mld_int_sta mcast_sta;
|
struct iwl_mld_int_sta mcast_sta;
|
||||||
struct iwl_mld_int_sta aux_sta;
|
|
||||||
struct iwl_mld_int_sta mon_sta;
|
struct iwl_mld_int_sta mon_sta;
|
||||||
u8 link_id;
|
u8 link_id;
|
||||||
|
|
||||||
|
|
@ -107,8 +105,6 @@ iwl_mld_cleanup_link(struct iwl_mld *mld, struct iwl_mld_link *link)
|
||||||
iwl_mld_free_internal_sta(mld, &link->bcast_sta);
|
iwl_mld_free_internal_sta(mld, &link->bcast_sta);
|
||||||
if (link->mcast_sta.sta_id != IWL_INVALID_STA)
|
if (link->mcast_sta.sta_id != IWL_INVALID_STA)
|
||||||
iwl_mld_free_internal_sta(mld, &link->mcast_sta);
|
iwl_mld_free_internal_sta(mld, &link->mcast_sta);
|
||||||
if (link->aux_sta.sta_id != IWL_INVALID_STA)
|
|
||||||
iwl_mld_free_internal_sta(mld, &link->aux_sta);
|
|
||||||
if (link->mon_sta.sta_id != IWL_INVALID_STA)
|
if (link->mon_sta.sta_id != IWL_INVALID_STA)
|
||||||
iwl_mld_free_internal_sta(mld, &link->mon_sta);
|
iwl_mld_free_internal_sta(mld, &link->mon_sta);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ int iwl_mld_start_roc(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||||
{
|
{
|
||||||
struct iwl_mld *mld = IWL_MAC80211_GET_MLD(hw);
|
struct iwl_mld *mld = IWL_MAC80211_GET_MLD(hw);
|
||||||
struct iwl_mld_vif *mld_vif = iwl_mld_vif_from_mac80211(vif);
|
struct iwl_mld_vif *mld_vif = iwl_mld_vif_from_mac80211(vif);
|
||||||
struct iwl_mld_int_sta *aux_sta;
|
struct iwl_mld_int_sta *aux_sta = &mld_vif->aux_sta;
|
||||||
struct iwl_roc_req cmd = {
|
struct iwl_roc_req cmd = {
|
||||||
.action = cpu_to_le32(FW_CTXT_ACTION_ADD),
|
.action = cpu_to_le32(FW_CTXT_ACTION_ADD),
|
||||||
};
|
};
|
||||||
|
|
@ -79,9 +79,6 @@ int iwl_mld_start_roc(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||||
if (WARN_ON(mld_vif->roc_activity != ROC_NUM_ACTIVITIES))
|
if (WARN_ON(mld_vif->roc_activity != ROC_NUM_ACTIVITIES))
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
|
|
||||||
/* No MLO on P2P device */
|
|
||||||
aux_sta = &mld_vif->deflink.aux_sta;
|
|
||||||
|
|
||||||
ret = iwl_mld_add_aux_sta(mld, aux_sta);
|
ret = iwl_mld_add_aux_sta(mld, aux_sta);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
@ -136,9 +133,9 @@ static void iwl_mld_destroy_roc(struct iwl_mld *mld,
|
||||||
* we can flush the Tx on the queues
|
* we can flush the Tx on the queues
|
||||||
*/
|
*/
|
||||||
|
|
||||||
iwl_mld_flush_link_sta_txqs(mld, mld_vif->deflink.aux_sta.sta_id);
|
iwl_mld_flush_link_sta_txqs(mld, mld_vif->aux_sta.sta_id);
|
||||||
|
|
||||||
iwl_mld_remove_aux_sta(mld, vif, &vif->bss_conf);
|
iwl_mld_remove_aux_sta(mld, vif);
|
||||||
}
|
}
|
||||||
|
|
||||||
int iwl_mld_cancel_roc(struct ieee80211_hw *hw,
|
int iwl_mld_cancel_roc(struct ieee80211_hw *hw,
|
||||||
|
|
|
||||||
|
|
@ -1160,19 +1160,15 @@ void iwl_mld_remove_mcast_sta(struct iwl_mld *mld,
|
||||||
}
|
}
|
||||||
|
|
||||||
void iwl_mld_remove_aux_sta(struct iwl_mld *mld,
|
void iwl_mld_remove_aux_sta(struct iwl_mld *mld,
|
||||||
struct ieee80211_vif *vif,
|
struct ieee80211_vif *vif)
|
||||||
struct ieee80211_bss_conf *link)
|
|
||||||
{
|
{
|
||||||
struct iwl_mld_link *mld_link = iwl_mld_link_from_mac80211(link);
|
struct iwl_mld_vif *mld_vif = iwl_mld_vif_from_mac80211(vif);
|
||||||
|
|
||||||
if (WARN_ON(!mld_link))
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* TODO: Hotspot 2.0 */
|
/* TODO: Hotspot 2.0 */
|
||||||
if (WARN_ON(vif->type != NL80211_IFTYPE_P2P_DEVICE))
|
if (WARN_ON(vif->type != NL80211_IFTYPE_P2P_DEVICE))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
iwl_mld_remove_internal_sta(mld, &mld_link->aux_sta, false,
|
iwl_mld_remove_internal_sta(mld, &mld_vif->aux_sta, false,
|
||||||
IWL_MAX_TID_COUNT);
|
IWL_MAX_TID_COUNT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -260,8 +260,7 @@ void iwl_mld_remove_mcast_sta(struct iwl_mld *mld,
|
||||||
struct ieee80211_bss_conf *link);
|
struct ieee80211_bss_conf *link);
|
||||||
|
|
||||||
void iwl_mld_remove_aux_sta(struct iwl_mld *mld,
|
void iwl_mld_remove_aux_sta(struct iwl_mld *mld,
|
||||||
struct ieee80211_vif *vif,
|
struct ieee80211_vif *vif);
|
||||||
struct ieee80211_bss_conf *link);
|
|
||||||
|
|
||||||
void iwl_mld_remove_mon_sta(struct iwl_mld *mld,
|
void iwl_mld_remove_mon_sta(struct iwl_mld *mld,
|
||||||
struct ieee80211_vif *vif,
|
struct ieee80211_vif *vif,
|
||||||
|
|
|
||||||
|
|
@ -645,7 +645,7 @@ iwl_mld_get_tx_queue_id(struct iwl_mld *mld, struct ieee80211_txq *txq,
|
||||||
|
|
||||||
WARN_ON(!ieee80211_is_mgmt(fc));
|
WARN_ON(!ieee80211_is_mgmt(fc));
|
||||||
|
|
||||||
return mld_vif->deflink.aux_sta.queue_id;
|
return mld_vif->aux_sta.queue_id;
|
||||||
case NL80211_IFTYPE_MONITOR:
|
case NL80211_IFTYPE_MONITOR:
|
||||||
mld_vif = iwl_mld_vif_from_mac80211(info->control.vif);
|
mld_vif = iwl_mld_vif_from_mac80211(info->control.vif);
|
||||||
return mld_vif->deflink.mon_sta.queue_id;
|
return mld_vif->deflink.mon_sta.queue_id;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user