|
@@ -2085,6 +2085,46 @@ ath10k_wmi_tlv_op_gen_prb_tmpl(struct ath10k *ar, u32 vdev_id,
|
|
return skb;
|
|
return skb;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static struct sk_buff *
|
|
|
|
+ath10k_wmi_tlv_op_gen_p2p_go_bcn_ie(struct ath10k *ar, u32 vdev_id,
|
|
|
|
+ const u8 *p2p_ie)
|
|
|
|
+{
|
|
|
|
+ struct wmi_tlv_p2p_go_bcn_ie *cmd;
|
|
|
|
+ struct wmi_tlv *tlv;
|
|
|
|
+ struct sk_buff *skb;
|
|
|
|
+ void *ptr;
|
|
|
|
+ size_t len;
|
|
|
|
+
|
|
|
|
+ len = sizeof(*tlv) + sizeof(*cmd) +
|
|
|
|
+ sizeof(*tlv) + roundup(p2p_ie[1] + 2, 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_P2P_GO_SET_BEACON_IE);
|
|
|
|
+ tlv->len = __cpu_to_le16(sizeof(*cmd));
|
|
|
|
+ cmd = (void *)tlv->value;
|
|
|
|
+ cmd->vdev_id = __cpu_to_le32(vdev_id);
|
|
|
|
+ cmd->ie_len = __cpu_to_le32(p2p_ie[1] + 2);
|
|
|
|
+
|
|
|
|
+ ptr += sizeof(*tlv);
|
|
|
|
+ ptr += sizeof(*cmd);
|
|
|
|
+
|
|
|
|
+ tlv = ptr;
|
|
|
|
+ tlv->tag = __cpu_to_le16(WMI_TLV_TAG_ARRAY_BYTE);
|
|
|
|
+ tlv->len = __cpu_to_le16(roundup(p2p_ie[1] + 2, 4));
|
|
|
|
+ memcpy(tlv->value, p2p_ie, p2p_ie[1] + 2);
|
|
|
|
+
|
|
|
|
+ ptr += sizeof(*tlv);
|
|
|
|
+ ptr += roundup(p2p_ie[1] + 2, 4);
|
|
|
|
+
|
|
|
|
+ ath10k_dbg(ar, ATH10K_DBG_WMI, "wmi tlv p2p go bcn ie for vdev %i\n",
|
|
|
|
+ vdev_id);
|
|
|
|
+ return skb;
|
|
|
|
+}
|
|
|
|
+
|
|
/****************/
|
|
/****************/
|
|
/* TLV mappings */
|
|
/* TLV mappings */
|
|
/****************/
|
|
/****************/
|
|
@@ -2376,6 +2416,7 @@ static const struct wmi_ops wmi_tlv_ops = {
|
|
/* .gen_delba_send not implemented */
|
|
/* .gen_delba_send not implemented */
|
|
.gen_bcn_tmpl = ath10k_wmi_tlv_op_gen_bcn_tmpl,
|
|
.gen_bcn_tmpl = ath10k_wmi_tlv_op_gen_bcn_tmpl,
|
|
.gen_prb_tmpl = ath10k_wmi_tlv_op_gen_prb_tmpl,
|
|
.gen_prb_tmpl = ath10k_wmi_tlv_op_gen_prb_tmpl,
|
|
|
|
+ .gen_p2p_go_bcn_ie = ath10k_wmi_tlv_op_gen_p2p_go_bcn_ie,
|
|
};
|
|
};
|
|
|
|
|
|
/************/
|
|
/************/
|