Extend rtw89_vif_type_mapping()'s switch with RTW89_TYPE_MAPPING(P2P_DEVICE), same generic macro already used for ADHOC/MONITOR/MESH_POINT. Without this, a P2P-Device vif reaching this function (now possible after the previous commit advertised the mode) would fall through to the default: WARN_ON(1) case. RTW89_WIFI_ROLE_P2P_DEVICE already existed in enum rtw89_wifi_role before this change, and every existing consumer of wifi_role (chan.c, ps.c, phy.c, coex.c) already handles it correctly by falling through their "not STATION"/"not P2P_CLIENT" branches, since a P2P-Device role has no BSS/association state those checks assume for other roles. The BT-coexistence firmware command path (RTW89_SET_FWCMD_CXROLE_ROLE_P2P_DEV in fw.c, three call sites) already consumes this role generically via a role-bitmap built from rtw89_vif_type_mapping()'s output, so this one-line mapping is sufficient to make P2P-Device role signaling to firmware work with no further changes needed there. Part 2 of 2 for NL80211_IFTYPE_P2P_DEVICE support. Together with the previous commit, this is the full v1 diff per this project's Phase 2 design (see rtw89-p2p-device-project's PLAN.md/BUILD_LOG.md): a real, startable/stoppable P2P-Device wdev with working BT-coex signaling and remain_on_channel (already present on this chip/firmware, unaffected by this change). No start_p2p_device/stop_p2p_device driver ops are needed -- mac80211 core (net/mac80211/cfg.c) implements those generically and calls the ordinary add_interface/remove_interface ops, which require no vif->type-specific handling on this driver (confirmed by reading rtw89_ops_add_interface() in full). Signed-off-by: andres parra --- core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/core.c b/core.c index 5cf29bf..c8f12ef 100644 --- a/core.c +++ b/core.c @@ -5702,6 +5702,7 @@ void rtw89_vif_type_mapping(struct rtw89_vif_link *rtwvif_link, bool assoc) RTW89_TYPE_MAPPING(ADHOC); RTW89_TYPE_MAPPING(MONITOR); RTW89_TYPE_MAPPING(MESH_POINT); + RTW89_TYPE_MAPPING(P2P_DEVICE); default: WARN_ON(1); break; -- 2.55.0