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
Cette révision appartient à :
sheenam monga
2021-05-19 22:23:19 +05:30
révisé par Madan Koyyalamudi
Parent 30ecff7940
révision 3ea09842f6
2 fichiers modifiés avec 3 ajouts et 3 suppressions

Voir le fichier

@@ -31,6 +31,7 @@
#include <wlan_ocb_tgt_api.h>
#include <wlan_lmac_if_def.h>
#include "wlan_ocb_main.h"
#include "reg_services_public_struct.h"
/**
* 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++) {
if (wlan_reg_freq_to_band(config->channels[i].chan_freq)
== BAND_2G)
== REG_BAND_2G)
config->channels[i].ch_mode = MODE_11G;
else
config->channels[i].ch_mode = MODE_11A;

Voir le fichier

@@ -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
* 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 ol_txrx_ops txrx_ops;
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,
adapter->mac_addr.bytes);