|
@@ -2036,6 +2036,55 @@ ath10k_wmi_tlv_op_gen_bcn_tmpl(struct ath10k *ar, u32 vdev_id,
|
|
|
return skb;
|
|
|
}
|
|
|
|
|
|
+static struct sk_buff *
|
|
|
+ath10k_wmi_tlv_op_gen_prb_tmpl(struct ath10k *ar, u32 vdev_id,
|
|
|
+ struct sk_buff *prb)
|
|
|
+{
|
|
|
+ struct wmi_tlv_prb_tmpl_cmd *cmd;
|
|
|
+ struct wmi_tlv_bcn_prb_info *info;
|
|
|
+ struct wmi_tlv *tlv;
|
|
|
+ struct sk_buff *skb;
|
|
|
+ void *ptr;
|
|
|
+ size_t len;
|
|
|
+
|
|
|
+ len = sizeof(*tlv) + sizeof(*cmd) +
|
|
|
+ sizeof(*tlv) + sizeof(*info) +
|
|
|
+ sizeof(*tlv) + roundup(prb->len, 4);
|
|
|
+ skb = ath10k_wmi_alloc_skb(ar, len);
|
|
|
+ if (!skb)
|
|
|
+ return ERR_PTR(-ENOMEM);
|
|
|
+
|
|
|
+ ptr = (void *)skb->data;
|
|
|
+ tlv = ptr;
|
|
|
+ tlv->tag = __cpu_to_le16(WMI_TLV_TAG_STRUCT_PRB_TMPL_CMD);
|
|
|
+ tlv->len = __cpu_to_le16(sizeof(*cmd));
|
|
|
+ cmd = (void *)tlv->value;
|
|
|
+ cmd->vdev_id = __cpu_to_le32(vdev_id);
|
|
|
+ cmd->buf_len = __cpu_to_le32(prb->len);
|
|
|
+
|
|
|
+ ptr += sizeof(*tlv);
|
|
|
+ ptr += sizeof(*cmd);
|
|
|
+
|
|
|
+ tlv = ptr;
|
|
|
+ tlv->tag = __cpu_to_le16(WMI_TLV_TAG_STRUCT_BCN_PRB_INFO);
|
|
|
+ tlv->len = __cpu_to_le16(sizeof(*info));
|
|
|
+ info = (void *)tlv->value;
|
|
|
+ info->caps = 0;
|
|
|
+ info->erp = 0;
|
|
|
+
|
|
|
+ ptr += sizeof(*tlv);
|
|
|
+ ptr += sizeof(*info);
|
|
|
+
|
|
|
+ tlv = ptr;
|
|
|
+ tlv->tag = __cpu_to_le16(WMI_TLV_TAG_ARRAY_BYTE);
|
|
|
+ tlv->len = __cpu_to_le16(roundup(prb->len, 4));
|
|
|
+ memcpy(tlv->value, prb->data, prb->len);
|
|
|
+
|
|
|
+ ath10k_dbg(ar, ATH10K_DBG_WMI, "wmi tlv prb tmpl vdev_id %i\n",
|
|
|
+ vdev_id);
|
|
|
+ return skb;
|
|
|
+}
|
|
|
+
|
|
|
/****************/
|
|
|
/* TLV mappings */
|
|
|
/****************/
|
|
@@ -2326,6 +2375,7 @@ static const struct wmi_ops wmi_tlv_ops = {
|
|
|
/* .gen_addba_set_resp not implemented */
|
|
|
/* .gen_delba_send not implemented */
|
|
|
.gen_bcn_tmpl = ath10k_wmi_tlv_op_gen_bcn_tmpl,
|
|
|
+ .gen_prb_tmpl = ath10k_wmi_tlv_op_gen_prb_tmpl,
|
|
|
};
|
|
|
|
|
|
/************/
|