From 264fe67fd14504f877a0ceaf695046363cbc23b0 Mon Sep 17 00:00:00 2001 From: Rachit Kankane Date: Fri, 2 Nov 2018 15:14:44 +0530 Subject: [PATCH] qcacmn: Set TDLS channel offset correctly Set TDLS channel offset correctly when TDLSSECONDARYCHANNELOFFSET command is sent with offset 20. Change-Id: Ifac48da3fea0c83415f3d30caa2919a559f5c3c5 CRs-Fixed: 2341883 --- umac/regulatory/dispatcher/inc/reg_services_public_struct.h | 3 ++- umac/tdls/core/src/wlan_tdls_ct.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/umac/regulatory/dispatcher/inc/reg_services_public_struct.h b/umac/regulatory/dispatcher/inc/reg_services_public_struct.h index a482c1c31772..cf4829abe8cc 100644 --- a/umac/regulatory/dispatcher/inc/reg_services_public_struct.h +++ b/umac/regulatory/dispatcher/inc/reg_services_public_struct.h @@ -547,7 +547,8 @@ enum offset_t { BW40_LOW_PRIMARY = 1, BW40_HIGH_PRIMARY = 3, BW80, - BWALL + BWALL, + BW_INVALID = 0xFF }; /** diff --git a/umac/tdls/core/src/wlan_tdls_ct.c b/umac/tdls/core/src/wlan_tdls_ct.c index d2fa6bb71acf..f62a5e1fd929 100644 --- a/umac/tdls/core/src/wlan_tdls_ct.c +++ b/umac/tdls/core/src/wlan_tdls_ct.c @@ -975,7 +975,7 @@ int tdls_set_tdls_secoffchanneloffset(struct tdls_soc_priv_obj *tdls_soc, return -ENOTSUPP; } - tdls_soc->tdls_channel_offset = 0; + tdls_soc->tdls_channel_offset = BW_INVALID; switch (offchanoffset) { case TDLS_SEC_OFFCHAN_OFFSET_0: @@ -1054,7 +1054,7 @@ int tdls_set_tdls_offchannelmode(struct wlan_objmgr_vdev *vdev, switch (offchanmode) { case ENABLE_CHANSWITCH: if (tdls_soc->tdls_off_channel && - tdls_soc->tdls_channel_offset) { + tdls_soc->tdls_channel_offset != BW_INVALID) { chan_switch_params.tdls_off_ch = tdls_soc->tdls_off_channel; chan_switch_params.tdls_off_ch_bw_offset =