Commit Graph

423 Commits

Author SHA1 Message Date
Abhinav Kumar
90d227ce32 qcacmn: Support sae single pmk roaming BSS in scan
"WPA3-SAE Single PMK" is a feature by which STA can
complete SAE roaming to specific group of AP(s) using
single PMK. This is done with the help of advertising
vendor specific SAE single PMK IE in the beacon/probe.

When vendor specific sae single pmk IE (oui 0x00 40 96,
type 0x03) is present in the beacon/probe of AP then the
BSS supports WPA3-SAE roaming using Single PMK.

Add changes in scan module to parse the Vendor specific
SAE single PMK IE and copy it to the scan_entry ie_list.

Change-Id: I5b7096d1360c624ce1c47e56e8cad37adbdda1e3
CRs-Fixed: 2616099
2020-02-20 18:11:53 -08:00
Aditya Sathish
6287db0784 qcacmn: Add 6GHz support for chan/freq/band usage in scan
Currently the conversion APIs used doesn't take into account
the overloading of channel numbers between 6GHz, 5GHz and 2.4GHz
bands.

Add support to obtain the correct channel number (and auxiliary
information like band and frequency) through the new APIs that
support all three bands.

Change-Id: Ic2c8dfa4cc845d701dfd07df61c9ae1ee3d8bdef
CRs-Fixed: 2610378
2020-02-20 08:32:32 -08:00
Ashish Kumar Dhanotiya
07810f61ce qcacmn: Reduce logging while printing channel list
As part of logging optimization, reduce logging while
printing channel lists.

Change-Id: I0241dc4dbaa3879bbe354a0e4750a0d559d1ba40
CRs-Fixed: 2624517
2020-02-19 19:26:27 -08:00
Ashish Kumar Dhanotiya
35152d5562 qcacmn: Add support to dynamically set dwell time for 2g
Currently there is no support to dynamically set dwell time
for 2g channels.
Add support in existing command SETDWELLTIME to dynamically
configure dwell time for 2g channels.
Along with set, add support to get dwell time for 2g channels
with the existing driver command GETDWELLTIME.

Change-Id: I8a71e39338e7a81690140f50bc3c5ac7b0bd63eb
CRs-Fixed: 2620370
2020-02-14 04:18:27 -08:00
gaurank kathpalia
85d4f03587 qcacmn: Set DBS scan if ndp peers are active
Currently on the STA interface if the scan
comes the driver puts it to NON-DBS scan if the
high accuracy request comes, but if the NDP
peers are active this causes a throughput loss
as scan takes much time to complete.

Fix is to do a DBS scan if the NDP peers are
attached to a NDI interface.

Change-Id: I798fd388f2bf010304ba1f6777680cf4d1f3ccfb
CRs-Fixed: 2615541
2020-02-12 21:48:30 -08:00
Abhishek Singh
d52ee762bc qcacmn: Use qdf_scnprintf in scan instead of snprintf
Use qdf_scnprintf instead of snprintf to log channels to store
the freq list and print.

Change-Id: I4e2f4a93f3de9b9937af3699bde00bb2d1066ca5
CRs-Fixed: 2615319
2020-02-05 22:40:34 -08:00
Abhishek Singh
daaeeb218a qcacmn: Optimize logs in scan path
Remove redundant logs and optimize the logs in scan path.

Change-Id: I59c59db012f5e9526752d45303e44f2a27f91ec6
CRs-Fixed: 2612629
2020-02-03 23:07:32 -08:00
Sandeep Puligilla
f6485c72bb qcacmn: Fix RNR entry list access error
Failed to read RNR entries from the RNR list
while issuing the scan.

Arguments passed to access the next node from RNR list
is not initalized due to which RNR entry accessing failed.

Change-Id: If5d1f4cace8e393e93b82ac3881b9627bde5f9e1
CRs-Fixed: 2605732
2020-01-26 14:27:35 -08:00
Sandeep Puligilla
9019baa26d qcacmn: Reduce time for scan when miracast is active
Scan can cause issues in video streaming when miracast session
is active.

Reduce the scan time by removing the DFS channels
from scan list during the active miracast session.

Change-Id: I14666ebccabaf373a67f396fb7f85c2f7ee34449
CRs-Fixed: 2603528
2020-01-22 01:17:59 -08:00
Abhishek Singh
87a5ab62be qcacmn: Add security info in scan entry
Add security info in scan entry and print the same.

