Browse Source

qcacmn: Add status and num_extra_peers in wmi ready extract API

Add status recieved as part if WMI ready event into wmi_ready host param
structure to enable the removal of seperate API to extract status. Add
new param introduced by FW to indicate number of extra peers FW is
allocated for its internal use.

Change-Id: I7a9ed64d4a9d1f38397197c4c4a4114d8365eef7
CRs-Fixed: 2149878
Kiran Venkatappa 7 years ago
parent
commit
75ba86ec7c
3 changed files with 10 additions and 0 deletions
  1. 6 0
      wmi/inc/wmi_unified_param.h
  2. 2 0
      wmi/src/wmi_unified_non_tlv.c
  3. 2 0
      wmi/src/wmi_unified_tlv.c

+ 6 - 0
wmi/inc/wmi_unified_param.h

@@ -8007,21 +8007,27 @@ struct get_arp_stats {
 
 /**
  * struct wmi_host_ready_ev_param - Data revieved in ready event
+ * @status:         FW init status. Success or Failure.
  * @num_dscp_table: Number of DSCP table supported in FW
  * @num_extra_mac_addr: Extra mac address present in ready event. Used
  *                  in DBDC mode to provide multiple mac per pdev.
  * @num_total_peer: Total number of peers FW could allocate. Zero means
  *                  FW could  allocate num peers requested by host in init.
  *                  Otherwise, host need update it max_peer to this value.
+ * @num_extra_peer: Number of extra peers created and used within FW. Host
+ *                  should expect peer_id can be num_total_peer + num_extra_peer
+ *                  but it can create only upto num_total_peer.
  * @agile_capability: Boolean specification of whether the target supports
  *                  agile DFS, by means of using one 80 MHz radio chain for
  *                  radar detection, concurrently with using another radio
  *                  chain for non-160 MHz regular operation.
  */
 struct wmi_host_ready_ev_param {
+	uint32_t status;
 	uint32_t num_dscp_table;
 	uint32_t num_extra_mac_addr;
 	uint32_t num_total_peer;
+	uint32_t num_extra_peer;
 	bool agile_capability;
 };
 

+ 2 - 0
wmi/src/wmi_unified_non_tlv.c

@@ -5847,6 +5847,7 @@ static QDF_STATUS extract_ready_event_params_non_tlv(wmi_unified_t wmi_handle,
 {
 	wmi_ready_event *ev = (wmi_ready_event *) evt_buf;
 
+	ev_param->status = ev->status;
 	ev_param->num_dscp_table = ev->num_dscp_table;
 	if (ev->agile_capability)
 		ev_param->agile_capability = true;
@@ -5855,6 +5856,7 @@ static QDF_STATUS extract_ready_event_params_non_tlv(wmi_unified_t wmi_handle,
 	/* Following params not present in non-TLV target. Set Defaults */
 	ev_param->num_extra_mac_addr = 0;
 	ev_param->num_total_peer = 0;
+	ev_param->num_extra_peer = 0;
 
 	return QDF_STATUS_SUCCESS;
 }

+ 2 - 0
wmi/src/wmi_unified_tlv.c

@@ -16867,9 +16867,11 @@ static QDF_STATUS extract_ready_event_params_tlv(wmi_unified_t wmi_handle,
 	param_buf = (WMI_READY_EVENTID_param_tlvs *) evt_buf;
 	ev = param_buf->fixed_param;
 
+	ev_param->status = ev->status;
 	ev_param->num_dscp_table = ev->num_dscp_table;
 	ev_param->num_extra_mac_addr = ev->num_extra_mac_addr;
 	ev_param->num_total_peer = ev->num_total_peers;
+	ev_param->num_extra_peer = ev->num_extra_peers;
 	/* Agile_cap in ready event is not supported in TLV target */
 	ev_param->agile_capability = false;