소스 검색

qcacmn: Get secondary 80 channel freq for 6G spectral scan

When start spectral scan on 160Mhz, MCC platform failed to get center
freq2 by target_if_vdev_get_chan_freq_seg2. Since it doesn't register
related callback. Solution is using default API to get secondary 80
channel freq if vdev_get_chan_freq_seg2 is NULL.

Change-Id: I81f98700bab2f1c4bba12bd65b72092d69014a1c
CRs-Fixed: 2996322
Wu Gao 4 년 전
부모
커밋
f591372ab1
1개의 변경된 파일7개의 추가작업 그리고 3개의 파일을 삭제
  1. 7 3
      spectral/dispatcher/src/wlan_spectral_utils_api.c

+ 7 - 3
spectral/dispatcher/src/wlan_spectral_utils_api.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
  *
  *
  * Permission to use, copy, modify, and/or distribute this software for
@@ -248,6 +248,7 @@ int16_t
 spectral_vdev_get_chan_freq_seg2(struct wlan_objmgr_vdev *vdev)
 {
 	struct spectral_context *sc;
+	struct wlan_channel *des_chan;
 
 	sc = spectral_get_spectral_ctx_from_vdev(vdev);
 	if (!sc) {
@@ -256,8 +257,11 @@ spectral_vdev_get_chan_freq_seg2(struct wlan_objmgr_vdev *vdev)
 	}
 
 	if (!sc->legacy_cbacks.vdev_get_chan_freq_seg2) {
-		spectral_err("vdev_get_chan_freq_seg2 is not supported");
-		return -ENOTSUPP;
+		des_chan = wlan_vdev_mlme_get_des_chan(vdev);
+		if (des_chan->ch_width == CH_WIDTH_80P80MHZ)
+			return des_chan->ch_freq_seg2;
+		else
+			return 0;
 	}
 
 	return sc->legacy_cbacks.vdev_get_chan_freq_seg2(vdev);