mirror of
https://github.com/openharmony/drivers_framework.git
synced 2026-08-27 02:42:28 -04:00
Description: wlan 5GHz adapter
Feature or Bugfix:Feature Binary Source: No Signed-off-by: YOUR_NAME <fangdong7@huawei.com>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user