qcacld-3.0: Avoid comparison of two different enums

Currently, reg_wifi_band enum is compared with
enum band_info. different values may lead to
invalid chan mode.

Fix is to compare reg_wifi_band with reg_wifi_band
enum value only.

Change-Id: Ibbe83ab5a8a428528bbeb28c941552a6f412a844
CRs-Fixed: 2949501
This commit is contained in:
sheenam monga
2021-05-19 22:23:19 +05:30
committed by Madan Koyyalamudi
parent 30ecff7940
commit 3ea09842f6
2 changed files with 3 additions and 3 deletions

View File

@@ -31,6 +31,7 @@
#include <wlan_ocb_tgt_api.h> #include <wlan_ocb_tgt_api.h>
#include <wlan_lmac_if_def.h> #include <wlan_lmac_if_def.h>
#include "wlan_ocb_main.h" #include "wlan_ocb_main.h"
#include "reg_services_public_struct.h"
/** /**
* wlan_ocb_get_tx_ops() - get target interface tx operations * wlan_ocb_get_tx_ops() - get target interface tx operations
@@ -258,7 +259,7 @@ QDF_STATUS ucfg_ocb_set_channel_config(struct wlan_objmgr_vdev *vdev,
for (i = 0; i < config->channel_count; i++) { for (i = 0; i < config->channel_count; i++) {
if (wlan_reg_freq_to_band(config->channels[i].chan_freq) if (wlan_reg_freq_to_band(config->channels[i].chan_freq)
== BAND_2G) == REG_BAND_2G)
config->channels[i].ch_mode = MODE_11G; config->channels[i].ch_mode = MODE_11G;
else else
config->channels[i].ch_mode = MODE_11A; config->channels[i].ch_mode = MODE_11A;

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011-2020 The Linux Foundation. All rights reserved. * Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
* *
* Permission to use, copy, modify, and/or distribute this software for * Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the * any purpose with or without fee is hereby granted, provided that the
@@ -221,7 +221,6 @@ static int hdd_ocb_register_sta(struct hdd_adapter *adapter)
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter); struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
struct ol_txrx_ops txrx_ops; struct ol_txrx_ops txrx_ops;
void *soc = cds_get_context(QDF_MODULE_ID_SOC); void *soc = cds_get_context(QDF_MODULE_ID_SOC);
struct cdp_pdev *pdev = cds_get_context(QDF_MODULE_ID_TXRX);
qdf_status = cdp_peer_register_ocb_peer(soc, qdf_status = cdp_peer_register_ocb_peer(soc,
adapter->mac_addr.bytes); adapter->mac_addr.bytes);