]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
QCA vendor interface to set the P2P mode configuration
authorVinay Gannevaram <quic_vganneva@quicinc.com>
Wed, 14 Aug 2024 15:41:53 +0000 (21:11 +0530)
committerJouni Malinen <j@w1.fi>
Tue, 27 Aug 2024 21:11:42 +0000 (00:11 +0300)
Add the QCA_NL80211_VENDOR_SUBCMD_SET_P2P_MODE for setting the P2P mode
in which the P2P Group Owner (GO) should be brought up. These modes
include Wi-Fi Direct R1 only, Wi-Fi Direct R2 only, and P2P Connection
Compatibility Mode, which supports both R1 and R2. These modes are
defined in the enum qca_wlan_vendor_p2p_mode.

Signed-off-by: Vinay Gannevaram <quic_vganneva@quicinc.com>
src/common/qca-vendor.h

index 6bee6e5657f38e8467e7662ecd259cca59162c67..38d76c6ccf154f0414336476b931a22ecdb7b8d5 100644 (file)
@@ -1282,6 +1282,12 @@ enum qca_radiotap_vendor_ids {
  *     vendor interfaces, driver internal logic, and BTM requests from the
  *     connected AP.
  *
+ * @QCA_NL80211_VENDOR_SUBCMD_SET_P2P_MODE: Vendor subcommand to configure
+ *     Wi-Fi Direct mode. This command sets the configuration through
+ *     the attributes defined in the enum qca_wlan_vendor_attr_set_p2p_mode.
+ *     It is applicable for P2P Group Owner only. This command is used before
+ *     starting the GO.
+ *
  *     The attributes used with this command are defined in
  *     enum qca_wlan_vendor_attr_connect_ext.
  */
@@ -1518,6 +1524,7 @@ enum qca_nl80211_vendor_subcmds {
        QCA_NL80211_VENDOR_SUBCMD_CLASSIFIED_FLOW_REPORT = 248,
        QCA_NL80211_VENDOR_SUBCMD_USD = 249,
        QCA_NL80211_VENDOR_SUBCMD_CONNECT_EXT = 250,
+       QCA_NL80211_VENDOR_SUBCMD_SET_P2P_MODE = 251,
 };
 
 /* Compatibility defines for previously used subcmd names.
@@ -18226,4 +18233,39 @@ enum qca_wlan_vendor_attr_connect_ext {
        QCA_WLAN_VENDOR_ATTR_CONNECT_EXT_AFTER_LAST - 1,
 };
 
+/**
+ * enum qca_wlan_vendor_p2p_mode - Defines the values used with
+ * %QCA_WLAN_VENDOR_ATTR_SET_P2P_MODE_CONFIG.
+ *
+ * @QCA_P2P_MODE_WFD_R1: Wi-Fi Direct R1 only.
+ * @QCA_P2P_MODE_WFD_R2: Wi-Fi Direct R2 only.
+ * @QCA_P2P_MODE_WFD_PCC: P2P Connection Compatibility Mode which supports both
+ * Wi-Fi Direct R1 and R2.
+ */
+enum qca_wlan_vendor_p2p_mode {
+       QCA_P2P_MODE_WFD_R1     = 0,
+       QCA_P2P_MODE_WFD_R2     = 1,
+       QCA_P2P_MODE_WFD_PCC    = 2,
+};
+
+/* enum qca_wlan_vendor_attr_set_p2p_mode: Attributes used by vendor command
+ * %QCA_NL80211_VENDOR_SUBCMD_SET_P2P_MODE.
+ *
+ * @QCA_WLAN_VENDOR_ATTR_SET_P2P_MODE_CONFIG: u8 attribute. Sets the P2P device
+ * mode. The values used are defined in enum qca_wlan_vendor_p2p_mode.
+ * This configuration is valid until the interface is brought up next time after
+ * this configuration and the driver shall use this configuration only when the
+ * interface is brought up in NL80211_IFTYPE_P2P_GO mode.
+ * When this parameter has not been set, the interface is brought up with
+ * Wi-Fi Direct R1 only configuration by default.
+ */
+enum qca_wlan_vendor_attr_set_p2p_mode {
+       QCA_WLAN_VENDOR_ATTR_SET_P2P_MODE_INVALID = 0,
+       QCA_WLAN_VENDOR_ATTR_SET_P2P_MODE_CONFIG = 1,
+
+       QCA_WLAN_VENDOR_ATTR_SET_P2P_MODE_AFTER_LAST,
+       QCA_WLAN_VENDOR_ATTR_SET_P2P_MODE_MAX =
+       QCA_WLAN_VENDOR_ATTR_SET_P2P_MODE_AFTER_LAST - 1,
+};
+
 #endif /* QCA_VENDOR_H */