Jelajahi Sumber

Merge "qcacmn: Update the T2LM status code as 2 bytes"

Linux Build Service Account 2 tahun lalu
induk
melakukan
d4a9ab32c5

+ 2 - 2
umac/cmn_services/cmn_defs/inc/wlan_cmn_ieee80211.h

@@ -2804,13 +2804,13 @@ struct wlan_ie_multi_link_traffic_indication {
 /**
  * struct wlan_action_frame - Generic action frame format
  * @category: Action frame category
- * @action: action
+ * @action: action (valid values from 0 to 255)
  *
  * Reference IEEE Std 802.11-2020 9.4.1.11 Action field
  */
 struct wlan_action_frame {
 	int8_t category;
-	int8_t action;
+	uint8_t action;
 } __packed;
 
 /**

+ 7 - 5
umac/mlo_mgr/src/wlan_mlo_t2lm.c

@@ -475,7 +475,7 @@ static QDF_STATUS wlan_mlo_parse_t2lm_response_action_frame(
 	/*
 	 * T2LM response action frame
 	 *
-	 *   1-byte     1-byte     1-byte   1-byte   variable
+	 *   1-byte     1-byte     1-byte   2-byte   variable
 	 *----------------------------------------------------
 	 * |         |           |        |        |         |
 	 * | Category| Protected | Dialog | Status | T2LM IE |
@@ -487,11 +487,12 @@ static QDF_STATUS wlan_mlo_parse_t2lm_response_action_frame(
 	t2lm_action_frm = (uint8_t *)action_frm + sizeof(*action_frm);
 
 	t2lm->dialog_token = *t2lm_action_frm;
-	t2lm->t2lm_resp_type = *(t2lm_action_frm + sizeof(uint8_t));
+	t2lm->t2lm_resp_type =
+	      qdf_le16_to_cpu(*(uint16_t *)(t2lm_action_frm + sizeof(uint8_t)));
 
 	if (t2lm->t2lm_resp_type ==
 			WLAN_T2LM_RESP_TYPE_PREFERRED_TID_TO_LINK_MAPPING) {
-		t2lm_action_frm += sizeof(uint8_t) + sizeof(uint8_t);
+		t2lm_action_frm += sizeof(uint8_t) + sizeof(uint16_t);
 		ret_val = wlan_mlo_parse_t2lm_ie(t2lm, t2lm_action_frm);
 	}
 
@@ -565,8 +566,9 @@ static uint8_t *wlan_mlo_add_t2lm_response_action_frame(
 	*frm++ = args->action;
 	/* Dialog token*/
 	*frm++ = args->arg1;
-	/* Status code */
-	*frm++ = args->arg2;
+	/* Status code (2 bytes)*/
+	*(uint16_t *)frm = htole16(args->arg2);
+	frm += sizeof(uint16_t);
 
 	t2lm_info("T2LM response frame: category:%d action:%d dialog_token:%d status_code:%d",
 		  args->category, args->action, args->arg1, args->arg2);