From 8736d5e844d6a01fe8606dcf7cb05cf80fa42fda Mon Sep 17 00:00:00 2001 From: YOUR_NAME Date: Wed, 1 Dec 2021 07:18:22 +0000 Subject: [PATCH] Description: wlan 5GHz adapter Feature or Bugfix:Feature Binary Source: No Signed-off-by: YOUR_NAME --- model/network/wifi/core/module/wifi_base.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/model/network/wifi/core/module/wifi_base.c b/model/network/wifi/core/module/wifi_base.c index c4fe594e..ea7d2c1d 100644 --- a/model/network/wifi/core/module/wifi_base.c +++ b/model/network/wifi/core/module/wifi_base.c @@ -466,22 +466,22 @@ static int32_t WifiCmdSetMode(const RequestContext *context, struct HdfSBuf *req return ret; } -static int32_t WifiCheckChannelNum(struct WlanHwCapability *capability,struct WlanBand *band) +static int32_t WifiCheckChannelNum(struct WlanHwCapability *capability,struct WlanBand **band) { if (capability == NULL || band == NULL) { HDF_LOGE("%s: capability or band is NULL", __func__); return HDF_ERR_INVALID_PARAM; } if (capability->bands[IEEE80211_BAND_2GHZ] != NULL) { - band = capability->bands[IEEE80211_BAND_2GHZ]; - if (band->channelCount > WIFI_24G_CHANNEL_NUM) { - HDF_LOGE("%s: channels %u out of range", __func__, band->channelCount); + *band = capability->bands[IEEE80211_BAND_2GHZ]; + if ((*band)->channelCount > WIFI_24G_CHANNEL_NUM) { + HDF_LOGE("%s: channels %u out of range", __func__, (*band)->channelCount); return HDF_FAILURE; } } else if (capability->bands[IEEE80211_BAND_5GHZ] != NULL) { - band = capability->bands[IEEE80211_BAND_5GHZ]; - if (band->channelCount > WIFI_5G_CHANNEL_NUM) { - HDF_LOGE("%s: channels %u out of range", __func__, band->channelCount); + *band = capability->bands[IEEE80211_BAND_5GHZ]; + if ((*band)->channelCount > WIFI_5G_CHANNEL_NUM) { + HDF_LOGE("%s: channels %u out of range", __func__, (*band)->channelCount); return HDF_FAILURE; } } else {