mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
Merge 76a4a79953 on remote branch
Change-Id: Ic432f66aa2f5e525d4a16030c5d5597e899165e0
This commit is contained in:
commit
c1a6899c0e
2 changed files with 124 additions and 10 deletions
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
|
|
@ -1415,7 +1416,7 @@ QDF_STATUS wlan_vdev_get_bss_peer_mac(struct wlan_objmgr_vdev *vdev,
|
|||
|
||||
peer = wlan_objmgr_vdev_try_get_bsspeer(vdev, WLAN_MLME_OBJMGR_ID);
|
||||
if (!peer) {
|
||||
obj_mgr_err("not able to find bss peer for vdev %d",
|
||||
obj_mgr_debug("not able to find bss peer for vdev %d",
|
||||
wlan_vdev_get_id(vdev));
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -1019,12 +1020,118 @@ reg_modify_disable_chan_list_for_unii1_and_unii2a(
|
|||
|
||||
#ifdef CONFIG_BAND_6GHZ
|
||||
#ifdef CONFIG_REG_CLIENT
|
||||
|
||||
#ifdef CONFIG_AFC_SUPPORT
|
||||
/**
|
||||
* reg_append_mas_chan_list_for_6g_sp() - Append SP channels to the master
|
||||
* channel list
|
||||
* @pdev_priv_obj: Pointer to pdev private object
|
||||
*
|
||||
* This function appends SP channels to the master channel list
|
||||
*
|
||||
* Return: void.
|
||||
*/
|
||||
static void
|
||||
reg_append_mas_chan_list_for_6g_sp(struct wlan_regulatory_pdev_priv_obj
|
||||
*pdev_priv_obj)
|
||||
{
|
||||
struct regulatory_channel *master_chan_list_6g_client_sp;
|
||||
|
||||
master_chan_list_6g_client_sp = pdev_priv_obj->afc_chan_list;
|
||||
|
||||
qdf_mem_copy(&pdev_priv_obj->mas_chan_list[MIN_6GHZ_CHANNEL],
|
||||
master_chan_list_6g_client_sp,
|
||||
NUM_6GHZ_CHANNELS *
|
||||
sizeof(struct regulatory_channel));
|
||||
}
|
||||
#else
|
||||
static inline void
|
||||
reg_append_mas_chan_list_for_6g_sp(struct wlan_regulatory_pdev_priv_obj
|
||||
*pdev_priv_obj)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* reg_append_mas_chan_list_for_6g_lpi() - Append LPI channels to the master
|
||||
* channel list
|
||||
* @pdev_priv_obj: Pointer to pdev private object
|
||||
*
|
||||
* This function appends LPI channels to the master channel list
|
||||
*
|
||||
* Return: void.
|
||||
*/
|
||||
static void
|
||||
reg_append_mas_chan_list_for_6g_lpi(struct wlan_regulatory_pdev_priv_obj
|
||||
*pdev_priv_obj)
|
||||
{
|
||||
struct regulatory_channel *master_chan_list_6g_client_lpi;
|
||||
uint8_t i, j;
|
||||
|
||||
if (!pdev_priv_obj->reg_rules.num_of_6g_ap_reg_rules[REG_INDOOR_AP]) {
|
||||
reg_debug("No LPI reg rules");
|
||||
return;
|
||||
}
|
||||
|
||||
master_chan_list_6g_client_lpi =
|
||||
pdev_priv_obj->mas_chan_list_6g_client[REG_INDOOR_AP]
|
||||
[pdev_priv_obj->reg_cur_6g_client_mobility_type];
|
||||
|
||||
for (i = MIN_6GHZ_CHANNEL, j = 0;
|
||||
i <= MAX_6GHZ_CHANNEL && j < NUM_6GHZ_CHANNELS; i++, j++) {
|
||||
if ((pdev_priv_obj->mas_chan_list[i].state ==
|
||||
CHANNEL_STATE_DISABLE) ||
|
||||
(pdev_priv_obj->mas_chan_list[i].chan_flags &
|
||||
REGULATORY_CHAN_DISABLED)) {
|
||||
qdf_mem_copy(&pdev_priv_obj->mas_chan_list[i],
|
||||
&master_chan_list_6g_client_lpi[j],
|
||||
sizeof(struct regulatory_channel));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* reg_append_mas_chan_list_for_6g_VLP() - Append VLP channels to the master
|
||||
* channel list
|
||||
* @pdev_priv_obj: Pointer to pdev private object
|
||||
*
|
||||
* This function appends VLP channels to the master channel list
|
||||
*
|
||||
* Return: void.
|
||||
*/
|
||||
static void
|
||||
reg_append_mas_chan_list_for_6g_vlp(struct wlan_regulatory_pdev_priv_obj
|
||||
*pdev_priv_obj)
|
||||
{
|
||||
struct regulatory_channel *master_chan_list_6g_client_vlp;
|
||||
uint8_t i, j;
|
||||
|
||||
if (!pdev_priv_obj->reg_rules.num_of_6g_ap_reg_rules[REG_VERY_LOW_POWER_AP]) {
|
||||
reg_debug("No VLP reg rules");
|
||||
return;
|
||||
}
|
||||
|
||||
master_chan_list_6g_client_vlp =
|
||||
pdev_priv_obj->mas_chan_list_6g_client[REG_VERY_LOW_POWER_AP]
|
||||
[pdev_priv_obj->reg_cur_6g_client_mobility_type];
|
||||
|
||||
for (i = MIN_6GHZ_CHANNEL, j = 0;
|
||||
i <= MAX_6GHZ_CHANNEL && j < NUM_6GHZ_CHANNELS; i++, j++) {
|
||||
if ((pdev_priv_obj->mas_chan_list[i].state ==
|
||||
CHANNEL_STATE_DISABLE) ||
|
||||
(pdev_priv_obj->mas_chan_list[i].chan_flags &
|
||||
REGULATORY_CHAN_DISABLED)) {
|
||||
qdf_mem_copy(&pdev_priv_obj->mas_chan_list[i],
|
||||
&master_chan_list_6g_client_vlp[j],
|
||||
sizeof(struct regulatory_channel));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
reg_append_mas_chan_list_for_6g(struct wlan_regulatory_pdev_priv_obj
|
||||
*pdev_priv_obj)
|
||||
{
|
||||
struct regulatory_channel *master_chan_list_6g_client;
|
||||
|
||||
if (pdev_priv_obj->reg_cur_6g_ap_pwr_type >= REG_CURRENT_MAX_AP_TYPE ||
|
||||
pdev_priv_obj->reg_cur_6g_client_mobility_type >=
|
||||
REG_MAX_CLIENT_TYPE) {
|
||||
|
|
@ -1032,14 +1139,20 @@ reg_append_mas_chan_list_for_6g(struct wlan_regulatory_pdev_priv_obj
|
|||
return;
|
||||
}
|
||||
|
||||
master_chan_list_6g_client =
|
||||
pdev_priv_obj->mas_chan_list_6g_client[REG_INDOOR_AP]
|
||||
[pdev_priv_obj->reg_cur_6g_client_mobility_type];
|
||||
/* Client should be able to scan all types of APs, so prepare the
|
||||
* client list which has all the enabled channels, first priority is
|
||||
* given to AFC power type and then second priority is decided based on
|
||||
* gindoor_channel_support ini value
|
||||
*/
|
||||
reg_append_mas_chan_list_for_6g_sp(pdev_priv_obj);
|
||||
|
||||
qdf_mem_copy(&pdev_priv_obj->mas_chan_list[MIN_6GHZ_CHANNEL],
|
||||
master_chan_list_6g_client,
|
||||
NUM_6GHZ_CHANNELS *
|
||||
sizeof(struct regulatory_channel));
|
||||
if (pdev_priv_obj->indoor_chan_enabled) {
|
||||
reg_append_mas_chan_list_for_6g_lpi(pdev_priv_obj);
|
||||
reg_append_mas_chan_list_for_6g_vlp(pdev_priv_obj);
|
||||
} else {
|
||||
reg_append_mas_chan_list_for_6g_vlp(pdev_priv_obj);
|
||||
reg_append_mas_chan_list_for_6g_lpi(pdev_priv_obj);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Reference in a new issue