Change-Id: If8f0c05a526b86cb3ae0020c2e144beb3510cb98
CRs-Fixed: 2603004
2020-01-18 20:16:48 -08:00
bings
ae8afdf042 qcacmn: Fix memory leak and NULL access in scm_add_rnr_channel_db
In scm_add_rnr_channel_db, if pointer channel is NULL, it should return.
Allocate rnr_node buffer whenever it is used, otherwise memory leak
happens if the BSS channel is not 6Ghz.

Change-Id: Iecba2453c2e9cdf9301826e0e11f740190616110
CRs-Fixed: 2601014
2020-01-17 22:53:01 -08:00
Sandeep Puligilla
395a799312 qcacmn: Fix beacon processing error
1. Modified logging level for RNR DB
2. Modified  add RNR DB entry API to
avoid null pointer dereference.

Change-Id: Ic5d91c05dd3e37e5e9099979e37fcbe9f42feb14
CRs-Fixed: 2599539
2020-01-13 15:19:01 -08:00
Venkateswara Swamy Bandaru
46082ed4e3 qcacmn: Fix issue in RNR IE processing
Fix RNR IE processing by correctly adjusting offsets.
neighbour ap info field processing is present only at
beginning of IE skip it only once.

Change-Id: I05923e4ff9efa00aeed141b0cff8b62913622cf6
CRs-Fixed: 2592014
2020-01-10 13:49:39 -08:00
Alan Chen
80c475929e qcacmn: Increase SCAN_PNO_MAX_NETW_CHANNELS_EX macro to 100
PNO scan is failing to start because it is coming with 97 channels
but the current max number of channels in PNO scan is 60. To allow
for a larger number of channels, increase SCAN_PNO_MAX_NETW_CHANNELS_EX
to 100.

Change-Id: I3ac08f83f9f500899656caf48c112c33580cef70
CRs-Fixed: 2585685
2020-01-02 14:31:41 -08:00
Shashikala Prabhu
cccf40f12b qcacmn: Return correct RSSI value from util_scan_entry_rssi()
RSSI in the scan entry is a negative value. It was converted to positive
value and if the converted value is greater than WLAN_RSSI_DUMMY_MARKER
(has positive value 295), util_scan_entry_rssi() was returning 0 to the
caller.
util_scan_entry_rssi() is used for printing RSSI value. Since RSSI is saved
as a negative value and caller expects it as a negative value, return a
negative RSSI value from util_scan_entry_rssi().

Change-Id: Ifdeb88dfa42a6927ff29670429d846ff071e9c59
CRs-Fixed: 2576129
2019-12-24 03:47:08 -08:00
Pankaj Singh
e10977221a qcacmn: Print beacon info after RSSI/chan are updated from prev frame
In case of channel mismatch, RSSI and channel etc are updated from
previous frame. Also in hidden SSID case the SSID is updated from
prev frame for beacons.

So print the beacon after updating these params from previous frame.

Change-Id: Ia4dc4769f7bccf4698074a3bcedefd1909fd2e7b
CRs-Fixed: 2587067
2019-12-19 03:04:34 -08:00
Jeevan Kukkalli
66f08b7be6 qcacmn: Avoid infinite loop while parsing RNR IE
A value of 0 in TBTT Information Count subfield indicates
one TBTT Information field is present.Test expression in
for loop should consider 0 as a valid value to avoid infinite
loop.

Change-Id: I0dc0f694147b6c4f91a8be0bfbd7c6d4bb95e1f1
CRs-Fixed: 2582936
2019-12-17 01:38:14 -08:00
Abhijit Pradhan
0f16cba633 qcacmn: Control the size of the freq and chan_num (Scan)
Depending on the requirement, a bigger size or a smaller size for
the frequency variable can be chosen. The advantages of each size
are described below:-

Advantage of a bigger size:
When two technologies (e.g. 802.11AX and 802.11AD ) are controlled
by the same driver software, the frequency range may be very large
and a bigger size (e.g. 32bit integer) is more appropriate.

Advantage of a smaller size: When the frequency range is not very
large, a smaller size(e.g. 16bit integer) can be used. It saves a
large amount of space especially when many large arrays containing
elements of this type/size are defined in the driver.

Also, change the size of the IEEE channel variables to unsigned
8-bit integer.

Change-Id: Ie503623ec6e4473abe8ee95c19dc4470853326dd
CRs-Fixed: 2586177
2019-12-17 00:13:09 -08:00
Pankaj Singh
b18fc398bb qcacmn: For 6Ghz beacons get chan from HE OPs 6 Ghz params
In 6Ghz the HT and VHT IE are not present and channel info is
present in HE OPs 6 Ghz params.

