mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
qcacld-3.0: Send channel list to fw in case of PNO
In case of PNO scan, If firmware supports WMI_SERVICE_PNO_SCAN_CONFIG_PER_CHANNEL, it uses the upper-12 bits(bit-20 to bit 32) of channel_list for flags and lower 20-bits(bit-0 to bit-19) for frequency. If firmware doesn't support it, then channel_list holds the frequency value only. Fix is to fill the flags and frequency accordingly. Change-Id: I8473072069da4532406ce720a0070a665e29b1af CRs-Fixed: 3103939
This commit is contained in:
parent
ebd07f292b
commit
32925f7183
1 changed files with 7 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue