aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2015-01-28 02:57:22 -0500
committerKalle Valo <kvalo@qca.qualcomm.com>2015-01-29 05:12:02 -0500
commit6d492fe2d81e84ee49382879bfc13213c6e8e569 (patch)
treee1e655a0148dfaaee972bb821e4fdc53918f4634 /drivers/net/wireless/ath
parent5e752e42f6773c8e4d360b35c72dc1ef73240583 (diff)
ath10k: implement per-vdev wmm param setup command
New wmi-tlv firmware for qca6174 supports this. This will be used soon. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r--drivers/net/wireless/ath/ath10k/wmi-ops.h17
-rw-r--r--drivers/net/wireless/ath/ath10k/wmi-tlv.c38
-rw-r--r--drivers/net/wireless/ath/ath10k/wmi-tlv.h4
-rw-r--r--drivers/net/wireless/ath/ath10k/wmi.c3
-rw-r--r--drivers/net/wireless/ath/ath10k/wmi.h1
5 files changed, 63 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/wmi-ops.h b/drivers/net/wireless/ath/ath10k/wmi-ops.h
index 6e9e38412b54..987414abc443 100644
--- a/drivers/net/wireless/ath/ath10k/wmi-ops.h
+++ b/drivers/net/wireless/ath/ath10k/wmi-ops.h
@@ -78,6 +78,8 @@ struct wmi_ops {
78 const struct wmi_vdev_spectral_conf_arg *arg); 78 const struct wmi_vdev_spectral_conf_arg *arg);
79 struct sk_buff *(*gen_vdev_spectral_enable)(struct ath10k *ar, u32 vdev_id, 79 struct sk_buff *(*gen_vdev_spectral_enable)(struct ath10k *ar, u32 vdev_id,
80 u32 trigger, u32 enable); 80 u32 trigger, u32 enable);
81 struct sk_buff *(*gen_vdev_wmm_conf)(struct ath10k *ar, u32 vdev_id,
82 const struct wmi_wmm_params_all_arg *arg);
81 struct sk_buff *(*gen_peer_create)(struct ath10k *ar, u32 vdev_id, 83 struct sk_buff *(*gen_peer_create)(struct ath10k *ar, u32 vdev_id,
82 const u8 peer_addr[ETH_ALEN]); 84 const u8 peer_addr[ETH_ALEN]);
83 struct sk_buff *(*gen_peer_delete)(struct ath10k *ar, u32 vdev_id, 85 struct sk_buff *(*gen_peer_delete)(struct ath10k *ar, u32 vdev_id,
@@ -601,6 +603,21 @@ ath10k_wmi_vdev_sta_uapsd(struct ath10k *ar, u32 vdev_id,
601} 603}
602 604
603static inline int 605static inline int
606ath10k_wmi_vdev_wmm_conf(struct ath10k *ar, u32 vdev_id,
607 const struct wmi_wmm_params_all_arg *arg)
608{
609 struct sk_buff *skb;
610 u32 cmd_id;
611
612 skb = ar->wmi.ops->gen_vdev_wmm_conf(ar, vdev_id, arg);
613 if (IS_ERR(skb))
614 return PTR_ERR(skb);
615
616 cmd_id = ar->wmi.cmd->vdev_set_wmm_params_cmdid;
617 return ath10k_wmi_cmd_send(ar, skb, cmd_id);
618}
619
620static inline int
604ath10k_wmi_peer_create(struct ath10k *ar, u32 vdev_id, 621ath10k_wmi_peer_create(struct ath10k *ar, u32 vdev_id,
605 const u8 peer_addr[ETH_ALEN]) 622 const u8 peer_addr[ETH_ALEN])
606{ 623{
diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
index 23a376124de3..00ca544bc94d 100644
--- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c
+++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
@@ -1600,6 +1600,42 @@ static void *ath10k_wmi_tlv_put_wmm(void *ptr,
1600} 1600}
1601 1601
1602static struct sk_buff * 1602static struct sk_buff *
1603ath10k_wmi_tlv_op_gen_vdev_wmm_conf(struct ath10k *ar, u32 vdev_id,
1604 const struct wmi_wmm_params_all_arg *arg)
1605{
1606 struct wmi_tlv_vdev_set_wmm_cmd *cmd;
1607 struct wmi_wmm_params *wmm;
1608 struct wmi_tlv *tlv;
1609 struct sk_buff *skb;
1610 size_t len;
1611 void *ptr;
1612
1613 len = (sizeof(*tlv) + sizeof(*cmd)) +
1614 (4 * (sizeof(*tlv) + sizeof(*wmm)));
1615 skb = ath10k_wmi_alloc_skb(ar, len);
1616 if (!skb)
1617 return ERR_PTR(-ENOMEM);
1618
1619 ptr = (void *)skb->data;
1620 tlv = ptr;
1621 tlv->tag = __cpu_to_le16(WMI_TLV_TAG_STRUCT_VDEV_SET_WMM_PARAMS_CMD);
1622 tlv->len = __cpu_to_le16(sizeof(*cmd));
1623 cmd = (void *)tlv->value;
1624 cmd->vdev_id = __cpu_to_le32(vdev_id);
1625
1626 ptr += sizeof(*tlv);
1627 ptr += sizeof(*cmd);
1628
1629 ptr = ath10k_wmi_tlv_put_wmm(ptr, &arg->ac_be);
1630 ptr = ath10k_wmi_tlv_put_wmm(ptr, &arg->ac_bk);
1631 ptr = ath10k_wmi_tlv_put_wmm(ptr, &arg->ac_vi);
1632 ptr = ath10k_wmi_tlv_put_wmm(ptr, &arg->ac_vo);
1633
1634 ath10k_dbg(ar, ATH10K_DBG_WMI, "wmi tlv vdev wmm conf\n");
1635 return skb;
1636}
1637
1638static struct sk_buff *
1603ath10k_wmi_tlv_op_gen_peer_create(struct ath10k *ar, u32 vdev_id, 1639ath10k_wmi_tlv_op_gen_peer_create(struct ath10k *ar, u32 vdev_id,
1604 const u8 peer_addr[ETH_ALEN]) 1640 const u8 peer_addr[ETH_ALEN])
1605{ 1641{
@@ -2426,6 +2462,7 @@ static struct wmi_cmd_map wmi_tlv_cmd_map = {
2426 .gpio_config_cmdid = WMI_TLV_GPIO_CONFIG_CMDID, 2462 .gpio_config_cmdid = WMI_TLV_GPIO_CONFIG_CMDID,
2427 .gpio_output_cmdid = WMI_TLV_GPIO_OUTPUT_CMDID, 2463 .gpio_output_cmdid = WMI_TLV_GPIO_OUTPUT_CMDID,
2428 .pdev_get_temperature_cmdid = WMI_TLV_CMD_UNSUPPORTED, 2464 .pdev_get_temperature_cmdid = WMI_TLV_CMD_UNSUPPORTED,
2465 .vdev_set_wmm_params_cmdid = WMI_TLV_VDEV_SET_WMM_PARAMS_CMDID,
2429}; 2466};
2430 2467
2431static struct wmi_pdev_param_map wmi_tlv_pdev_param_map = { 2468static struct wmi_pdev_param_map wmi_tlv_pdev_param_map = {
@@ -2569,6 +2606,7 @@ static const struct wmi_ops wmi_tlv_ops = {
2569 .gen_vdev_down = ath10k_wmi_tlv_op_gen_vdev_down, 2606 .gen_vdev_down = ath10k_wmi_tlv_op_gen_vdev_down,
2570 .gen_vdev_set_param = ath10k_wmi_tlv_op_gen_vdev_set_param, 2607 .gen_vdev_set_param = ath10k_wmi_tlv_op_gen_vdev_set_param,
2571 .gen_vdev_install_key = ath10k_wmi_tlv_op_gen_vdev_install_key, 2608 .gen_vdev_install_key = ath10k_wmi_tlv_op_gen_vdev_install_key,
2609 .gen_vdev_wmm_conf = ath10k_wmi_tlv_op_gen_vdev_wmm_conf,
2572 .gen_peer_create = ath10k_wmi_tlv_op_gen_peer_create, 2610 .gen_peer_create = ath10k_wmi_tlv_op_gen_peer_create,
2573 .gen_peer_delete = ath10k_wmi_tlv_op_gen_peer_delete, 2611 .gen_peer_delete = ath10k_wmi_tlv_op_gen_peer_delete,
2574 .gen_peer_flush = ath10k_wmi_tlv_op_gen_peer_flush, 2612 .gen_peer_flush = ath10k_wmi_tlv_op_gen_peer_flush,
diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.h b/drivers/net/wireless/ath/ath10k/wmi-tlv.h
index 87db762ac1a2..3dc43b90469d 100644
--- a/drivers/net/wireless/ath/ath10k/wmi-tlv.h
+++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.h
@@ -1302,6 +1302,10 @@ struct wmi_tlv_pdev_set_wmm_cmd {
1302 __le32 dg_type; /* no idea.. */ 1302 __le32 dg_type; /* no idea.. */
1303} __packed; 1303} __packed;
1304 1304
1305struct wmi_tlv_vdev_set_wmm_cmd {
1306 __le32 vdev_id;
1307} __packed;
1308
1305struct wmi_tlv_phyerr_ev { 1309struct wmi_tlv_phyerr_ev {
1306 __le32 num_phyerrs; 1310 __le32 num_phyerrs;
1307 __le32 tsf_l32; 1311 __le32 tsf_l32;
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index 050e5088acf2..81561e4ae308 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -5188,6 +5188,7 @@ static const struct wmi_ops wmi_ops = {
5188 .gen_vdev_install_key = ath10k_wmi_op_gen_vdev_install_key, 5188 .gen_vdev_install_key = ath10k_wmi_op_gen_vdev_install_key,
5189 .gen_vdev_spectral_conf = ath10k_wmi_op_gen_vdev_spectral_conf, 5189 .gen_vdev_spectral_conf = ath10k_wmi_op_gen_vdev_spectral_conf,
5190 .gen_vdev_spectral_enable = ath10k_wmi_op_gen_vdev_spectral_enable, 5190 .gen_vdev_spectral_enable = ath10k_wmi_op_gen_vdev_spectral_enable,
5191 /* .gen_vdev_wmm_conf not implemented */
5191 .gen_peer_create = ath10k_wmi_op_gen_peer_create, 5192 .gen_peer_create = ath10k_wmi_op_gen_peer_create,
5192 .gen_peer_delete = ath10k_wmi_op_gen_peer_delete, 5193 .gen_peer_delete = ath10k_wmi_op_gen_peer_delete,
5193 .gen_peer_flush = ath10k_wmi_op_gen_peer_flush, 5194 .gen_peer_flush = ath10k_wmi_op_gen_peer_flush,
@@ -5251,6 +5252,7 @@ static const struct wmi_ops wmi_10_1_ops = {
5251 .gen_vdev_install_key = ath10k_wmi_op_gen_vdev_install_key, 5252 .gen_vdev_install_key = ath10k_wmi_op_gen_vdev_install_key,
5252 .gen_vdev_spectral_conf = ath10k_wmi_op_gen_vdev_spectral_conf, 5253 .gen_vdev_spectral_conf = ath10k_wmi_op_gen_vdev_spectral_conf,
5253 .gen_vdev_spectral_enable = ath10k_wmi_op_gen_vdev_spectral_enable, 5254 .gen_vdev_spectral_enable = ath10k_wmi_op_gen_vdev_spectral_enable,
5255 /* .gen_vdev_wmm_conf not implemented */
5254 .gen_peer_create = ath10k_wmi_op_gen_peer_create, 5256 .gen_peer_create = ath10k_wmi_op_gen_peer_create,
5255 .gen_peer_delete = ath10k_wmi_op_gen_peer_delete, 5257 .gen_peer_delete = ath10k_wmi_op_gen_peer_delete,
5256 .gen_peer_flush = ath10k_wmi_op_gen_peer_flush, 5258 .gen_peer_flush = ath10k_wmi_op_gen_peer_flush,
@@ -5313,6 +5315,7 @@ static const struct wmi_ops wmi_10_2_ops = {
5313 .gen_vdev_install_key = ath10k_wmi_op_gen_vdev_install_key, 5315 .gen_vdev_install_key = ath10k_wmi_op_gen_vdev_install_key,
5314 .gen_vdev_spectral_conf = ath10k_wmi_op_gen_vdev_spectral_conf, 5316 .gen_vdev_spectral_conf = ath10k_wmi_op_gen_vdev_spectral_conf,
5315 .gen_vdev_spectral_enable = ath10k_wmi_op_gen_vdev_spectral_enable, 5317 .gen_vdev_spectral_enable = ath10k_wmi_op_gen_vdev_spectral_enable,
5318 /* .gen_vdev_wmm_conf not implemented */
5316 .gen_peer_create = ath10k_wmi_op_gen_peer_create, 5319 .gen_peer_create = ath10k_wmi_op_gen_peer_create,
5317 .gen_peer_delete = ath10k_wmi_op_gen_peer_delete, 5320 .gen_peer_delete = ath10k_wmi_op_gen_peer_delete,
5318 .gen_peer_flush = ath10k_wmi_op_gen_peer_flush, 5321 .gen_peer_flush = ath10k_wmi_op_gen_peer_flush,
diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h
index c0093938c6ee..3c48e0d21900 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.h
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
@@ -551,6 +551,7 @@ struct wmi_cmd_map {
551 u32 gpio_config_cmdid; 551 u32 gpio_config_cmdid;
552 u32 gpio_output_cmdid; 552 u32 gpio_output_cmdid;
553 u32 pdev_get_temperature_cmdid; 553 u32 pdev_get_temperature_cmdid;
554 u32 vdev_set_wmm_params_cmdid;
554}; 555};
555 556
556/* 557/*