Răsfoiți Sursa

qcacmn: Fix EPCS status code size

Change EPCS status code size to 2 bytes as
per spec.

Change-Id: I0e45626d2a35d55947d5ebc269acf97269465ef9
CRs-Fixed: 3508758
Venkateswara Swamy Bandaru 2 ani în urmă
părinte
comite
ece1e3a025
2 a modificat fișierele cu 10 adăugiri și 10 ștergeri
  1. 2 2
      umac/mlo_mgr/inc/wlan_mlo_epcs.h
  2. 8 8
      umac/mlo_mgr/src/wlan_mlo_epcs.c

+ 2 - 2
umac/mlo_mgr/inc/wlan_mlo_epcs.h

@@ -53,7 +53,7 @@ enum wlan_epcs_category {
 struct wlan_epcs_info {
 	enum wlan_epcs_category cat;
 	uint8_t dialog_token;
-	uint8_t status;
+	uint16_t status;
 };
 
 /**
@@ -93,7 +93,7 @@ struct epcs_frm {
 			uint8_t bytes[0];
 		} req;
 		struct {
-			uint8_t status_code;
+			uint8_t status_code[2];
 			uint8_t bytes[0];
 		} resp;
 	};

+ 8 - 8
umac/mlo_mgr/src/wlan_mlo_epcs.c

@@ -100,12 +100,14 @@ wlan_mlo_parse_epcs_response_action_frame(struct wlan_epcs_info *epcs,
 
 	epcs->cat = epcs_action_frm->protected_eht_action;
 	epcs->dialog_token = epcs_action_frm->dialog_token;
-	epcs->status = epcs_action_frm->resp.status_code;
-	epcs_info("EPCS frame rcv : category:%d action:%d dialog_token:%d status %d frmlen %d",
+	QDF_SET_BITS(epcs->status, 0, 8, epcs_action_frm->resp.status_code[0]);
+	QDF_SET_BITS(epcs->status, 8, 8, epcs_action_frm->resp.status_code[1]);
+	epcs_info("EPCS frame rcv : category:%d action:%d dialog_token:%d status %x %x frmlen %d",
 		  epcs_action_frm->category,
 		  epcs_action_frm->protected_eht_action,
 		  epcs_action_frm->dialog_token,
-		  epcs_action_frm->resp.status_code, frm_len);
+		  epcs_action_frm->resp.status_code[0],
+		  epcs_action_frm->resp.status_code[1], frm_len);
 
 	return QDF_STATUS_SUCCESS;
 }
@@ -199,8 +201,9 @@ wlan_mlo_add_epcs_response_action_frame(uint8_t *frm,
 	*frm++ = args->action;
 	/* Dialog token*/
 	*frm++ = args->arg1;
-	/* Status code */
-	*frm++ = args->arg2;
+	/* Status code (2 bytes) */
+	*frm++ = QDF_GET_BITS(args->arg2, 0, 8);
+	*frm++ = QDF_GET_BITS(args->arg2, 8, 8);
 
 	epcs_info("EPCS response frame: category:%d action:%d dialog_token:%d status_code:%d",
 		  args->category, args->action, args->arg1, args->arg2);
@@ -214,9 +217,6 @@ wlan_mlo_add_epcs_action_frame(uint8_t *frm,
 			       struct wlan_action_frame_args *args,
 			       uint8_t *buf)
 {
-	qdf_err("EPCS frame: category:%d action:%d ",
-		args->category, args->action);
-
 	switch (args->action) {
 	case WLAN_EPCS_CATEGORY_REQUEST:
 		return wlan_mlo_add_epcs_request_action_frame(frm, args,