Browse Source

qcacmn: Support channel list update when afc_reg_no_action is set

In enterprise mode, when power event is received from Target, ACS is
not called and regulatory takes no action to AFC power event.
Hence, when host receives the event REG_AFC_EVENT_TIMER_EXPIRY with
subevent type SWITCH_TO_LPI or STOP_TX from FW as a response to payload
reset command from client application, the channel list is not updated
as 'afc_reg_no_action' is enabled.

To fix this issue and update the channel list, add reg txops to trigger
channel list update while processing REG_AFC_EVENT_TIMER_EXPIRY event
from FW when 'afc_reg_no_action' is set.

It is to be noted that 'afc_reg_no_action' should be set only in
enterprise mode.

Change-Id: I9ba2a0a0d0c4282895b3787943aca1dd45c199c3
CRs-Fixed: 3492604
Thirusenthil Kumaran J 2 năm trước cách đây
mục cha
commit
6e4cdcf45c

+ 1 - 0
target_if/regulatory/src/target_if_reg.c

@@ -970,6 +970,7 @@ tgt_if_register_afc_callback(struct wlan_lmac_if_reg_tx_ops *reg_ops)
 {
 	reg_ops->send_afc_ind = tgt_if_regulatory_send_afc_cmd;
 	reg_ops->reg_get_min_psd = NULL;
+	reg_ops->trigger_update_channel_list = NULL;
 }
 #else
 static void

+ 3 - 1
umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h

@@ -1110,6 +1110,7 @@ struct wlan_lmac_if_ftm_rx_ops {
  * @register_afc_event_handler: pointer to register afc event handler
  * @unregister_afc_event_handler: pointer to unregister afc event handler
  * @trigger_acs_for_afc: pointer to trigger acs for afc
+ * @trigger_update_channel_list: pointer to trigger_update_channel_list
  * @reg_get_min_psd:
  * @is_chip_11be:
  * @register_rate2power_table_update_event_handler: pointer to register
@@ -1169,7 +1170,8 @@ struct wlan_lmac_if_reg_tx_ops {
 	QDF_STATUS (*unregister_afc_event_handler)
 				(struct wlan_objmgr_psoc *psoc, void *arg);
 	QDF_STATUS (*trigger_acs_for_afc)(struct wlan_objmgr_pdev *pdev);
-
+	QDF_STATUS (*trigger_update_channel_list)
+				(struct wlan_objmgr_pdev *pdev);
 	QDF_STATUS (*reg_get_min_psd) (struct wlan_objmgr_pdev *pdev,
 				       qdf_freq_t primary_freq,
 				       qdf_freq_t cen320,

+ 4 - 1
umac/regulatory/core/src/reg_build_chan_list.c

@@ -4570,8 +4570,11 @@ reg_process_afc_expiry_event(struct afc_regulatory_info *afc_info)
 		reg_reset_chan_list_and_power_event(pdev_priv_obj);
 		reg_client_afc_populate_channels(psoc, pdev);
 		reg_send_afc_payload_reset_event(pdev);
-		if (wlan_reg_is_noaction_on_afc_pwr_evt(pdev))
+		if (wlan_reg_is_noaction_on_afc_pwr_evt(pdev)) {
+			if (tx_ops->trigger_update_channel_list)
+				tx_ops->trigger_update_channel_list(pdev);
 			break;
+		}
 
 		if (tx_ops->trigger_acs_for_afc)
 			tx_ops->trigger_acs_for_afc(pdev);

+ 3 - 1
umac/regulatory/core/src/reg_priv_objs.h

@@ -357,7 +357,9 @@ struct wlan_regulatory_psoc_priv_obj {
  * @power_info: pointer to AFC power information received from the AFC event
  * sent by the target
  * @is_reg_noaction_on_afc_pwr_evt: indicates whether regulatory needs to
- * take action when AFC Power event is received
+ * take action when AFC Power event is received. This variable is supposed to
+ * be set in the enterprise mode where ACS is not called upon receiving AFC
+ * event.
  * @reg_afc_dev_deployment_type: AFC device deployment type from BDF
  * @sta_sap_scc_on_indoor_channel: Value of sap+sta scc on indoor support
  * @p2p_indoor_ch_support: Allow P2P GO in indoor channels