Commit Graph

1229 Commitit

Tekijä SHA1 Viesti Päivämäärä
Kiran Kumar Lokere
605e7a710b qcacmn: Add new crypto serivce apis for security checks
Add new crypto component service apis to check the security
match.

Change-Id: I66336c4924b2a2c203d6ba197ab649725f960ef8
CRs-Fixed: 2337195
2018-11-22 00:43:41 -08:00
Abhinav Kumar
45cff82c5f qcacmn: Block all new scan during suspend mode
After driver suspend some thread can still queue scan req
which will cause scan during suspend and WOW_ENABLE received
while SCAN in progress.

TO avoid this block all new scan during suspend.

Change-Id: I02ddc9b5e6ba5f1782d00e34f044ace34c54d0b0
CRs-Fixed: 2343385
2018-11-17 03:25:31 -08:00
Bala Venkatesh
b966910cb6 qcacmn: Add BSS peer for P2P client mode
Set bss peer for both STA and P2P client mode.

Change-Id: Ic25e48930511ff6c6e3af8c9bbdb9425ec654f04
CRs-Fixed: 2332938
2018-11-17 01:59:13 -08:00
Frank Liu
6cbf9764e6 qcacmn: Fix KW issue in tdls
Potential NULL pointer dereferences in below functions:
tdls_delete_all_tdls_peers_flush_cb()
ucfg_tdls_notify_sta_connect()

Change-Id: Iee31d91b31c5921fbd5cc70e0b893093b496ee43
CRs-Fixed: 2350930
2018-11-16 13:34:52 -08:00
Shashikala Prabhu
58b8be02d1 qcacmn: List 2G frequency list in scan_config command
scan_config command for 2G pdev was not listing 2GHz frequencies.
Fix frequency range check condition in is_chan_enabled_for_scan() to
include 2G frequency in the scan channel list.

Change-Id: I9883583505ab318328999c5cf2dd33e687a784b2
CRs-Fixed: 2350530
2018-11-16 13:34:42 -08:00
Bala Venkatesh
d80f65af9b qcacmn: Avoid redefination of tdls_add_oper enum
Enums tdls_add_oper and TdlsAddOper are same. Instead redefining
use the same enum across different files.

Change-Id: Ibb71b0f80e156e4bd3a345a56c7b4d99ce770ef7
CRs-Fixed: 2349643
2018-11-15 08:20:47 -08:00
Abhishek Singh
fda72d751c qcacmn: Use objmgr API to get 1st vdev from pdev
If Vdev id is not present driver tries to get vdev with vdev id 0
from pdev. Vdev with vdev_id 0 might not be present on pdev so use
objmgr API wlan_objmgr_pdev_get_first_vdev to get the first vdev.

Change-Id: I2ae0d6056709339a8167582ec327269aa84c93f4
CRs-Fixed: 2349699
2018-11-15 05:11:12 -08:00
Visudha Sathurappan
f140e5cadc qcacmn: Resolve symbol errors when DA_SUPPORT is disabled
Protect calls to DA function

Change-Id: Iba79c0bf8c5ac9b31b8e568a26b553ce3a07598a
2018-11-14 16:46:21 -08:00
jiad
b4ea80e030 qcacmn: Fix maybe-uninitialized build error
This change fixes build errors with compiler option
-Werror=maybe-uninitialized.

Change-Id: Ieff271ed61575c9e60ce73f5145fff2c2d6dfa24
CRs-Fixed: 2346019
2018-11-14 07:41:26 -08:00
Abhiram Jogadenu
f5caeedb42 qcacmn: Fix memory leak in ucfg_scan_init_chanlist_params
Regulatory channel list is allocated memory while initializing,
but isn't being freed. This change will free the list and fix
the possible resource leak.

Change-Id: I4603271697603cdacbfe4cbf327faad8ce582715
CRs-Fixed: 2348117
2018-11-12 21:23:09 -08:00
Priyadarshnee S
8a2dbfbc78 qcacmn: Export a reg api to be used by other modules
Export ucfg_reg_get_current_chan_list so that it can be called from
offload layer.

CRs-Fixed: 2339508
Change-Id: I808ccbab7d95d3e896def298bdf7f38f298d97fc
2018-11-11 23:12:48 -08:00
Bala Venkatesh
929882c3a1 qcacmn: Increase serialization command timeout
Increase the serialization command timeout for
add sta and del sta of tdls peers requests.

