Quellcode durchsuchen

qcacld-3.0: Update the VHT operation IE as per latest draft

VHT operation IE parameters values are changed in latest draft,
update the set_channel_params to set the new values as per latest
draft.

Change-Id: I2b8f78adb608bf942dff28eda44138044ba93e59
CRs-Fixed: 1022680
Kiran Kumar Lokere vor 8 Jahren
Ursprung
Commit
f1f5e99a70

+ 15 - 5
core/cds/src/cds_reg_service.c

@@ -486,17 +486,27 @@ static void cds_set_5g_channel_params(uint16_t oper_ch,
 				else
 					ch_params->sec_ch_offset =
 						PHY_DOUBLE_CHANNEL_HIGH_PRIMARY;
-				ch_params->center_freq_seg0 =
-					(bonded_chan_ptr2->start_ch +
-					 bonded_chan_ptr2->end_ch)/2;
 
+				ch_params->center_freq_seg0 =
+					(bonded_chan_ptr->start_ch +
+					 bonded_chan_ptr->end_ch)/2;
 			}
-
 			break;
 		}
-
 		ch_params->ch_width = next_lower_bw[ch_params->ch_width];
 	}
+	if (CH_WIDTH_160MHZ == ch_params->ch_width) {
+		ch_params->center_freq_seg1 = ch_params->center_freq_seg0;
+		chan_state = cds_search_5g_bonded_channel(oper_ch,
+							  CH_WIDTH_80MHZ,
+							  &bonded_chan_ptr);
+		ch_params->center_freq_seg0 = (bonded_chan_ptr->start_ch +
+				bonded_chan_ptr->end_ch)/2;
+	}
+	QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO,
+			"ch %d ch_wd %d freq0 %d freq1 %d", oper_ch,
+			ch_params->ch_width, ch_params->center_freq_seg0,
+			ch_params->center_freq_seg1);
 }
 
 /**

+ 4 - 2
core/hdd/src/wlan_hdd_hostapd.c

@@ -6502,8 +6502,10 @@ static int wlan_hdd_set_channel(struct wiphy *wiphy,
 	 */
 
 	channel = ieee80211_frequency_to_channel(chandef->chan->center_freq);
-	if (NL80211_CHAN_WIDTH_80P80 == chandef->width)
-		channel_seg2 = ieee80211_frequency_to_channel(chandef->center_freq2);
+	if (NL80211_CHAN_WIDTH_80P80 == chandef->width ||
+	    NL80211_CHAN_WIDTH_160 == chandef->width)
+		channel_seg2 =
+			ieee80211_frequency_to_channel(chandef->center_freq2);
 	else
 		channel_seg2 = 0;
 

+ 5 - 0
core/mac/src/pe/lim/lim_assoc_utils.c

@@ -2260,6 +2260,11 @@ lim_add_sta(tpAniSirGlobal mac_ctx,
 				sta_ds->vhtSupportedChannelWidthSet + 1;
 
 		add_sta_params->vhtSupportedRxNss = sta_ds->vhtSupportedRxNss;
+		if (LIM_IS_AP_ROLE(session_entry) ||
+				LIM_IS_P2P_DEVICE_GO(session_entry))
+			add_sta_params->vhtSupportedRxNss = QDF_MIN(
+					add_sta_params->vhtSupportedRxNss,
+					session_entry->nss);
 		add_sta_params->vhtTxBFCapable =
 #ifdef FEATURE_WLAN_TDLS
 			((STA_ENTRY_PEER == sta_ds->staType)

+ 3 - 2
core/mac/src/sys/legacy/src/utils/src/parser_api.c

@@ -1144,10 +1144,11 @@ populate_dot11f_vht_operation(tpAniSirGlobal pMac,
 	pDot11f->present = 1;
 
 	if (psessionEntry->ch_width > CH_WIDTH_40MHZ) {
-		pDot11f->chanWidth = psessionEntry->ch_width - 1;
+		pDot11f->chanWidth = 1;
 		pDot11f->chanCenterFreqSeg1 =
 			psessionEntry->ch_center_freq_seg0;
-		if (psessionEntry->ch_width == CH_WIDTH_80P80MHZ)
+		if (psessionEntry->ch_width == CH_WIDTH_80P80MHZ ||
+				psessionEntry->ch_width == CH_WIDTH_160MHZ)
 			pDot11f->chanCenterFreqSeg2 =
 				psessionEntry->ch_center_freq_seg1;
 		else