Procházet zdrojové kódy

qcacmn: Add support to send csa_event_bitmap to FW

In the current implementation, csa_event_bitmap for CSA in the beacon
template WMI command is set to 0. Hence, the FW sends CSA complete event
to the host at the end of CSA complete.

Set the below values to csa_event_bitmap to get the current channel switch
count from FW to update the CSA/ECSA IE count in probe response frame.

1. WMI_CSA_EVENT_BMAP_ALL:
   To get the CSA switch count event for every update to switch count.
2. WMI_CSA_EVENT_BMAP_SWITCH_COUNT_ZERO:
   To get the CSA complete event only when the switch count becomes zero.
3. WMI_CSA_EVENT_BMAP_VALID_MASK:
   FW to follow the bitmap for sending the CSA switch count event to the
   host. Example,
   0X80000000: Send the CSA event when the switch count becomes zero.
   0X80000033: Send the CSA switch count to host for the count 0,1,4 and 5.

Change-Id: I8380d6badc3b84c72fde489e59b51b5ac122b97b
CRs-Fixed: 2978799
Shashikala Prabhu před 4 roky
rodič
revize
c33f73847d

+ 13 - 0
umac/mlme/vdev_mgr/dispatcher/inc/wlan_vdev_mgr_tgt_if_tx_defs.h

@@ -183,6 +183,15 @@ struct tbttoffset_params {
 	uint32_t vdev_tbtt_qtime_hi;
 };
 
+/* Follow bitmap for sending the CSA switch count event */
+#define WLAN_CSA_EVENT_BMAP_VALID_MASK 0X80000000
+/* Send only when the switch count becomes zero, added for backward
+ * compatibility same can also be achieved by setting bitmap to 0X80000001.
+ */
+#define WLAN_CSA_EVENT_BMAP_SWITCH_COUNT_ZERO    0
+/* Send CSA switch count event for every update to switch count */
+#define WLAN_CSA_EVENT_BMAP_ALL                  0XFFFFFFFF
+
 /**
  * struct beacon_tmpl_params - beacon template cmd parameter
  * @vdev_id: vdev id
@@ -198,6 +207,9 @@ struct tbttoffset_params {
  *     ema_beacon_profile_periodicity, ema_beacon_tmpl_idx,
  *     ema_first_tmpl and ema_last_tmpl in the order of low
  *     to high
+ * @csa_event_bitmap: Specify when to send the CSA switch count status from FW
+ *     to host. Example: if CSA switch count event is needed to be sent when the
+ *     switch count is 0, 1, 4, and 5, set the bitmap to (0X80000033)
  * @enable_bigtk: enable bigtk or not
  * @frm: beacon template parameter
  */
@@ -212,6 +224,7 @@ struct beacon_tmpl_params {
 	uint32_t esp_ie_offset;
 	uint32_t mu_edca_ie_offset;
 	uint32_t ema_params;
+	uint32_t csa_event_bitmap;
 	bool enable_bigtk;
 	uint8_t *frm;
 };

+ 1 - 0
wmi/src/wmi_unified_tlv.c

@@ -2471,6 +2471,7 @@ static QDF_STATUS send_beacon_tmpl_send_cmd_tlv(wmi_unified_t wmi_handle,
 	cmd->mu_edca_ie_offset = param->mu_edca_ie_offset;
 	cmd->ema_params = param->ema_params;
 	cmd->buf_len = param->tmpl_len;
+	cmd->csa_event_bitmap = param->csa_event_bitmap;
 
 	WMI_BEACON_PROTECTION_EN_SET(cmd->feature_enable_bitmap,
 				     param->enable_bigtk);