diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index 314e96e69cad..a273c996d0a0 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2011-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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 @@ -8617,7 +8618,7 @@ static int __iw_set_pno(struct net_device *dev, params = sscanf(ptr, " %u %u %hhu %n", &(req.networks_list[i].authentication), &(req.networks_list[i].encryption), - &(req.networks_list[i].channel_cnt), + &(req.networks_list[i].pno_chan_list.num_chan), &offset); if (3 != params) { @@ -8632,20 +8633,20 @@ static int __iw_set_pno(struct net_device *dev, req.networks_list[i].ssid.ssid, req.networks_list[i].authentication, req.networks_list[i].encryption, - req.networks_list[i].channel_cnt, offset); + req.networks_list[i].pno_chan_list.num_chan, offset); /* Advance to channel list */ ptr += offset; if (SCAN_PNO_MAX_NETW_CHANNELS_EX < - req.networks_list[i].channel_cnt) { + req.networks_list[i].pno_chan_list.num_chan) { hdd_err("Incorrect number of channels"); ret = -EINVAL; goto exit; } - if (0 != req.networks_list[i].channel_cnt) { - for (j = 0; j < req.networks_list[i].channel_cnt; + if (0 != req.networks_list[i].pno_chan_list.num_chan) { + for (j = 0; j < req.networks_list[i].pno_chan_list.num_chan; j++) { if (1 != sscanf(ptr, " %hhu %n", &value, &offset)) { @@ -8659,7 +8660,7 @@ static int __iw_set_pno(struct net_device *dev, ret = -EINVAL; goto exit; } - req.networks_list[i].channels[j] = + req.networks_list[i].pno_chan_list.chan[j].freq = cds_chan_to_freq(value); /* Advance to next channel number */ ptr += offset;