ath10k: Add wmi tlv vdev subtype for mesh in WCN3990
authorSurabhi Vishnoi <svishnoi@codeaurora.org>
Wed, 17 Apr 2019 08:31:45 +0000 (14:01 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 7 May 2019 14:01:20 +0000 (17:01 +0300)
There is a disparity in wmi and wmi tlv vdev subtype
enum for WMI_VDEV_SUBTYPE_MESH_11S.

Add different enum for wmi tlv vdev subtype to support
vdev of subtype mesh 11s for WCN3990.

Tested HW: WCN3990

Signed-off-by: Surabhi Vishnoi <svishnoi@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath10k/wmi-tlv.c
drivers/net/wireless/ath/ath10k/wmi-tlv.h

index 02709fc9903467044a0534ce23bd3737a870e2f7..34e187486c63d3ea02c75efd8b2afa88e85e6a7e 100644 (file)
@@ -1905,6 +1905,28 @@ ath10k_wmi_tlv_op_gen_stop_scan(struct ath10k *ar,
        return skb;
 }
 
+static int ath10k_wmi_tlv_op_get_vdev_subtype(struct ath10k *ar,
+                                             enum wmi_vdev_subtype subtype)
+{
+       switch (subtype) {
+       case WMI_VDEV_SUBTYPE_NONE:
+               return WMI_TLV_VDEV_SUBTYPE_NONE;
+       case WMI_VDEV_SUBTYPE_P2P_DEVICE:
+               return WMI_TLV_VDEV_SUBTYPE_P2P_DEV;
+       case WMI_VDEV_SUBTYPE_P2P_CLIENT:
+               return WMI_TLV_VDEV_SUBTYPE_P2P_CLI;
+       case WMI_VDEV_SUBTYPE_P2P_GO:
+               return WMI_TLV_VDEV_SUBTYPE_P2P_GO;
+       case WMI_VDEV_SUBTYPE_PROXY_STA:
+               return WMI_TLV_VDEV_SUBTYPE_PROXY_STA;
+       case WMI_VDEV_SUBTYPE_MESH_11S:
+               return WMI_TLV_VDEV_SUBTYPE_MESH_11S;
+       case WMI_VDEV_SUBTYPE_MESH_NON_11S:
+               return -ENOTSUPP;
+       }
+       return -ENOTSUPP;
+}
+
 static struct sk_buff *
 ath10k_wmi_tlv_op_gen_vdev_create(struct ath10k *ar,
                                  u32 vdev_id,
@@ -4307,7 +4329,7 @@ static const struct wmi_ops wmi_tlv_ops = {
        .gen_tdls_peer_update = ath10k_wmi_tlv_op_gen_tdls_peer_update,
        .gen_adaptive_qcs = ath10k_wmi_tlv_op_gen_adaptive_qcs,
        .fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill,
-       .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
+       .get_vdev_subtype = ath10k_wmi_tlv_op_get_vdev_subtype,
        .gen_echo = ath10k_wmi_tlv_op_gen_echo,
        .gen_vdev_spectral_conf = ath10k_wmi_tlv_op_gen_vdev_spectral_conf,
        .gen_vdev_spectral_enable = ath10k_wmi_tlv_op_gen_vdev_spectral_enable,
index 65e6aa520b069bd34c216f1dcd64333f8269ac46..55da01f8bb5b6c86c41897d747f2c98f6715d7be 100644 (file)
@@ -1775,6 +1775,16 @@ struct wmi_tlv_start_scan_cmd {
        struct wmi_mac_addr mac_mask;
 } __packed;
 
+enum wmi_tlv_vdev_subtype {
+       WMI_TLV_VDEV_SUBTYPE_NONE       = 0,
+       WMI_TLV_VDEV_SUBTYPE_P2P_DEV    = 1,
+       WMI_TLV_VDEV_SUBTYPE_P2P_CLI    = 2,
+       WMI_TLV_VDEV_SUBTYPE_P2P_GO     = 3,
+       WMI_TLV_VDEV_SUBTYPE_PROXY_STA  = 4,
+       WMI_TLV_VDEV_SUBTYPE_MESH       = 5,
+       WMI_TLV_VDEV_SUBTYPE_MESH_11S   = 6,
+};
+
 struct wmi_tlv_vdev_start_cmd {
        __le32 vdev_id;
        __le32 requestor_id;