Change-Id: If6ba6aa1297afaea1fd86bf406dcbb6e4e461d25
CRs-Fixed: 2345425
2018-11-09 16:59:18 -08:00
Vivek
4f60ed9111 qcacmn: Log history of serialization commands
Capture the addition and removal of commands
to the serialization queues and the associated
action that resulted in queue changes.

Provide an interface to dump the commands
in either active and pending of scan or non scan
queues and the history of commands that moved in
and out of the serialization queues

Change-Id: I87291f3649f27cc1cb84709d24c0cf8403a41a65
CRs-Fixed: 2334156
2018-11-08 05:44:42 -08:00
Sandeep Puligilla
08d71d6ae5 qcacmn: Reduce VDEV manager log level
Reduce log level of VDEV manager debug messages
to avoid clogging of kernel console log.

Change-Id: I20cf6ef9d7870bb69696fa533d0351ae3c19a979
CRs-Fixed: 2342961
2018-11-08 01:30:54 -08:00
Abhinav Kumar
55229dfcec qcacmn: Possible Out of bound read in policy_mgr_get_channel_list
To prepare the channel list suggestion for a new connection,
policy_mgr_get_channel_list invokes policy_mgr_get_valid_chans to
get the number of valid channels. Driver uses returned num channel
and iterates channel list to divide the list into 2.4 & 5 GHz
lists. In case if, num of valid channel returned by
policy_mgr_get_valid_chans is greater than the maximum number of
channel supported in the channel list, QDF_MAX_NUM_CHAN(128),
possible OOB read occurs.

Validate the value of chan_index of channel list in
policy_mgr_get_channel_list against the maximum number of
channels supported in the channel list.

Change-Id: I6beb9231aaef491731557434d1ae210ac0bdb036
CRs-Fixed: 2346125
2018-11-07 21:17:43 -08:00
Bala Venkatesh
f2e35432fe qcacmn: Send the supported channel list length correctly to FW
Currently, peer supported channel list length is updated first,
and then channel list updated by removing the DFS and invalid
channels. So, Wrong channel list length is sent to FW.

Change-Id: I1e71bdeae3d5368fbea85ae5e47e13c326e36375
CRs-Fixed: 2344729
2018-11-07 05:09:25 -08:00
Abhishek Singh
d22c097aaa qcacmn: cleanup the unused serialization commands
Cleanup the serialization commands that are not used now.

Change-Id: I3b2dd5021476bc59669029f536e4e0b804f01555
CRs-Fixed: 2344571
2018-11-07 01:35:58 -08:00
Liangwei Dong
a903e9330a qcacmn: Increase Max HW mode number
Increase Max HW mode Number to 3 for
dual dbs mode hw.

Change-Id: I7cf37f854027470cd1decdccc5bd2cd5919ac486
CRs-Fixed: 2340756
2018-11-06 22:40:08 -08:00
Yeshwanth Sriram Guntuka
d8ee7699e6 qcacmn: Reduce scan time when in GO+STA MCC
Scan on STA interface is taking around 10 secs to
complete. There is a 7secs expiry time used in nl
which could result in scan results received for
the first 3secs, which are from 2G channels, to
be flushed.

Fix is to not set offchannel simultaneous feature
capability, decrease the active dwell time for 2G
channels to 40msecs and increase burst duration
to 240msecs when GO is active.

Change-Id: If014b2115048018432943d863bbe184beb498408
CRs-Fixed: 2340516
2018-11-06 22:40:03 -08:00
Bala Venkatesh
f327b8c30f qcacmn: Pass valid arguments to hdd_wmm_is_acm_allowed
Currently pointer of the vdev object is sent to the callback
hdd_wmm_is_acm_allowed to get the adapter. But this can't
be used to get the adapter. Instead pass the vdev id to get the
adapter.

Change-Id: I3cb2f58d09a263c77a3696a36e863cc4137c7821
CRs-Fixed: 2341799
2018-11-06 21:07:54 -08:00
Harprit Chhabada
ab6c10d3bd qcacmn: Fix OOB read in util_scan_gen_scan_entry
qdf_mem_copy() is called in util_scan_gen_scan_entry() to copy the ssid
into scan_entry using a length of WLAN_SSID_MAX_LEN. Because the length
of ssid is only checked against the maximum value this will result
in an OOB read of up to WLAN_SSID_MAX_LEN bytes.

