|
@@ -2791,6 +2791,24 @@ struct wlan_objmgr_psoc *wma_get_psoc_from_scn_handle(void *scn_handle)
|
|
|
return wma_handle->psoc;
|
|
|
}
|
|
|
|
|
|
+void wma_get_fw_phy_mode_for_freq_cb(uint32_t freq, uint32_t chan_width,
|
|
|
+ uint32_t *phy_mode)
|
|
|
+{
|
|
|
+ uint32_t dot11_mode;
|
|
|
+ enum wlan_phymode host_phy_mode;
|
|
|
+ struct mac_context *mac = cds_get_context(QDF_MODULE_ID_PE);
|
|
|
+
|
|
|
+ if (!mac) {
|
|
|
+ wma_err("MAC context is NULL");
|
|
|
+ *phy_mode = WLAN_PHYMODE_AUTO;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ dot11_mode = mac->mlme_cfg->dot11_mode.dot11_mode;
|
|
|
+ host_phy_mode = wma_chan_phy_mode(freq, chan_width, dot11_mode);
|
|
|
+ *phy_mode = wma_host_to_fw_phymode(host_phy_mode);
|
|
|
+}
|
|
|
+
|
|
|
void wma_get_phy_mode_cb(uint8_t chan, uint32_t chan_width,
|
|
|
enum wlan_phymode *phy_mode)
|
|
|
{
|
|
@@ -3327,6 +3345,9 @@ QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc,
|
|
|
wma_register_debug_callback();
|
|
|
wifi_pos_register_get_phy_mode_cb(wma_handle->psoc,
|
|
|
wma_get_phy_mode_cb);
|
|
|
+ wifi_pos_register_get_fw_phy_mode_for_freq_cb(
|
|
|
+ wma_handle->psoc,
|
|
|
+ wma_get_fw_phy_mode_for_freq_cb);
|
|
|
|
|
|
/* Register callback with PMO so PMO can update the vdev pause bitmap*/
|
|
|
pmo_register_pause_bitmap_notifier(wma_handle->psoc,
|