summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjitiphil <jitiphil@codeaurora.org>2018-05-11 15:54:38 +0530
committernshrivas <nshrivas@codeaurora.org>2018-05-18 11:13:37 -0700
commit04ce4883531bf78ac5b9b597ab76f53e7446af86 (patch)
treeaa971442f3f54bbda2e67b8367470a8139583644
parentb035d04338a3e2c123b9d177c3b95cbbe6660eaa (diff)
qcacld-3.0: Invalid checks for operating channel validation
Inside hdd_ndi_create_req_handler(), we need to check if the operating channel is valid. The current checks do not ensure the operating channel is checked against all valid values. Correct the check condition to validate the operating channel against all valid values. Change-Id: I01c035b996ab26779ee005bef437393875fdd95a CRs-Fixed: 2233118
-rw-r--r--core/hdd/src/wlan_hdd_nan_datapath.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/hdd/src/wlan_hdd_nan_datapath.c b/core/hdd/src/wlan_hdd_nan_datapath.c
index ecaa09979ad1..90a72a179bc8 100644
--- a/core/hdd/src/wlan_hdd_nan_datapath.c
+++ b/core/hdd/src/wlan_hdd_nan_datapath.c
@@ -451,8 +451,8 @@ static int hdd_ndi_create_req_handler(hdd_context_t *hdd_ctx,
* does not have any such formal requests. The NDI create request
* is responsible for starting the BSS as well.
*/
- if (op_channel != NAN_SOCIAL_CHANNEL_2_4GHZ ||
- op_channel != NAN_SOCIAL_CHANNEL_5GHZ_LOWER_BAND ||
+ if (op_channel != NAN_SOCIAL_CHANNEL_2_4GHZ &&
+ op_channel != NAN_SOCIAL_CHANNEL_5GHZ_LOWER_BAND &&
op_channel != NAN_SOCIAL_CHANNEL_5GHZ_UPPER_BAND) {
/* start NDI on the default 2.4 GHz social channel */
op_channel = NAN_SOCIAL_CHANNEL_2_4GHZ;