Change-Id: I150e7c7a75e7134cab1c4abeb799578166400461
CRs-Fixed: 2341004
2018-11-06 16:16:11 -08:00
Frank Liu
f846d94d79 qcacmn: Fix potential resource leak when post msg in TDLS
Fix potentail memory leak when post message in TDLS module:
1. Add flush callback to hanlde memory free and release reference count;
2. Check the return status when post message and free the resource for
failure case.

Change-Id: I0a693ccb5704509a4220f26e024ce8c6c823890c
CRs-Fixed: 2341652
2018-11-05 16:15:24 -08:00
Shashikala Prabhu
75279662ac qcacmn: Set NOL-History flag in the regdb component
In case of STADFS feature, when STA vap detects the RADAR, it marks the
channel as RADAR and adds the RADAR found channel to both NOL and
NOL-HISTORY list.
After nol expiry, STA vap does the CAC before connecting to the RootAP if
the RootAP channel is present in the  STA NOL-HISTORY.

Set nol_history_flag in regulatory component current channel list when STA
vap detects the RADAR.

Change-Id: Ic5d15d78409af15918185147fef8d5cbe87c1686
CRs-Fixed: 2337921
2018-11-05 13:31:55 -08:00
Shashikala Prabhu
62ce2260e9 qcacmn: Use regdb component to set/get NOL-History channel list
In case of STADFS feature, when STA vap detects the RADAR, it marks the
channel as RADAR and adds the RADAR found channel to both NOL and
NOL-HISTORY list.
After nol expiry, STA vap does the CAC before connecting to the RootAP if
the RootAP channel is present in the STA  NOL-HISTORY.

Set nol_history_flag in regulatory component current channel list when STA
vap detects the RADAR.

Change-Id: I8d01f5830e6b4dd634b71c551ac347bc7d3d5c4c
CRs-Fixed: 2337921
2018-11-05 13:31:52 -08:00
Shashikala Prabhu
a38c0cd7c8 qcacmn: Add function pointer to enable STADFS in DFS component
Add function pointer to set/get STADFS in DFS component.

Change-Id: Ib20ca02952632fb7089f74067b955f8bf35dd875
CRs-Fixed: 2323831
2018-11-05 13:31:49 -08:00
Abhishek Singh
8d80aa857b qcacmn: Validate the scan requester id before un-registering index
In ucfg_scan_unregister_requester even if caller provide an invalid
requester id, the index is unregistered without checking if
requester id is valid.

Validate the scan requester id before un-registering the index.

Change-Id: I0e946b8c1bdb87b7929745bcd646076d2b664c38
CRs-Fixed: 2343177
2018-11-02 14:02:27 -07:00
Abhishek Singh
1b28621e9d qcacmn: Call scan failure callback in case scan is not serialized
In case scan req is not serialized in some case failure callback
are not called and thus the requestor might not get this callback
and thus might not clean up its states.

Fix this by calling failure callback in case scan is not serialized.

Change-Id: Ife2f22a71fc3fcf60ef96209ec179594ab60c074
CRs-Fixed: 2343144
2018-11-01 22:34:34 -07:00
Arif Hussain
fde69dee82 qcacmn: dfs: Add flag for zero cac
zero cac is not applicable for mcl
add flag to avoid compilation issue.

Change-Id: I0f0373d6d2724f4f5cc9b10272dfe8c6e00ace55
CRs-Fixed: 2343690
2018-11-01 17:24:12 -07:00
Manikandan Mohan
6fa99dd7f6 qcacmn: Fix mem leaks in nan msg posting to scheduler
Fix possible mem leaks in NAN module when msg posting to scheduler
fails. Also setup schduler flush callback for NAN module to purge
messages during driver unload.

Change-Id: I8d034d9bc9a58af95f2c4330a6fc7423885bdae6
CRs-fixed: 2341213
2018-11-01 15:38:26 -07:00
Hariharan Basuthkar
4fdc754bca qcacmn: Delete WIN only files from cmn_dev
WIN DFS only files are moved from cmn_dev to qca-wifi-oss

Change-Id: I597386caf00992b82e8ce52c65a6e82395119aa4
CRs-Fixed: 2330709
2018-10-31 23:04:34 -07:00
Om Prakash Tripathi
628dfd3422 qcacmn: Add failure reason to default failure prints
Print failure reason and BSSID when parse failure happens
for better debugbility.

