|
@@ -26,7 +26,7 @@
|
|
#include <wlan_objmgr_psoc_obj.h>
|
|
#include <wlan_objmgr_psoc_obj.h>
|
|
#include <reg_priv_objs.h>
|
|
#include <reg_priv_objs.h>
|
|
#include <reg_services_common.h>
|
|
#include <reg_services_common.h>
|
|
-#include <reg_channel.h>
|
|
|
|
|
|
+#include "reg_channel.h"
|
|
|
|
|
|
#ifdef CONFIG_HOST_FIND_CHAN
|
|
#ifdef CONFIG_HOST_FIND_CHAN
|
|
|
|
|
|
@@ -66,13 +66,23 @@ static inline int is_11a_supported(uint32_t wireless_modes, uint32_t phybitmap)
|
|
!(phybitmap & REGULATORY_PHYMODE_NO11A);
|
|
!(phybitmap & REGULATORY_PHYMODE_NO11A);
|
|
}
|
|
}
|
|
|
|
|
|
-void reg_update_max_phymode_chwidth_for_pdev(
|
|
|
|
- struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj)
|
|
|
|
|
|
+void reg_update_max_phymode_chwidth_for_pdev(struct wlan_objmgr_pdev *pdev)
|
|
{
|
|
{
|
|
- uint32_t wireless_modes = pdev_priv_obj->wireless_modes;
|
|
|
|
- uint32_t phybitmap = pdev_priv_obj->phybitmap;
|
|
|
|
|
|
+ uint32_t wireless_modes;
|
|
|
|
+ uint32_t phybitmap;
|
|
enum phy_ch_width max_chwidth = CH_WIDTH_20MHZ;
|
|
enum phy_ch_width max_chwidth = CH_WIDTH_20MHZ;
|
|
enum reg_phymode max_phymode = REG_PHYMODE_MAX;
|
|
enum reg_phymode max_phymode = REG_PHYMODE_MAX;
|
|
|
|
+ struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
|
|
|
|
+
|
|
|
|
+ pdev_priv_obj = reg_get_pdev_obj(pdev);
|
|
|
|
+
|
|
|
|
+ if (!IS_VALID_PDEV_REG_OBJ(pdev_priv_obj)) {
|
|
|
|
+ reg_err("reg pdev priv obj is NULL");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ wireless_modes = pdev_priv_obj->wireless_modes;
|
|
|
|
+ phybitmap = pdev_priv_obj->phybitmap;
|
|
|
|
|
|
if (is_11ax_supported(wireless_modes, phybitmap)) {
|
|
if (is_11ax_supported(wireless_modes, phybitmap)) {
|
|
max_phymode = REG_PHYMODE_11AX;
|
|
max_phymode = REG_PHYMODE_11AX;
|
|
@@ -110,10 +120,18 @@ void reg_update_max_phymode_chwidth_for_pdev(
|
|
}
|
|
}
|
|
|
|
|
|
void reg_modify_chan_list_for_max_chwidth(
|
|
void reg_modify_chan_list_for_max_chwidth(
|
|
- struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj,
|
|
|
|
|
|
+ struct wlan_objmgr_pdev *pdev,
|
|
struct regulatory_channel *cur_chan_list)
|
|
struct regulatory_channel *cur_chan_list)
|
|
{
|
|
{
|
|
int i;
|
|
int i;
|
|
|
|
+ struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
|
|
|
|
+
|
|
|
|
+ pdev_priv_obj = reg_get_pdev_obj(pdev);
|
|
|
|
+
|
|
|
|
+ if (!IS_VALID_PDEV_REG_OBJ(pdev_priv_obj)) {
|
|
|
|
+ reg_err("reg pdev priv obj is NULL");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
|
|
for (i = 0; i < NUM_CHANNELS; i++) {
|
|
for (i = 0; i < NUM_CHANNELS; i++) {
|
|
struct ch_params chan_params;
|
|
struct ch_params chan_params;
|
|
@@ -180,8 +198,10 @@ bool reg_is_phymode_chwidth_allowed(
|
|
if (pdev_priv_obj->cur_chan_list[i].center_freq != freq)
|
|
if (pdev_priv_obj->cur_chan_list[i].center_freq != freq)
|
|
continue;
|
|
continue;
|
|
|
|
|
|
- if (pdev_priv_obj->cur_chan_list[i].state ==
|
|
|
|
- CHANNEL_STATE_DISABLE)
|
|
|
|
|
|
+ if ((pdev_priv_obj->cur_chan_list[i].state ==
|
|
|
|
+ CHANNEL_STATE_DISABLE) &&
|
|
|
|
+ !(pdev_priv_obj->cur_chan_list[i].nol_chan) &&
|
|
|
|
+ !(pdev_priv_obj->cur_chan_list[i].nol_history))
|
|
return false;
|
|
return false;
|
|
|
|
|
|
if (bw < pdev_priv_obj->cur_chan_list[i].min_bw ||
|
|
if (bw < pdev_priv_obj->cur_chan_list[i].min_bw ||
|