Files
android_kernel_samsung_sm86…/umac/regulatory/dispatcher
Asutosh Mohapatra 69a0ec3acd qcacmn: Refactor set AP power type logic
Currently 'reg_compute_pdev_current_chan_list' is called
twice as shown below, when 'wmi_reg_chan_list_cc_ext_event'
from FW is handled.

LIST_CC_EXT event:
	reg_compute_pdev_current_chan_list() [ 1st call]
	reg_send_scheduler_msg_nb()/reg_send_scheduler_msg_sb()
	    wlan_reg_decide_6g_ap_pwr_type()
	        reg_decide_6g_ap_pwr_type()
	            reg_set_ap_pwr_and_update_chan_list()
		        reg_compute_pdev_current_chan_list() [2nd call]

To solve this, do not call 'wlan_reg_decide_6g_ap_pwr_type'
from north bound or south bound callbacks.

However, the above fix creates another problem because the function
'reg_decide_6g_ap_pwr_type', in addition to calling
'reg_compute_pdev_current_chan_list', also sets the current 6 GHz
power type for the pdev. A proper place to set the 6 GHz
power type is in function 'reg_set_ap_pwr_type',
which currently does not set 6 GHz power type correctly.

Hence remove 'wlan_reg_decide_6g_ap_pwr_type' and
'reg_decide_6g_ap_pwr_type' functions and modify
'reg_set_ap_pwr_type' to set the best 6 GHz power type
based on the 6 GHz regulatory rules.

CRs-Fixed: 3609342
Change-Id: I1bdfd71245552a51fd5123931a7a6dcc16f2a942
2023-11-12 15:23:56 -08:00
..