Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1c836cdb authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "qcacmn: Fill correct max BW to set channel params"

parents 1dbf76de 825c6962
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -315,4 +315,12 @@ void init_deinit_wakeup_host_wait(
		 struct wlan_objmgr_psoc *psoc,
		 struct wlan_objmgr_psoc *psoc,
		 struct target_psoc_info *tgt_info);
		 struct target_psoc_info *tgt_info);


/**
 * init_deinit_get_vht_ch_width - return vht channel width
 * @psoc: PSOC object
 *
 * Return: return max vht channel width supported by FW
 */
enum phy_ch_width init_deinit_get_vht_ch_width(struct wlan_objmgr_psoc *psoc);

#endif /* _SERVICE_READY_UTIL_H_*/
#endif /* _SERVICE_READY_UTIL_H_*/
+22 −0
Original line number Original line Diff line number Diff line
@@ -863,3 +863,25 @@ void init_deinit_wakeup_host_wait(
	}
	}
	qdf_event_set(&tgt_hdl->info.event);
	qdf_event_set(&tgt_hdl->info.event);
}
}

enum phy_ch_width init_deinit_get_vht_ch_width(struct wlan_objmgr_psoc *psoc)
{
	enum phy_ch_width fw_ch_wd = CH_WIDTH_80MHZ;
	struct target_psoc_info *tgt_hdl;
	int vht_cap_info;

	if (!psoc)
		return fw_ch_wd;

	tgt_hdl = wlan_psoc_get_tgt_if_handle(psoc);
	if (!tgt_hdl)
		return fw_ch_wd;

	vht_cap_info = target_if_get_vht_cap_info(tgt_hdl);
	if (vht_cap_info & WMI_VHT_CAP_CH_WIDTH_80P80_160MHZ)
		fw_ch_wd = CH_WIDTH_80P80MHZ;
	else if (vht_cap_info & WMI_VHT_CAP_CH_WIDTH_160MHZ)
		fw_ch_wd = CH_WIDTH_160MHZ;

	return fw_ch_wd;
}
+3 −2
Original line number Original line Diff line number Diff line
@@ -35,6 +35,7 @@
#include "wlan_ptt_sock_svc.h"
#include "wlan_ptt_sock_svc.h"


#include "wlan_reg_services_api.h"
#include "wlan_reg_services_api.h"
#include "service_ready_util.h"
/* forward declartion */
/* forward declartion */
struct regulatory_channel;
struct regulatory_channel;


@@ -355,8 +356,8 @@ static void wifi_update_channel_bw_info(struct wlan_objmgr_psoc *psoc,
		return;
		return;
	}
	}


	/* Passing CH_WIDTH_MAX will give the max bandwidth supported */
	ch_params.ch_width = init_deinit_get_vht_ch_width(psoc);
	ch_params.ch_width = CH_WIDTH_MAX;

	wlan_reg_set_channel_params_for_freq(pdev, freq,
	wlan_reg_set_channel_params_for_freq(pdev, freq,
					     sec_ch_2g, &ch_params);
					     sec_ch_2g, &ch_params);
	chan_info->band_center_freq1 = ch_params.mhz_freq_seg0;
	chan_info->band_center_freq1 = ch_params.mhz_freq_seg0;