Commit 42884d2c authored by Avraham Stern's avatar Avraham Stern Committed by Johannes Berg

wifi: iwlwifi: mvm: allow UAPSD when in SCM

Allow UAPSD when P2P and BSS interfaces share the same channel.
Signed-off-by: default avatarAvraham Stern <avraham.stern@intel.com>
Reviewed-by: default avatarLuciano Coelho <luciano.coelho@intel.com>
Signed-off-by: default avatarMiri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240510170500.1ec19d432497.Id6de5337c878fa70e85bfcf6f4e0e34ce60756fb@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 7aea7180
...@@ -212,7 +212,7 @@ static void iwl_mvm_power_configure_uapsd(struct iwl_mvm *mvm, ...@@ -212,7 +212,7 @@ static void iwl_mvm_power_configure_uapsd(struct iwl_mvm *mvm,
} }
struct iwl_allow_uapsd_iface_iterator_data { struct iwl_allow_uapsd_iface_iterator_data {
struct ieee80211_vif *exclude_vif; struct ieee80211_vif *current_vif;
bool allow_uapsd; bool allow_uapsd;
}; };
...@@ -220,9 +220,12 @@ static void iwl_mvm_allow_uapsd_iterator(void *_data, u8 *mac, ...@@ -220,9 +220,12 @@ static void iwl_mvm_allow_uapsd_iterator(void *_data, u8 *mac,
struct ieee80211_vif *vif) struct ieee80211_vif *vif)
{ {
struct iwl_allow_uapsd_iface_iterator_data *data = _data; struct iwl_allow_uapsd_iface_iterator_data *data = _data;
struct iwl_mvm_vif *other_mvmvif = iwl_mvm_vif_from_mac80211(vif);
struct iwl_mvm_vif *curr_mvmvif =
iwl_mvm_vif_from_mac80211(data->current_vif);
/* exclude the given vif */ /* exclude the given vif */
if (vif == data->exclude_vif) if (vif == data->current_vif)
return; return;
switch (vif->type) { switch (vif->type) {
...@@ -232,7 +235,12 @@ static void iwl_mvm_allow_uapsd_iterator(void *_data, u8 *mac, ...@@ -232,7 +235,12 @@ static void iwl_mvm_allow_uapsd_iterator(void *_data, u8 *mac,
data->allow_uapsd = false; data->allow_uapsd = false;
break; break;
case NL80211_IFTYPE_STATION: case NL80211_IFTYPE_STATION:
if (vif->cfg.assoc) /* allow UAPSD if P2P interface and BSS station interface share
* the same channel.
*/
if (vif->cfg.assoc && other_mvmvif->deflink.phy_ctxt &&
curr_mvmvif->deflink.phy_ctxt &&
other_mvmvif->deflink.phy_ctxt->id != curr_mvmvif->deflink.phy_ctxt->id)
data->allow_uapsd = false; data->allow_uapsd = false;
break; break;
...@@ -246,7 +254,7 @@ static bool iwl_mvm_power_allow_uapsd(struct iwl_mvm *mvm, ...@@ -246,7 +254,7 @@ static bool iwl_mvm_power_allow_uapsd(struct iwl_mvm *mvm,
{ {
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
struct iwl_allow_uapsd_iface_iterator_data data = { struct iwl_allow_uapsd_iface_iterator_data data = {
.exclude_vif = vif, .current_vif = vif,
.allow_uapsd = true, .allow_uapsd = true,
}; };
......
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