mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt792x: enable CNM ops for MT7927
Enable CNM support for MT7927 so mac80211 keeps remain-on-channel callbacks available. MT7927 needs them at runtime even when the capability is not advertised through the normal firmware feature path. Co-developed-by: Javier Tia <[email protected]> Signed-off-by: Javier Tia <[email protected]> Signed-off-by: Sean Wang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -758,6 +758,13 @@ out:
|
||||
return offload_caps;
|
||||
}
|
||||
|
||||
static bool mt792x_needs_cnm_runtime(const void *drv_data)
|
||||
{
|
||||
const char *fw_wm = drv_data;
|
||||
|
||||
return fw_wm && !strcmp(fw_wm, MT7927_FIRMWARE_WM);
|
||||
}
|
||||
|
||||
struct ieee80211_ops *
|
||||
mt792x_get_mac80211_ops(struct device *dev,
|
||||
const struct ieee80211_ops *mac80211_ops,
|
||||
@@ -771,6 +778,10 @@ mt792x_get_mac80211_ops(struct device *dev,
|
||||
return NULL;
|
||||
|
||||
*fw_features = mt792x_get_offload_capability(dev, drv_data);
|
||||
|
||||
if (mt792x_needs_cnm_runtime(drv_data))
|
||||
*fw_features |= MT792x_FW_CAP_CNM;
|
||||
|
||||
if (!(*fw_features & MT792x_FW_CAP_CNM)) {
|
||||
ops->remain_on_channel = NULL;
|
||||
ops->cancel_remain_on_channel = NULL;
|
||||
|
||||
Reference in New Issue
Block a user