소스 검색

qcacld-3.0: set BA buffer size according to he cap of sta

In SAP mode, if he is enabled, the BA buffer size will be
set to 256 in addba response, some STAs can not handle it
properly, which may result in data transmition failure on
these STAs. Then they can not send out DHCP request and so
failed to obtain IP address.
To fix this issue, check the he capability of both STA and
the session, set the buffer size to 256 only when both are
he capable.

Change-Id: If55619d598bb9603cf7ce3bc116d80cf718676d6
CRs-Fixed: 2515183
Yu Wang 5 년 전
부모
커밋
36d5210686
1개의 변경된 파일13개의 추가작업 그리고 1개의 파일을 삭제
  1. 13 1
      core/mac/src/pe/lim/lim_send_management_frames.c

+ 13 - 1
core/mac/src/pe/lim/lim_send_management_frames.c

@@ -4897,6 +4897,9 @@ QDF_STATUS lim_send_addba_response_frame(struct mac_context *mac_ctx,
 	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
 	void *peer, *pdev;
 	uint8_t he_frag = 0;
+	tpDphHashNode sta_ds;
+	uint16_t aid;
+	bool he_cap = false;
 
 	sme_sessionid = session->smeSessionId;
 
@@ -4928,10 +4931,19 @@ QDF_STATUS lim_send_addba_response_frame(struct mac_context *mac_ctx,
 		pe_err("refused addba req");
 	}
 	frm.addba_param_set.tid = tid;
-	if (lim_is_session_he_capable(session))
+
+	if (lim_is_session_he_capable(session)) {
+		sta_ds = dph_lookup_hash_entry(mac_ctx, peer_mac, &aid,
+					       &session->dph.dphHashTable);
+		if (sta_ds)
+			he_cap = lim_is_sta_he_capable(sta_ds);
+	}
+
+	if (he_cap)
 		frm.addba_param_set.buff_size = MAX_BA_BUFF_SIZE;
 	else
 		frm.addba_param_set.buff_size = SIR_MAC_BA_DEFAULT_BUFF_SIZE;
+
 	if (mac_ctx->usr_cfg_ba_buff_size)
 		frm.addba_param_set.buff_size = mac_ctx->usr_cfg_ba_buff_size;