So fill channel from HE OPs for 6Ghz AP.

Change-Id: I2dbe6ecedb8949b7d9d3b26b43fbe4b6d3ef0a42
CRs-Fixed: 2585788
2019-12-14 16:18:31 -08:00
Amruta Kulkarni
d0189add9b qcacmn: Enhance logic for active dwell time
With this change, in concurrent mode
(SAP on 2.4ghz and peer connected + STA Scan ongoing),
active dwell time is kept unchanged.

Change-Id: I465873dec79906d078f5ec00c49641f66867c6a7
CRs-Fixed: 2581121
2019-12-13 14:12:16 -08:00
Amruta Kulkarni
88ec9b6865 qcacmn: Enhance logic for dwell time 2ghz
With this change, in concurrent mode
(SAP on 5ghz or 6ghz and peer connected + STA Scan ongoing),
active dwell time for 2ghz is not reset to 0.

Change-Id: I27bcd64579727e279095cf5386638dbd49567b3d
CRs-Fixed: 2575762
2019-12-04 00:10:28 -08:00
hqu
e131d31b8b qcacmn: Refine chan_list to chan_freq_list
Refine chan_list to chan_freq_list for below functions:

ucfg_scan_filter_valid_channel
scm_filter_valid_channel
scm_filter_channels

Change-Id: Ia1e82c5ac4cea4e48844b925e30947e945c40ee4
CRs-Fixed: 2570954
2019-12-02 07:19:47 -08:00
Shashikala Prabhu
9a8d2a2825 qcacmn: Cleanup direct attach specific scan code
Cleanup direct attach specific code from common files.

Change-Id: Ided7aa31c3d37ac71fdcf19de439a5e2ed739019
CRs-Fixed: 2571429
2019-12-02 02:09:14 -08:00
Liangwei Dong
7ce41f14c1 qcacmn: Fix channel_map NULL
Initialize channel_map to "us" at regulatory init.
Use NUM_6GHZ_CHANNELS to get 6Ghz channel numbers
instead of MAX_6GHZ_CHANNEL.

Change-Id: Ifed996c1a528c8a3c0a29d3959f17dff6d298193
CRs-Fixed: 2949971
2019-12-01 19:16:45 -08:00
Sandeep Puligilla
0ca3c59702 qcacmn: Don't update ACS scan channel list
Ini item 'scan_mode_6ghz' updates the scan channel list based
on the user configuration value that includes the ACS scan on
SAP mode.

This change restricts the ini item configuration for ACS scan request.

Change-Id: I0871fed8a8d1e551656e8a1ba06b504755074ca1
CRs-Fixed: 2574811
2019-12-01 17:42:46 -08:00
Sandeep Puligilla
e903f492d1 qcacmn: Update scan copy data API for RNR IE
Update Scan copy ie data API for RNRIE and MUEDCA IE

Change-Id: I1aa1acc3f921c10af2b2de0926f69542402da285
CRs-Fixed: 2566644
2019-11-24 22:35:51 -08:00
Sandeep Puligilla
d763fee333 qcacmn: Add support for 6GHz scan priority algorithm
Add support for 6Ghz scan channel list priority algorithm.

Change-Id: I63b0ddf384c4bd62a6a25feb7dfe4f80b5f85fbe
CRs-Fixed: 2564949
2019-11-24 22:35:35 -08:00
tinlin
aae613c904 qcacmn: Convert legacy channel usage
Modify the following API's code and parameters to make
sure it is using frequency instead of channel:

	csr_update_scan_entry_associnfo

Change-Id: Id289c2bd2e2cdf3f6a5e16028bbafb3df4049dac
CRs-Fixed: 2563874
2019-11-21 00:45:37 -08:00
Gurumoorthi Gnanasambandhan
f336902021 qcacmn: Rewrite util_gen_new_bssid functionality
qdf_do_div is not helping  for modulo operation and always returns 0 in
32 bit image resulting in same base BSSID is always returned for all
the VAP's.With 64 bit image no issues are seen.

Change-Id: I50e500f57713ce080447b9a5cb1e615018222adb
CRs-Fixed: 2565183
2019-11-18 14:09:18 -08:00
Jianmin Zhu
69560e37c6 qcacmn: Replace chan list with freq list in struct scan_filter
To support 6G, replace chan id with frequency.
Replace channel_list and pcl_channel_list with
chan_freq_list and pcl_freq_list in struct scan_filter.
Change API scm_get_pcl_weight_of_channel to use freq.

