Browse Source

qcacld-3.0: Don't select dot11mode based on band only

Currently, if fw doesn't send phy mode after roaming host itself
calculates phy mode based on band only. Host doesn't consider self
dot11 mode and returns dot11 mode based on 2g band or any other band.
Which may cause different phy modes in fw and host.

Fix: Calculate dot11 based on self dot11 mode, return dot11 mode based
on band only if self dot11 mode is not valid.

Change-Id: Ifa320e3bb8a2ae8cffc59c73501c0643dc3b65af
CRs-Fixed: 2725841
sheenam monga 4 years ago
parent
commit
f288ea9a49
1 changed files with 5 additions and 3 deletions
  1. 5 3
      core/mac/src/pe/lim/lim_ft.c

+ 5 - 3
core/mac/src/pe/lim/lim_ft.c

@@ -408,13 +408,14 @@ static uint8_t lim_calculate_dot11_mode(struct mac_context *mac_ctx,
 					enum reg_wifi_band band)
 {
 	enum mlme_dot11_mode self_dot11_mode;
+	enum mlme_dot11_mode new_dot11_mode;
 
 	self_dot11_mode = mac_ctx->mlme_cfg->dot11_mode.dot11_mode;
 
 	if (band == REG_BAND_2G)
-		return MLME_DOT11_MODE_11G;
+		new_dot11_mode = MLME_DOT11_MODE_11G;
 	else
-		return MLME_DOT11_MODE_11A;
+		new_dot11_mode = MLME_DOT11_MODE_11A;
 
 	switch (self_dot11_mode) {
 	case MLME_DOT11_MODE_11AX:
@@ -439,8 +440,9 @@ static uint8_t lim_calculate_dot11_mode(struct mac_context *mac_ctx,
 		if (bcn->HTCaps.present)
 			return MLME_DOT11_MODE_11N;
 	default:
-		break;
+			return new_dot11_mode;
 	}
+
 }
 
 /**