]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ath10k: Support different txbf configuration schemes
authorVivek Natarajan <nataraja@qti.qualcomm.com>
Tue, 4 Aug 2015 05:15:11 +0000 (10:45 +0530)
committerKalle Valo <kvalo@qca.qualcomm.com>
Thu, 13 Aug 2015 11:21:10 +0000 (14:21 +0300)
qca61x4 uses the vdev param as a sole sufficient configuration
for txbf while qca99x0 enables txbf during peer assoc by
combining the vdev param value with peer assoc's vht capabilities

This patch gets the appropriate txbf configuration scheme
before passing the wmi command to enable the same in the firmware.

Signed-off-by: Vivek Natarajan <nataraja@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/mac.c
drivers/net/wireless/ath/ath10k/wmi-ops.h
drivers/net/wireless/ath/ath10k/wmi-tlv.c
drivers/net/wireless/ath/ath10k/wmi.c
drivers/net/wireless/ath/ath10k/wmi.h

index e0bbb6c543c78adaa465e15500ace5d4a937984f..1865e45d18c2f6a3c73dd1d1c296e8e28201e875 100644 (file)
@@ -2495,6 +2495,9 @@ static int ath10k_mac_vif_recalc_txbf(struct ath10k *ar,
        u32 param;
        u32 value;
 
+       if (ath10k_wmi_get_txbf_conf_scheme(ar) != WMI_TXBF_CONF_AFTER_ASSOC)
+               return 0;
+
        if (!(ar->vht_cap_info &
              (IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE |
               IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE |
index 47fe2e756becd4ebacabf199ee204f732413e378..2591018c4dc5e1d528b6550a6cc8141d9531f54a 100644 (file)
@@ -49,6 +49,7 @@ struct wmi_ops {
                            struct wmi_roam_ev_arg *arg);
        int (*pull_wow_event)(struct ath10k *ar, struct sk_buff *skb,
                              struct wmi_wow_ev_arg *arg);
+       enum wmi_txbf_conf (*get_txbf_conf_scheme)(struct ath10k *ar);
 
        struct sk_buff *(*gen_pdev_suspend)(struct ath10k *ar, u32 suspend_opt);
        struct sk_buff *(*gen_pdev_resume)(struct ath10k *ar);
@@ -319,6 +320,15 @@ ath10k_wmi_pull_wow_event(struct ath10k *ar, struct sk_buff *skb,
        return ar->wmi.ops->pull_wow_event(ar, skb, arg);
 }
 
+static inline enum wmi_txbf_conf
+ath10k_wmi_get_txbf_conf_scheme(struct ath10k *ar)
+{
+       if (!ar->wmi.ops->get_txbf_conf_scheme)
+               return WMI_TXBF_CONF_UNSUPPORTED;
+
+       return ar->wmi.ops->get_txbf_conf_scheme(ar);
+}
+
 static inline int
 ath10k_wmi_mgmt_tx(struct ath10k *ar, struct sk_buff *msdu)
 {
index 567b79720b6923e37dd3b468f12491aa510d90bd..357b5a292a892cb29592278120406a5e07396e44 100644 (file)
@@ -1279,6 +1279,11 @@ ath10k_wmi_tlv_op_gen_pdev_set_rd(struct ath10k *ar,
        return skb;
 }
 
+static enum wmi_txbf_conf ath10k_wmi_tlv_txbf_conf_scheme(struct ath10k *ar)
+{
+       return WMI_TXBF_CONF_AFTER_ASSOC;
+}
+
 static struct sk_buff *
 ath10k_wmi_tlv_op_gen_pdev_set_param(struct ath10k *ar, u32 param_id,
                                     u32 param_value)
@@ -3408,6 +3413,7 @@ static const struct wmi_ops wmi_tlv_ops = {
        .pull_fw_stats = ath10k_wmi_tlv_op_pull_fw_stats,
        .pull_roam_ev = ath10k_wmi_tlv_op_pull_roam_ev,
        .pull_wow_event = ath10k_wmi_tlv_op_pull_wow_ev,
+       .get_txbf_conf_scheme = ath10k_wmi_tlv_txbf_conf_scheme,
 
        .gen_pdev_suspend = ath10k_wmi_tlv_op_gen_pdev_suspend,
        .gen_pdev_resume = ath10k_wmi_tlv_op_gen_pdev_resume,
index e6d6b420ecea3a2566ff6bb8ac37649e93e61b55..36b8f7148b5162da910d0f1fc46c8133ceabe1f8 100644 (file)
@@ -3122,6 +3122,11 @@ static int ath10k_wmi_10_4_op_pull_swba_ev(struct ath10k *ar,
        return 0;
 }
 
+static enum wmi_txbf_conf ath10k_wmi_10_4_txbf_conf_scheme(struct ath10k *ar)
+{
+       return WMI_TXBF_CONF_BEFORE_ASSOC;
+}
+
 void ath10k_wmi_event_host_swba(struct ath10k *ar, struct sk_buff *skb)
 {
        struct wmi_swba_ev_arg arg = {};
@@ -6444,6 +6449,7 @@ static const struct wmi_ops wmi_10_4_ops = {
        .pull_swba = ath10k_wmi_10_4_op_pull_swba_ev,
        .pull_svc_rdy = ath10k_wmi_main_op_pull_svc_rdy_ev,
        .pull_rdy = ath10k_wmi_op_pull_rdy_ev,
+       .get_txbf_conf_scheme = ath10k_wmi_10_4_txbf_conf_scheme,
 
        .gen_pdev_suspend = ath10k_wmi_op_gen_pdev_suspend,
        .gen_pdev_resume = ath10k_wmi_op_gen_pdev_resume,
index 0d4efc9c5796432cec96bacf70c83a4f94d8e7dc..754cc33b387d3069f00fef11c38dcd227f11a8f8 100644 (file)
@@ -6008,6 +6008,12 @@ struct wmi_tdls_peer_capab_arg {
        u32 pref_offchan_bw;
 };
 
+enum wmi_txbf_conf {
+       WMI_TXBF_CONF_UNSUPPORTED,
+       WMI_TXBF_CONF_BEFORE_ASSOC,
+       WMI_TXBF_CONF_AFTER_ASSOC,
+};
+
 struct ath10k;
 struct ath10k_vif;
 struct ath10k_fw_stats_pdev;