Change-Id: I383611472d3ca03d74cf55326fcc65d5c9417aee
CRs-Fixed: 2334809
2018-10-31 23:04:31 -07:00
Wu Gao
d4b6e218c6 qcacmn: Fix potential memory leak when post scheduler msg in P2P
To avoid potential memory leak, add flush callback for some of P2P
messages, handle post scheduler messages fail case.

Change-Id: If700eba689bb2423ca84fbba08f7434cc75dbd14
CRs-Fixed: 2341756
2018-10-31 16:28:21 -07:00
Om Prakash Tripathi
a2f9c7c8b4 qcacmn: Update scan request with all channels
When scan is issued with 0 channels, use all valid channels
on underlying vap to scan. In essence 0 channel in scan
request is expanded to all supported channel list in scan
request by host driver.

Change-Id: Ie1677fa804b290bb1e4715244efb5789641260f4
CRs-Fixed: 2339615
2018-10-31 13:21:31 -07:00
Priyadarshnee S
9a6dbbc0de qcacmn: Indicate the channel on which radar is detected
Consider an AP up in channel 100 in VHT80 mode. On injecting radar
in channel 104, the current implementation displays "Radar found on channel
100", which is the primary beaconning channel. The requirement is to
display radar found information on the exact subchannel of the VHT channel
where radar was detected (which is channel 104 in this example).
Hence, using the radar found frequency offset to display the exact freq
offset from the centre frequency where radar was detected. This display
is only valid for real HW pulses injection. For bangradar, the frequency
offset is not available and therefore exact subchannel cannot be
calculated.

CRs-Fixed: 2321778
Change-Id: I49cdcd4f13dc1fbf12bc4a33048c13bc8ea3973f
2018-10-29 16:47:08 -07:00
Sandeep Puligilla
0a4d67bf73 qcacmn: Add support to event WLAN_VDEV_SM_EV_ROAM
- Add supprot to event 'WLAN_VDEV_SM_EV_ROAM'.
- WLAN_VDEV_SM_EV_ROAM - roaming event to notify the vdev
manager about the firmware triggered roaming.

Change-Id: I249664e72ba5fe0e13ddc8e59533489c69963f5f
CRs-Fixed: 2337795
2018-10-29 15:19:22 -07:00
Bala Venkatesh
433e0e3710 qcacmn: Delete connection in progress tdls peers
TDLS peer has to be deleted before sending the TDLS disable command
to FW, otherwise FW may assert due to the invalid sequence of peer
delete and TDLS set state command.
So Delete TDLS peers for those the connection is in progress along with
the active TDLS peers before disabling the TDLS.

Change-Id: Ic52c44dea947095cfe5e4dfe36eec271b1f46867
CRs-Fixed: 2340759
2018-10-29 13:49:43 -07:00
Priyadarshnee S
d3c3cb004b qcacmn: Reset Radar Log Counter on "wifi" command
Currently radar event log is cleared only during dfs_detach which happens
during wifi unload. On issuing "wifi or  wifi down" command, the logs are
not cleared. During Spoof Radar Detection, the log counter values are
spuriuos due to accumulation of phyerror events. This accumulation of
events is either due to false radar detection or logs of the previous wifi
cycle. Hence resetting the dfs radar log counters in the below cases:
1) During vap delete
2) During CC/ Regdomain change.
3) After false radar detect.

CRs-Fixed: 2244562
Change-Id: I74745f61c634bab7f9c1a78ef8dea8da2ab1a997
2018-10-27 16:56:54 -07:00
Yeshwanth Sriram Guntuka
294ce1121a qcacmn: SSID with zero or space should be NULL ssid
Last frame received in scan before the connect is
beacon with NULL ssid with non zero length and ssid
is sent as NULL to supplicant after association. This
will result in supplicant to trigger disconnect
casuing delay in reconnection.

Fix is to consider ssid with zeros or spaces as null
ssid.

Change-Id: If96776ae85926948d714e975c3e9b4011e8a20b3
CRs-Fixed: 2330485
2018-10-27 00:11:44 -07:00
Liangwei Dong
cc8676b6a8 qcacmn: Action frame random mac addr tx support
1. Send add random mac addr rx filter WMI command
to target
2. Add/Del the active random mac addr entry
3. Clear random mac addr from target if not active

