qcacld-3.0: Use freq instead of chan num for TDLS pref offchannel
Use frequency instead of chan num for processing TDLS offchannel req for preferred offchannel. Since, after introduction of TDLS on 6 GHz band it is better to process offchannel in frequency instead of channel numbers as some of the channel numbers are repeated for 6 GHz. Change-Id: Icd7084b9f3c407ad0ad104b7f0d2230e31e0b10d CRs-Fixed: 3234920
This commit is contained in:

committed by
Madan Koyyalamudi

parent
c71b2f66dc
commit
fa29fba7e4
@@ -1918,16 +1918,16 @@ static QDF_STATUS tdls_config_force_peer(
|
||||
}
|
||||
|
||||
soc_obj->tdls_external_peer_count++;
|
||||
chan_freq = wlan_reg_legacy_chan_to_freq(pdev, req->chan);
|
||||
chan_freq = req->ch_freq;
|
||||
|
||||
/* Validate if off channel is DFS channel */
|
||||
if (wlan_reg_is_dfs_for_freq(pdev, chan_freq)) {
|
||||
tdls_err("Resetting TDLS off-channel from %d to %d",
|
||||
req->chan, WLAN_TDLS_PREFERRED_OFF_CHANNEL_NUM_DEF);
|
||||
req->chan = WLAN_TDLS_PREFERRED_OFF_CHANNEL_NUM_DEF;
|
||||
tdls_err("Resetting TDLS off-channel freq from %d to %d",
|
||||
req->ch_freq, WLAN_TDLS_PREFERRED_OFF_CHANNEL_FRQ_DEF);
|
||||
req->ch_freq = WLAN_TDLS_PREFERRED_OFF_CHANNEL_FRQ_DEF;
|
||||
}
|
||||
tdls_set_extctrl_param(peer, req->chan, req->max_latency, req->op_class,
|
||||
req->min_bandwidth);
|
||||
tdls_set_extctrl_param(peer, req->ch_freq, req->max_latency,
|
||||
req->op_class, req->min_bandwidth);
|
||||
|
||||
tdls_set_callback(peer, req->callback);
|
||||
|
||||
@@ -1954,7 +1954,10 @@ QDF_STATUS tdls_process_setup_peer(struct tdls_oper_request *req)
|
||||
struct tdls_soc_priv_obj *soc_obj;
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
QDF_STATUS status;
|
||||
uint8_t reg_bw_offset;
|
||||
uint8_t reg_bw_offset = 0;
|
||||
qdf_freq_t pref_freq;
|
||||
uint32_t pref_width;
|
||||
struct wlan_objmgr_pdev *pdev;
|
||||
|
||||
tdls_debug("Configure external TDLS peer " QDF_MAC_ADDR_FMT,
|
||||
QDF_MAC_ADDR_REF(req->peer_addr));
|
||||
@@ -1978,15 +1981,27 @@ QDF_STATUS tdls_process_setup_peer(struct tdls_oper_request *req)
|
||||
goto error;
|
||||
}
|
||||
|
||||
peer_req.chan = soc_obj->tdls_configs.tdls_pre_off_chan_num;
|
||||
pref_freq = tdls_get_offchan_freq(vdev, soc_obj);
|
||||
pdev = wlan_vdev_get_pdev(vdev);
|
||||
if (!pdev) {
|
||||
tdls_err("NULL pdev object");
|
||||
status = QDF_STATUS_E_INVAL;
|
||||
goto error;
|
||||
}
|
||||
|
||||
peer_req.ch_freq = pref_freq;
|
||||
pref_width = tdls_get_offchan_bw(soc_obj, pref_freq);
|
||||
|
||||
if (!peer_req.op_class)
|
||||
peer_req.op_class = tdls_get_opclass_from_bandwidth(
|
||||
soc_obj, peer_req.chan,
|
||||
soc_obj->tdls_configs.tdls_pre_off_chan_bw,
|
||||
peer_req.op_class = tdls_get_opclass_from_bandwidth(vdev,
|
||||
pref_freq,
|
||||
pref_width,
|
||||
®_bw_offset);
|
||||
|
||||
tdls_debug("peer chan %d peer opclass %d", peer_req.chan,
|
||||
peer_req.op_class);
|
||||
tdls_debug("peer chan %d peer opclass %d reg_bw_offset %d",
|
||||
peer_req.ch_freq,
|
||||
peer_req.op_class,
|
||||
reg_bw_offset);
|
||||
status = tdls_config_force_peer(&peer_req);
|
||||
error:
|
||||
wlan_objmgr_vdev_release_ref(vdev, WLAN_TDLS_NB_ID);
|
||||
|
@@ -27,6 +27,7 @@
|
||||
#include "wlan_tdls_peer.h"
|
||||
#include "wlan_tdls_ct.h"
|
||||
#include "wlan_tdls_cmds_process.h"
|
||||
#include "wlan_reg_services_api.h"
|
||||
|
||||
bool tdls_is_vdev_authenticated(struct wlan_objmgr_vdev *vdev)
|
||||
{
|
||||
@@ -1053,7 +1054,7 @@ int tdls_set_tdls_offchannelmode(struct wlan_objmgr_vdev *vdev,
|
||||
struct tdls_vdev_priv_obj *tdls_vdev;
|
||||
struct tdls_soc_priv_obj *tdls_soc;
|
||||
uint32_t tdls_feature_flags;
|
||||
|
||||
struct wlan_objmgr_pdev *pdev = wlan_vdev_get_pdev(vdev);
|
||||
|
||||
status = tdls_get_vdev_objects(vdev, &tdls_vdev, &tdls_soc);
|
||||
|
||||
@@ -1120,13 +1121,14 @@ int tdls_set_tdls_offchannelmode(struct wlan_objmgr_vdev *vdev,
|
||||
chan_switch_params.oper_class);
|
||||
}
|
||||
} else if (conn_peer->off_channel_capable &&
|
||||
conn_peer->pref_off_chan_num) {
|
||||
conn_peer->pref_off_chan_freq) {
|
||||
chan_switch_params.tdls_off_ch =
|
||||
conn_peer->pref_off_chan_num;
|
||||
wlan_reg_freq_to_chan(pdev,
|
||||
conn_peer->pref_off_chan_freq);
|
||||
chan_switch_params.oper_class =
|
||||
tdls_get_opclass_from_bandwidth(
|
||||
tdls_soc, conn_peer->pref_off_chan_num,
|
||||
tdls_soc->tdls_configs.tdls_pre_off_chan_bw,
|
||||
vdev, conn_peer->pref_off_chan_freq,
|
||||
conn_peer->pref_off_chan_width,
|
||||
&chan_switch_params.tdls_off_ch_bw_offset);
|
||||
} else {
|
||||
tdls_err("TDLS off-channel parameters are not set yet!!!");
|
||||
@@ -1177,8 +1179,10 @@ int tdls_set_tdls_offchannelmode(struct wlan_objmgr_vdev *vdev,
|
||||
tdls_err("No TDLS Connected Peer");
|
||||
return -EPERM;
|
||||
}
|
||||
conn_peer->pref_off_chan_num =
|
||||
chan_switch_params.tdls_off_ch;
|
||||
conn_peer->pref_off_chan_freq = wlan_reg_chan_opclass_to_freq(
|
||||
chan_switch_params.tdls_off_ch,
|
||||
chan_switch_params.oper_class,
|
||||
false);
|
||||
conn_peer->op_class_for_pref_off_chan =
|
||||
chan_switch_params.oper_class;
|
||||
}
|
||||
|
@@ -1956,37 +1956,62 @@ void tdls_scan_serialization_comp_info_cb(struct wlan_objmgr_vdev *vdev,
|
||||
comp_info->scan_info.is_tdls_in_progress = true;
|
||||
}
|
||||
|
||||
static uint8_t tdls_find_opclass_frm_freq(struct wlan_objmgr_vdev *vdev,
|
||||
qdf_freq_t ch_freq, uint8_t bw_offset,
|
||||
uint16_t behav_limit)
|
||||
{
|
||||
struct wlan_objmgr_pdev *pdev = wlan_vdev_get_pdev(vdev);
|
||||
uint8_t channel, opclass;
|
||||
|
||||
uint8_t tdls_get_opclass_from_bandwidth(struct tdls_soc_priv_obj *soc_obj,
|
||||
uint8_t channel, uint8_t bw_offset,
|
||||
if (!pdev) {
|
||||
tdls_err("pdev is NULL");
|
||||
return 0;
|
||||
}
|
||||
|
||||
wlan_reg_freq_width_to_chan_op_class(pdev, ch_freq, bw_offset, false,
|
||||
BIT(behav_limit), &opclass,
|
||||
&channel);
|
||||
|
||||
return opclass;
|
||||
}
|
||||
|
||||
uint8_t tdls_get_opclass_from_bandwidth(struct wlan_objmgr_vdev *vdev,
|
||||
qdf_freq_t freq, uint8_t bw_offset,
|
||||
uint8_t *reg_bw_offset)
|
||||
{
|
||||
uint8_t opclass;
|
||||
|
||||
if (bw_offset & (1 << BW_160_OFFSET_BIT)) {
|
||||
opclass = tdls_find_opclass(soc_obj->soc,
|
||||
channel, BWALL);
|
||||
opclass = tdls_find_opclass_frm_freq(vdev,
|
||||
freq, BW_160_MHZ,
|
||||
BEHAV_NONE);
|
||||
*reg_bw_offset = BWALL;
|
||||
} else if (bw_offset & (1 << BW_80_OFFSET_BIT)) {
|
||||
opclass = tdls_find_opclass(soc_obj->soc,
|
||||
channel, BW80);
|
||||
opclass = tdls_find_opclass_frm_freq(vdev,
|
||||
freq, BW_80_MHZ,
|
||||
BEHAV_NONE);
|
||||
*reg_bw_offset = BW80;
|
||||
} else if (bw_offset & (1 << BW_40_OFFSET_BIT)) {
|
||||
opclass = tdls_find_opclass(soc_obj->soc,
|
||||
channel, BW40_LOW_PRIMARY);
|
||||
opclass = tdls_find_opclass_frm_freq(vdev,
|
||||
freq, BW_40_MHZ,
|
||||
BEHAV_BW40_LOW_PRIMARY);
|
||||
*reg_bw_offset = BW40_LOW_PRIMARY;
|
||||
if (!opclass) {
|
||||
opclass = tdls_find_opclass(soc_obj->soc,
|
||||
channel, BW40_HIGH_PRIMARY);
|
||||
opclass = tdls_find_opclass_frm_freq(vdev,
|
||||
freq,
|
||||
BW_40_MHZ,
|
||||
BEHAV_BW40_HIGH_PRIMARY);
|
||||
*reg_bw_offset = BW40_HIGH_PRIMARY;
|
||||
}
|
||||
} else if (bw_offset & (1 << BW_20_OFFSET_BIT)) {
|
||||
opclass = tdls_find_opclass(soc_obj->soc,
|
||||
channel, BW20);
|
||||
opclass = tdls_find_opclass_frm_freq(vdev,
|
||||
freq, BW_20_MHZ,
|
||||
BEHAV_NONE);
|
||||
*reg_bw_offset = BW20;
|
||||
} else {
|
||||
opclass = tdls_find_opclass(soc_obj->soc,
|
||||
channel, BWALL);
|
||||
opclass = tdls_find_opclass_frm_freq(vdev,
|
||||
freq, BW_160_MHZ,
|
||||
BEHAV_NONE);
|
||||
*reg_bw_offset = BWALL;
|
||||
}
|
||||
|
||||
|
@@ -319,7 +319,7 @@ struct tdls_peer_mlme_info {
|
||||
* @supported_oper_classes: supported operation classes
|
||||
* @is_forced_peer: is forced peer
|
||||
* @op_class_for_pref_off_chan: op class for preferred off channel
|
||||
* @pref_off_chan_num: preferred off channel number
|
||||
* @pref_off_chan_freq: preferred off channel frequency
|
||||
* @pref_off_chan_width: preferred off channel width
|
||||
* @peer_idle_timer: time to check idle traffic in tdls peers
|
||||
* @is_peer_idle_timer_initialised: Flag to check idle timer init
|
||||
@@ -351,7 +351,7 @@ struct tdls_peer {
|
||||
uint8_t supported_oper_classes[WLAN_MAX_SUPP_OPER_CLASSES];
|
||||
bool is_forced_peer;
|
||||
uint8_t op_class_for_pref_off_chan;
|
||||
uint8_t pref_off_chan_num;
|
||||
qdf_freq_t pref_off_chan_freq;
|
||||
uint8_t pref_off_chan_width;
|
||||
qdf_mc_timer_t peer_idle_timer;
|
||||
bool is_peer_idle_timer_initialised;
|
||||
@@ -803,8 +803,8 @@ QDF_STATUS tdls_delete_all_peers_indication(struct wlan_objmgr_psoc *psoc,
|
||||
/**
|
||||
* tdls_get_opclass_from_bandwidth() - Return opclass for corresponding BW and
|
||||
* channel.
|
||||
* @soc_obj: tdls soc object.
|
||||
* @channel: Channel number.
|
||||
* @vdev: Pointer to vdev
|
||||
* @freq: Channel frequency.
|
||||
* @bw_offset: Bandwidth offset.
|
||||
* @reg_bw_offset: enum offset_t type bandwidth
|
||||
*
|
||||
@@ -812,7 +812,7 @@ QDF_STATUS tdls_delete_all_peers_indication(struct wlan_objmgr_psoc *psoc,
|
||||
*
|
||||
* Return: opclass
|
||||
*/
|
||||
uint8_t tdls_get_opclass_from_bandwidth(struct tdls_soc_priv_obj *soc_obj,
|
||||
uint8_t channel, uint8_t bw_offset,
|
||||
uint8_t tdls_get_opclass_from_bandwidth(struct wlan_objmgr_vdev *vdev,
|
||||
qdf_freq_t freq, uint8_t bw_offset,
|
||||
uint8_t *reg_bw_offset);
|
||||
#endif
|
||||
|
@@ -147,31 +147,77 @@ uint8_t tdls_find_opclass(struct wlan_objmgr_psoc *psoc, uint8_t channel,
|
||||
bw_offset);
|
||||
}
|
||||
|
||||
static void tdls_fill_pref_off_chan_num(struct tdls_vdev_priv_obj *vdev_obj,
|
||||
#ifdef WLAN_FEATURE_11AX
|
||||
qdf_freq_t tdls_get_offchan_freq(struct wlan_objmgr_vdev *vdev,
|
||||
struct tdls_soc_priv_obj *soc_obj)
|
||||
{
|
||||
struct wlan_objmgr_pdev *pdev = wlan_vdev_get_pdev(vdev);
|
||||
qdf_freq_t pref_freq, pref_6g_freq;
|
||||
uint8_t pref_non6g_ch;
|
||||
|
||||
if (!pdev) {
|
||||
tdls_err("pdev is NULL");
|
||||
return 0;
|
||||
}
|
||||
|
||||
pref_6g_freq = soc_obj->tdls_configs.tdls_pre_off_chan_freq_6g;
|
||||
pref_non6g_ch = soc_obj->tdls_configs.tdls_pre_off_chan_num;
|
||||
|
||||
/*
|
||||
* Fill preffered offchannel frequency here. If TDLS on 6 GHz is
|
||||
* allowed then fill pref 6 GHz frequency
|
||||
* Otherwise, fill 5 GHz preferred frequency
|
||||
*/
|
||||
if (pref_6g_freq && tdls_is_6g_freq_allowed(vdev, pref_6g_freq))
|
||||
pref_freq = pref_6g_freq;
|
||||
else
|
||||
pref_freq = wlan_reg_legacy_chan_to_freq(pdev, pref_non6g_ch);
|
||||
|
||||
return pref_freq;
|
||||
}
|
||||
|
||||
#else
|
||||
qdf_freq_t tdls_get_offchan_freq(struct wlan_objmgr_vdev *vdev,
|
||||
struct tdls_soc_priv_obj *soc_obj)
|
||||
{
|
||||
struct wlan_objmgr_pdev *pdev = wlan_vdev_get_pdev(vdev);
|
||||
uint32_t pref_leg_chan = soc_obj->tdls_configs.tdls_pre_off_chan_num;
|
||||
|
||||
if (!pdev) {
|
||||
tdls_err("pdev is NULL");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return wlan_reg_legacy_chan_to_freq(pdev, pref_leg_chan);
|
||||
}
|
||||
#endif
|
||||
|
||||
uint32_t tdls_get_offchan_bw(struct tdls_soc_priv_obj *soc_obj,
|
||||
qdf_freq_t off_chan_freq)
|
||||
{
|
||||
uint32_t pre_off_chan_bw;
|
||||
|
||||
if (wlan_reg_is_5ghz_ch_freq(off_chan_freq) &&
|
||||
CHECK_BIT(soc_obj->tdls_configs.tdls_pre_off_chan_bw,
|
||||
BW_160_OFFSET_BIT))
|
||||
pre_off_chan_bw = soc_obj->tdls_configs.tdls_pre_off_chan_bw &
|
||||
~(1 << BW_160_OFFSET_BIT);
|
||||
else
|
||||
pre_off_chan_bw = soc_obj->tdls_configs.tdls_pre_off_chan_bw;
|
||||
|
||||
return pre_off_chan_bw;
|
||||
}
|
||||
|
||||
static void tdls_fill_pref_off_chan_info(struct tdls_vdev_priv_obj *vdev_obj,
|
||||
struct tdls_soc_priv_obj *soc_obj,
|
||||
struct tdls_peer *peer)
|
||||
{
|
||||
struct wlan_objmgr_pdev *pdev = wlan_vdev_get_pdev(vdev_obj->vdev);
|
||||
|
||||
/*
|
||||
* Fill preffered offchannel number here and prefferd bw here.
|
||||
* Bw and channel number can be used to later calculate Op_class
|
||||
* which will be used to identify the channels
|
||||
*/
|
||||
peer->pref_off_chan_width = soc_obj->tdls_configs.tdls_pre_off_chan_bw;
|
||||
|
||||
if (soc_obj->tdls_configs.tdls_pre_off_chan_freq_6g &&
|
||||
tdls_is_6g_freq_allowed(vdev_obj->vdev,
|
||||
soc_obj->tdls_configs.tdls_pre_off_chan_freq_6g)) {
|
||||
peer->pref_off_chan_num =
|
||||
wlan_reg_freq_to_chan(pdev,
|
||||
soc_obj->tdls_configs.tdls_pre_off_chan_freq_6g);
|
||||
} else {
|
||||
peer->pref_off_chan_num =
|
||||
soc_obj->tdls_configs.tdls_pre_off_chan_num;
|
||||
if (CHECK_BIT(peer->pref_off_chan_width, BW_160_OFFSET_BIT))
|
||||
peer->pref_off_chan_width &= ~(1 << BW_160_OFFSET_BIT);
|
||||
}
|
||||
peer->pref_off_chan_freq = tdls_get_offchan_freq(vdev_obj->vdev,
|
||||
soc_obj);
|
||||
peer->pref_off_chan_width = tdls_get_offchan_bw(soc_obj,
|
||||
peer->pref_off_chan_freq);
|
||||
tdls_debug("Pref off channel freq %d chan width %d",
|
||||
peer->pref_off_chan_freq, peer->pref_off_chan_width);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -208,11 +254,11 @@ static struct tdls_peer *tdls_add_peer(struct tdls_vdev_priv_obj *vdev_obj,
|
||||
qdf_mem_copy(&peer->peer_mac, macaddr, sizeof(peer->peer_mac));
|
||||
peer->vdev_priv = vdev_obj;
|
||||
|
||||
tdls_fill_pref_off_chan_num(vdev_obj, soc_obj, peer);
|
||||
tdls_fill_pref_off_chan_info(vdev_obj, soc_obj, peer);
|
||||
peer->op_class_for_pref_off_chan =
|
||||
tdls_get_opclass_from_bandwidth(
|
||||
soc_obj, peer->pref_off_chan_num,
|
||||
soc_obj->tdls_configs.tdls_pre_off_chan_bw,
|
||||
vdev_obj->vdev, peer->pref_off_chan_freq,
|
||||
peer->pref_off_chan_width,
|
||||
®_bw_offset);
|
||||
|
||||
peer->valid_entry = false;
|
||||
@@ -436,7 +482,8 @@ static void tdls_determine_channel_opclass(struct tdls_soc_priv_obj *soc_obj,
|
||||
&vdev_id));
|
||||
*opclass = 0;
|
||||
} else {
|
||||
*channel = peer->pref_off_chan_num;
|
||||
*channel = wlan_reg_freq_to_chan(pdev,
|
||||
peer->pref_off_chan_freq);
|
||||
*opclass = peer->op_class_for_pref_off_chan;
|
||||
}
|
||||
tdls_debug("channel:%d opclass:%d", *channel, *opclass);
|
||||
@@ -531,11 +578,13 @@ void tdls_extract_peer_state_param(struct tdls_peer_update_state *peer_param,
|
||||
peer_param->peer_cap.peer_curr_operclass = 0;
|
||||
peer_param->peer_cap.self_curr_operclass =
|
||||
peer->op_class_for_pref_off_chan;
|
||||
peer_param->peer_cap.pref_off_channum = peer->pref_off_chan_num;
|
||||
peer_param->peer_cap.pref_off_channum = wlan_reg_freq_to_chan(pdev,
|
||||
peer->pref_off_chan_freq);
|
||||
peer_param->peer_cap.pref_off_chan_bandwidth =
|
||||
peer->pref_off_chan_width;
|
||||
peer_param->peer_cap.opclass_for_prefoffchan =
|
||||
peer->op_class_for_pref_off_chan;
|
||||
peer_param->peer_cap.pref_offchan_freq = peer->pref_off_chan_freq;
|
||||
|
||||
if (QDF_STATUS_SUCCESS != ucfg_reg_get_band(pdev, &cur_band)) {
|
||||
tdls_err("not able get the current frequency band");
|
||||
@@ -546,16 +595,22 @@ void tdls_extract_peer_state_param(struct tdls_peer_update_state *peer_param,
|
||||
tdls_err("sending the offchannel value as 0 as only 2g is supported");
|
||||
peer_param->peer_cap.pref_off_channum = 0;
|
||||
peer_param->peer_cap.opclass_for_prefoffchan = 0;
|
||||
peer_param->peer_cap.pref_offchan_freq = 0;
|
||||
}
|
||||
|
||||
ch_freq = wlan_reg_legacy_chan_to_freq(pdev,
|
||||
peer_param->peer_cap.pref_off_channum);
|
||||
ch_freq = peer->pref_off_chan_freq;
|
||||
if (wlan_reg_is_dfs_for_freq(pdev, ch_freq)) {
|
||||
/*
|
||||
* If pref_off_chan_freq is DFS frequency, that means it is 5Ghz
|
||||
* case. So, reset to default 5 GHz frequency
|
||||
*/
|
||||
tdls_err("Resetting TDLS off-channel from %d to %d",
|
||||
peer_param->peer_cap.pref_off_channum,
|
||||
WLAN_TDLS_PREFERRED_OFF_CHANNEL_NUM_DEF);
|
||||
peer_param->peer_cap.pref_off_channum =
|
||||
WLAN_TDLS_PREFERRED_OFF_CHANNEL_NUM_DEF;
|
||||
peer_param->peer_cap.pref_offchan_freq =
|
||||
WLAN_TDLS_PREFERRED_OFF_CHANNEL_FRQ_DEF;
|
||||
}
|
||||
|
||||
num = 0;
|
||||
@@ -862,7 +917,7 @@ QDF_STATUS tdls_set_callback(struct tdls_peer *peer,
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS tdls_set_extctrl_param(struct tdls_peer *peer, uint32_t chan,
|
||||
QDF_STATUS tdls_set_extctrl_param(struct tdls_peer *peer, qdf_freq_t ch_freq,
|
||||
uint32_t max_latency, uint32_t op_class,
|
||||
uint32_t min_bandwidth)
|
||||
{
|
||||
@@ -871,7 +926,7 @@ QDF_STATUS tdls_set_extctrl_param(struct tdls_peer *peer, uint32_t chan,
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
peer->op_class_for_pref_off_chan = (uint8_t)op_class;
|
||||
peer->pref_off_chan_num = (uint8_t)chan;
|
||||
peer->pref_off_chan_freq = ch_freq;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
@@ -898,11 +953,11 @@ QDF_STATUS tdls_reset_peer(struct tdls_vdev_priv_obj *vdev_obj,
|
||||
|
||||
if (!curr_peer->is_forced_peer) {
|
||||
config = &soc_obj->tdls_configs;
|
||||
tdls_fill_pref_off_chan_num(vdev_obj, soc_obj, curr_peer);
|
||||
tdls_fill_pref_off_chan_info(vdev_obj, soc_obj, curr_peer);
|
||||
curr_peer->op_class_for_pref_off_chan =
|
||||
tdls_get_opclass_from_bandwidth(
|
||||
soc_obj, curr_peer->pref_off_chan_num,
|
||||
soc_obj->tdls_configs.tdls_pre_off_chan_bw,
|
||||
vdev_obj->vdev, curr_peer->pref_off_chan_freq,
|
||||
curr_peer->pref_off_chan_width,
|
||||
®_bw_offset);
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2017-2019 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
|
||||
@@ -122,6 +123,32 @@ tdls_find_first_connected_peer(struct tdls_vdev_priv_obj *vdev_obj);
|
||||
struct tdls_peer *tdls_is_progress(struct tdls_vdev_priv_obj *vdev_obj,
|
||||
const uint8_t *macaddr, uint8_t skip_self);
|
||||
|
||||
/**
|
||||
* tdls_get_offchan_freq() - Get preffered offchannel frequency
|
||||
* @vdev: Pointer to vdev
|
||||
* @soc_obj: TDLS SOC object
|
||||
*
|
||||
* This function gets preffered offchannel frequency.
|
||||
*
|
||||
* Return: Preferred offchannel frequency
|
||||
*/
|
||||
qdf_freq_t tdls_get_offchan_freq(struct wlan_objmgr_vdev *vdev,
|
||||
struct tdls_soc_priv_obj *soc_obj);
|
||||
|
||||
/**
|
||||
* tdls_get_offchan_freq() - Get preffered offchannel bandwidth on basis of
|
||||
* frequency
|
||||
* @soc_obj: TDLS SOC object
|
||||
* @off_chan_freq: Offchannel frequency
|
||||
*
|
||||
*
|
||||
* This function gets preffered offchannel bandwidth on basis of frequency.
|
||||
*
|
||||
* Return: Preferred offchannel bw
|
||||
*/
|
||||
uint32_t tdls_get_offchan_bw(struct tdls_soc_priv_obj *soc_obj,
|
||||
qdf_freq_t off_chan_freq);
|
||||
|
||||
/**
|
||||
* tdls_extract_peer_state_param() - extract peer update params from TDL peer
|
||||
* @peer_param: output peer update params
|
||||
@@ -200,7 +227,7 @@ QDF_STATUS tdls_set_callback(struct tdls_peer *peer,
|
||||
/**
|
||||
* tdls_set_extctrl_param() - set external control parameter on TDLS peer
|
||||
* @peer: TDLS peer
|
||||
* @chan: channel
|
||||
* @ch_freq: channel frequency
|
||||
* @max_latency: maximum latency
|
||||
* @op_class: operation class
|
||||
* @min_bandwidth: minimal bandwidth
|
||||
@@ -209,7 +236,7 @@ QDF_STATUS tdls_set_callback(struct tdls_peer *peer,
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS if success; other values if failed
|
||||
*/
|
||||
QDF_STATUS tdls_set_extctrl_param(struct tdls_peer *peer, uint32_t chan,
|
||||
QDF_STATUS tdls_set_extctrl_param(struct tdls_peer *peer, qdf_freq_t ch_freq,
|
||||
uint32_t max_latency, uint32_t op_class,
|
||||
uint32_t min_bandwidth);
|
||||
|
||||
|
@@ -50,6 +50,8 @@
|
||||
#define WLAN_TDLS_PREFERRED_OFF_CHANNEL_NUM_MIN 1
|
||||
#define WLAN_TDLS_PREFERRED_OFF_CHANNEL_NUM_MAX 165
|
||||
#define WLAN_TDLS_PREFERRED_OFF_CHANNEL_NUM_DEF 36
|
||||
#define WLAN_TDLS_PREFERRED_OFF_CHANNEL_FRQ_DEF 5180
|
||||
|
||||
|
||||
#define AC_PRIORITY_NUM 4
|
||||
|
||||
@@ -847,6 +849,7 @@ struct tdls_oper_request {
|
||||
* @vdev: vdev object
|
||||
* @peer_addr: MAC address of the TDLS peer
|
||||
* @chan: channel
|
||||
* @ch_freq: ch_freq
|
||||
* @max_latency: maximum latency
|
||||
* @op_class: operation class
|
||||
* @min_bandwidth: minimal bandwidth
|
||||
@@ -856,6 +859,7 @@ struct tdls_oper_config_force_peer_request {
|
||||
struct wlan_objmgr_vdev *vdev;
|
||||
uint8_t peer_addr[QDF_MAC_ADDR_SIZE];
|
||||
uint32_t chan;
|
||||
qdf_freq_t ch_freq;
|
||||
uint32_t max_latency;
|
||||
uint32_t op_class;
|
||||
uint32_t min_bandwidth;
|
||||
|
Reference in New Issue
Block a user