Change-Id: I6e880986fb2dcb1fa7aa4f40d2e3f849e7e3af64
CRs-Fixed: 2561234
2019-11-18 10:33:09 -08:00
Jianmin Zhu
52a2b33099 qcacmn: Set priority for connection with bssid_hint
There is ini to enable the feature: Set highest priority to BSS
for connection which comes as bssid_hint from wpa supplicant,
but it is broken.

Change-Id: I795341bd13f59caafaaadf7086f5efc3d47f913c
CRs-Fixed: 2565161
2019-11-15 23:51:11 -08:00
Hariharan Basuthkar
b19418e3eb qcacmn: Rectify input given to wlan_reg_get_band_channel_list
In function scm_update_6ghz_channel_list, while calling function
wlan_reg_get_band_channel_list change the second argument to BIT of enum,
instead of the enum itself.

Change-Id: I61dc0bf1e52e458cd26bcb278d88f687f92130e9
CRs-Fixed: 2559519
2019-11-10 06:37:45 -08:00
Sandeep Puligilla
7345e2dd03 qcacmn: Add SCAN 6GHz extension flags
Add 6Ghz scan extension flags to control the
scan on 6Ghz frequency.

Change-Id: I5d7068d0fa4daf68b5373d47143454a7bf540155
CRs-Fixed: 2560593
2019-11-09 19:10:42 -08:00
Sandeep Puligilla
b4b955e93c qcacmn: Add support for 6g scan hint
Add support for 6Ghz short ssid and bssid hint mechanism
as part of scan command.

Change-Id: I53a787d2a1406ffd658dc0765bae1e632b870b36
CRs-Fixed: 2559877
2019-11-09 19:10:34 -08:00
Sandeep Puligilla
aba2b0c42b qcacmn: RNR IE parsing support
Add RNR IE parsing support on scan module.

Change-Id: I7a0685f16a61a45910212b2d8fe5cbc12b5bd92e
CRs-Fixed: 2557271
2019-11-09 19:10:25 -08:00
Abhishek Singh
3c5f8ef089 qcacmn: Fill cfreq0 and cfreq1 in scan entry from HT/VHT/HE IEs
Secondary channels cfreq0 and cfreq1 are not filled in scan entry,
So fill secondary cfreq0 and cfreq1 in scan entry from HT/VHT/HE IEs.

Change-Id: I09ee15a27debe554d8ddbac8e8b3c0315aec2c1a
CRs-Fixed: 2560273
2019-11-08 00:11:11 -08:00
Vignesh U
5ad018742a qcacmn: Filter the single channel scan request if the channel is NOL
A single channel scan request is not validated for NOL and scan start
request is sent directly. This leads to scan violation.

Reject the single channel scan request, if the channel is in NOL by
proceeding to validate the channel before sending scan start.

Change-Id: I128b1bea8de534f08e9d93cb154c2ba5adeba452
CRs-Fixed: 2546693
2019-11-07 03:55:59 -08:00
Subrat Mishra
76b7920e40 qcacmn: Fix memory leak in 6GHz channel update
Fix memory leak in 6GHz channel list update for scan manager.

In scm_update_6ghz_channel_list function dynamic memory allocation
for local variable was not freed. This was cusing memory leak during
module unload.

CRs-Fixed: 2558436
Change-Id: I9535a3621e0fc5916cdf39934fec7c51c1b8e32b
2019-11-05 11:04:16 -08:00
Abhishek Ambure
986f5c97b9 qcacmn: Get phymode from HE phy capability
WLAN phy mode is calculated from HE capability.

Change-Id: I217cf6609f526a761c183395fe67f67adc95c4af
CRs-Fixed: 2550362
2019-11-05 09:27:42 -08:00
Rajeev Kumar Sirasanagandla
89cefa812d qcacmn: For p2p scan skip DFS channels only
In the current implementation, when ini gSkipDfsChannelInP2pSearch
is set then DFS channels are skipped for p2p scan but side-effect is
passive and indoor channels are also skipped. This is because api
wlan_reg_is_dfs_ch() returns true for passive, indoor and DFS channels.

To fix this, use api wlan_reg_chan_has_dfs_attribute() instead of
wlan_reg_is_dfs_ch() for explicitly getting DFS (radar) channels only.