Change-Id: I9dcbdc20b76d9865da7a8db6ee013bf5e44e4407
CRs-Fixed: 2322097
2018-10-26 10:39:34 -07:00
Ashish Kumar Dhanotiya
2fcd71bff6 qcacmn: Overwrite center frequency segment_1 to 0
Currently center_freq_seg1 value is not getting reset for
non 160, 80+80 width and 2.4 GHz channel which are stored in
sap context, in case of SSR on SAP restart, this old value
can be used which might be some junk value and can lead to
stop bss as a result of invalid values.

To resolve this issue reset the center_freq_seg1 to 0 for
non 160, 80+80 width and 2.4 GHz.

Change-Id: Ie4bffb1c2424024fab32d30d7d790f99d54ad58c
CRs-Fixed: 2326392
2018-10-25 04:12:25 -07:00
Harprit Chhabada
38d7f92a30 qcacmn: Fix null pointer dereference, wlan_cp_stats_psoc_obj_create_handler
In wlan_cp_stats_psoc_obj_create_handler() multiple error paths
lead to label wlan_cp_stats_psoc_obj_create_handler_return.

In the label, posc_cs is not null checked before passing to the
csc->cp_stats_psoc_obj_deinit() causing NULL pointer dereference.

Change-Id: I82a48cee7d2734a96960aeedff42fc4cdf94bf9c
CRs-Fixed: 2336830
2018-10-25 01:38:00 -07:00
Liangwei Dong
77d877285a qcacmn: Get peer with ref count
wlan_vdev_get_bsspeer doesn't hold ref
count on peer.
Use wlan_objmgr_get_peer to get peer
to avoid peer free race condition.

Change-Id: I04bfcf8ca20fa49d81a9e59aafc31caab98374a1
CRs-Fixed: 2337868
2018-10-24 23:00:24 -07:00
Liangwei Dong
d25d11780f qcacmn: Add chan change HW mode change
Add policy_mgr_get_current_pref_hw_mode_dual_dbs
API for dual dbs HW. In Dual DBS mode HW, it
decides the actual DBS mode when DBS required.

Change-Id: Ic45b09fa49e1ff923f1a2dad50a3ce7e4007a3fd
CRs-Fixed: 2338105
2018-10-24 23:00:17 -07:00
Bala Venkatesh
3b427de23b qcacmn: Take vdev ref before posting the tdls mgmt tx command
Before posting the TDLS_CMD_TX_ACTION to scheduler thread take the
vdev ref with module id TDLS and release the ref as part of
freeing this command.

Change-Id: Id05962a1c9fc415199f347c5d85d1e0670dc247c
CRs-Fixed: 2338113
2018-10-24 16:25:28 -07:00
Liangwei Dong
4bf807e8f4 qcacmn: Add DBS to DBS switch for vdev Down
Add DBS to DBS switch in opportunistic timer
handler when vdev prioritization enabled.

Change-Id: I902316d7f64427bcadf1131cc0b822d23fc172fa
CRs-Fixed: 2338092
2018-10-24 14:40:12 -07:00
Naga
478d035baa qcacmn: Enhance cp stats component
Add new fields tx_tooshort, tx and rx discard
control plane stats at vdev level

CRs-Fixed: 2327398
Change-Id: I9f3ae1f4d043319fec8f08752d9112ab5e9f6ef9
2018-10-24 09:53:55 -07:00
Vivek
287fb84e2c qcacmn: Remove unwanted debug logs in serialization
With the enhancements to the serialization component
many debug prints were additionally added.

The new debug prints were adding up to the text size
of the serialization object files.
Removed few unwanted prints in the new serialization code.

Change-Id: I366228618fe07f7637ff3bae96abab27b3b04b87
CRs-Fixed: 2333170
2018-10-24 04:49:45 -07:00
Jianmin Zhu
df8bb93d25 qcacmn: Restore target country code during SSR
During SSR, target country code is reset to default, may not same as
current country code, need restore it.

Change-Id: Ib8f51755f442d73ad6e11bbfb18fb22a60f724ba
CRs-Fixed: 2318283
2018-10-23 08:11:56 -07:00
Dundi Raviteja
ddf4501aba qcacmn: Use qdf_snprintf in mlme_vdev_sm_create() API
Use qdf_snprintf instead of snprintf in mlme_vdev_sm_create() API

Change-Id: Ie6bb710bfb3baeaab33fdfc386ead57284bc9f08
CRs-Fixed: 2324849
2018-10-23 02:46:00 -07:00
Linux Build Service Account
ea8c5466eb Merge "qcacmn: Add original vdev info for NSS update API" 2018-10-22 22:03:17 -07:00