Change-Id: I7aa50991753e057f72ed945e90647123ae51ed87
CRs-Fixed: 2545583
2019-11-05 04:18:01 -08:00
Sandeep Puligilla
377595c534 qcacmn: Default value for 6G scan mode
6G Scan mode for AP platform is different
from non-ap paltform so modified default values
accordingly.

Change-Id: Ifdea76b449998ffa5e33ffedd30564bd8eda8d6a
CRs-Fixed: 2555441
2019-11-02 12:26:04 -07:00
Sandeep Puligilla
5939199242 qcacmn: Add 6Ghz scan mode CFG item
Add 6ghz scan Mode CFG item and funcitonality
0 - Remove 6GHz channels in the scan request
1 - Allow/Add 6Ghz PSC channels to scan request
2 - Allow/Add all the 6Ghz channels

Change-Id: I2f07c30e599ace4592ae02a88d86876725abbb5f
CRs-Fixed: 2517277
2019-10-29 06:56:10 -07:00
Shashikala Prabhu
a477ec2257 qcacmn: Add API to get SNR value from scan entry
Add snr and avg_snr variables to scan entry and populate these variables
while generating the scan entry.
Add API to read avg_snr value from the scan entry.

Change-Id: Ie19d5ad7c8debb35e9d278ec648bd6217b2f4099
CRs-Fixed: 2532369
2019-10-26 11:55:27 -07:00
Gurumoorthi Gnanasambandhan
f069fccaa6 qcacmn: Rewrite util_gen_new_bssid functionality
__aeabi_uldivmod  error is seen in 32 bit WIN platform.
Rewrite the function to avoid the insmode error.

Change-Id: I93e00222514f2969ac49a3c530c5436a5a542a25
2019-10-25 04:41:30 -07:00
Manikandan Mohan
0f13d10c75 qcacmn: Update for policy manager frequency based APIs
Due to channel number ambiguity with introduction of 6Ghz operation
policy manager APIs are updated to use frequency values instead
of channel number. Update corresponding caller functions to
adapt for frequency usage.

Change-Id: I6c7566e1d99671a4324bd739ab8d26595d88956d
CRs-fixed: 2545125
2019-10-22 18:10:05 -07:00
Ashish Kumar Dhanotiya
75ccbd439c qcacmn: Process rx_mgmt_pkt based on frequency
As a part of 802.11ax amendment, 6GHz band operation is added.
Since the 6 GHz channel numbers are overlapping with existing 2.4GHz
and 5GHz channel numbers, use frequency to identify unique channel
operation instead of channel number. Channel frequency is unique across
bands.

As part of above requirement add logic to process rx mgmt
packets based on the frequencies instead of channel numbers.

Change-Id: I33e31fa124cedfab31dd1827721a420ad6cdba07
CRs-Fixed: 2519512
2019-10-18 02:55:39 -07:00
Rhythm Patwa
7232cb187e qcacmn: Add support to parse 6GHz specific IEs
Add support to scan for the 6GHz band capabilities
IE and parse the IE. Added peer assoc param for updating
the minimum data rate advertised by the peer in 6GHz
Opration information.

Change-Id: Iebb4379d321832f3ed2bcd3174a54843fa2d497c
2019-10-16 21:54:30 -07:00
Abhishek Singh
f3f9797014 qcacmn: Fix enum wlan_phymode to include proper phymode value
Few phymode are missing from enum wlan_phymode and many are not
valid phymode, e.g for 5ghz 40minus and 40plus are not valid.

So add the missing enums and remove invalid enums from enum
wlan_phymode.

Change-Id: Id6a1fb4cf0d629cc410bd262a048b5050d05ed5d
CRs-fixed: 2505422
2019-10-12 13:10:32 -07:00
Ashish Kumar Dhanotiya
39c6d8bd13 qcacmn: Use freq in cfg80211_scan instead of channel
Currently in the scan path frequencies received
in the scan request are getting converted to channel
number and again converted to frequncies.

For 6GHz support in the scan path do not convert
frequency to channel number, instead use frequncies
received in scan request to send the scan command to
FW, remove the dummy conversion from chan to freq and
freq to chan.

Change-Id: Ieab7dded0678fac54796bba3b1b210c910f6173e
CRs-fixed: 2534897
2019-10-01 06:33:04 -07:00
Sandeep Puligilla
5e0d7addc7 qcacmn: Add 6G scan dwell time parameter in scan request command
Add 6G scan active and passive dwell time parameter to scan request

Change-Id: Idf50aa23d9dd856c076b1bc3f84e2b3c0ef2b289
CRs-Fixed: 2530498
2019-09-27 00:22:08 -07:00