Commit Graph

943 Commits

Author SHA1 Message Date
Bala Venkatesh
1e9e680a92 qcacmn: Defer the channel switch if it is already in progress
When sta+sap scc enabled on dfs channel then SAP cannot operate on
DFS channel in standalone mode. If STA+SAP are operating in SCC mode
on a DFS channel and STA gets disconnected from reference AP then driver
schedules a workqueue to move the SAP from DFS channel to user configured
channel. At this time if STA again connects to reference AP within few ms
then driver again schedules one more workqueue to move the SAP to STA's
channel. Sometimes the second workqueue may fail to switch the channel
if first one is not yet completed. So added event variable to schedule
second workqueue only when first one is complete.

CRs-Fixed: 2267005
Change-Id: Ia6ce4b6264c35f6d2c809e2a3f65f535e930874e
2018-06-26 18:53:35 -07:00
Naveen Rawat
b4a29b7a42 qcacmn: Fix vdev reference in NDP commands
Assign the vdev in NDP request message and hold the vdev reference till
the command is processed. Else the consumer of message will fail when
trying to take reference since vdev was not set in request packet.

Change-Id: I4c7e50690eff1f92f151f00209ec786a03252e76
CRs-Fixed: 2252035
2018-06-26 18:53:30 -07:00
Bala Venkatesh
5811d874a6 qcacmn: Ignore CSA if the channel is DFS or disabled
If MCC to SCC switch is enabled, SAP is active and CSA
received for STA interface, then ignore the CSA if channel
is DFS/disabled.

CRs-Fixed: 2263037
Change-Id: I98b8d957766358ea86cc9f50339725cf4bf0038b
2018-06-26 17:36:11 -07:00
Abhijit Pradhan
e556063bc7 qcacmn: Rename a DFS CAC function and corresponding function pointer
Rename the function dfs_mlme_deliver_event_up_afrer_cac() to
dfs_mlme_deliver_event_up_after_cac and rename the function pointer
mlme_deliver_event_up_afrer_ca to mlme_deliver_event_up_after_cac

Change-Id: I29c2094a0b45c9583b897e088ce9938c759e26ba
CRs-Fixed: 2251792
2018-06-25 17:37:30 -07:00
Arif Hussain
ecef5a4024 qcacmn: Add api to get dfs offload service bit in target_if
Add api to get dfs offload service bit in target_if.

Change-Id: I771ae8a2194250769d6e6d609b0a1863012110ea
CRs-Fixed: 2264477
2018-06-25 10:02:30 -07:00
Sathish Kumar
5cf9805bc3 qcacmn: Changes in direct buffer Rx module
1. Add support upto 2048 buffers in the ring
2. Add API to print current ring status per module per pdev
3. Start module ID numbering from 0

Change-Id: I7954007c6c486877ffb2ab91724885af2fbaab8c
CRs-Fixed: 2263968
2018-06-25 03:17:55 -07:00
Ashok Ponnaiah
09ec6f98d0 qcacmn: Fix key_mgmt datatype
key_mgmt was using uint16 datatype and used
to hold more than it's size.
increased its data size to uint32 address this
issue.

Change-Id: I88a4550bff2e0543700ba1470df3340e7020b7f0
CR-Fixed: 2254883
2018-06-23 18:03:19 -07:00
Naveen Rawat
305da26660 qcacmn: Avoid un-initialized access in wifi_pos_get_ch_info
In function wifi_pos_get_ch_info initialize channel list array
before use.

Change-Id: I3b6071448fddee4aa62e833fb9bcc50aefffd7a9
CRs-Fixed: 2254723
2018-06-22 14:08:10 -07:00
Naveen Rawat
cb0a5b0bf4 qcacmn: Fix NDI create sequence
Create NDI vdev after adapter is added to back of hdd adapter list,
so that vdev create completion callback can identify right adapter
and set corresponding completion variable.

Change-Id: Id0d78a5e482c875fee346224f37c29a874814133
CRs-Fixed: 2252031
2018-06-22 10:32:42 -07:00
Krunal Soni
6874a85101 qcacmn: Check HW mode before sending join request to lower layers
When STA's join req times out on current BSS, SME issues next BSS
internally without checking HW mode for new channel

For example, STA tries to connect SSID="abc",
BSSID="a1:a2:a3:a4:a5:a6", channel=36 and lets say it fails. It
should try few more times to same BSSID and after that it will try
next bss. Lets say next BSS it found has, SSID="abc",
BSSID="b1:b2:b3:b4:b5:b6", channel=1 then it needs to check whether
hardware mode change is required for channel=1. If driver fails in
checking hardware mode then following check will prevent the bad
situation.

CRs-Fixed: 2261129
Change-Id: Ie31ac5b8b90c6e63122148647ad333fccfbf9dbf
2018-06-22 06:01:58 -07:00
Naga
5233ffe848 qcacmn: Enhance cp_stats component
Add implementation to remove unused stats from pdev, vdev
peer cp_stats structure, reorder ol_ath_radiostats and
add inline macro for phy_err

Change-Id: Id91f11526c03bf14dfc285a1c87b24c8e5e00b02
CRs-Fixed: 2262329
2018-06-22 02:58:56 -07:00
Vignesh U
8178d6fcb0 qcacmn: Stop and reset the DFS test timer for Full-offload
DFS test timer is initialized and used by Full-offload but the timer is not
reset during DFS reset.

Reset DFS task timer during DFS reset.

Change-Id: I5d5395744a98e5ca2a7a94971e7c1c6e6e0b174f
CRs-Fixed: 2252612
2018-06-22 01:50:00 -07:00
Bala Venkatesh
03643e756f qcacmn: Allow SAP to move from one DFS chan to another DFS chan
Allow the SAP to move from DFS channel to another DFS channel in
STA+SAP SCC concurrency scenario.

CRs-Fixed: 2263031
Change-Id: I3d1f5e57415ed39a30125d4565bb768926dff4c9
2018-06-21 17:40:40 -07:00
Kabilan Kannan
9248a4c4e2 qcacmn: Do not stop TDLS timers before restart
MC timer implementation has changed recently, and
it requires TDLS timers shouldn't be stopped before
restart.

Change-Id: I718972bd0f7c66b04145ee38c58440f6240a8de2
CRs-Fixed: 2223777
2018-06-21 15:27:04 -07:00
Shaakir Mohamed
a0895b9989 qcacmn: Add support for ETSI pre-CAC cleared list
In ETSI domain, after CAC, channel is added to ETSI CAC cleared list,
so that next time it can skip CAC if channel is already present in this
list. If radar found, remove channel(s) from this list indicating that
when channel(s) is/are selected in future, the CAC needs to be re-done.

Change-Id: If6b31ecda2ab159188e7724bce7d1c2d8375fa3c
CRs-Fixed: 2143266
2018-06-20 21:23:28 -07:00
Naveen Rawat
8d36892372 qcacmn: Fix OOB access in utils_dfs_get_chan_list
Fix out of bound access for array "weight_list" with size 55 bytes
and declared on stack of function utils_dfs_get_chan_list. Same memory
is accessed in function policy_mgr_update_with_safe_channel_list with
index 127, leading to OOB access.

Change-Id: Ib7ba74e0096e90fd197bc563d2e82e497cf83759
CRs-Fixed: 2232833
2018-06-20 14:01:17 -07:00
Wu Gao
cd23d9575c qcacmn: Cleanup roc and handle tx ack in schedule thread
To avoid different thread delete the roc context or tx context at same
time, move cleanup roc and handle tx ack in scheduler thread.

Change-Id: Idc2a5394886a2e10c3acfabe139365dd263d6c0a
CRs-Fixed: 2211827
2018-06-20 00:43:26 -07:00
Dundi Raviteja
7cdfa7318f qcacmn: Incorrect usage of QDF_ARRAY_SIZE macro
In some use cases of QDF_ARRAY_SIZE macro, the argument passing
to it is a pointer instead of array which leads to getting
incorrect array size.

Current implementation of updating main arrays pcl_list_org and
weight_list_org is inefficient. So, update the main arrays directly,
instead of copying the data to local arrays and again updating the
main arrays.

Change-Id: I9a4a7fa813412fd000ce55d2a958e49ab1b02ed5
CRs-Fixed: 2262231
2018-06-20 00:42:57 -07:00
Bala Venkatesh
d576e7fba8 qcacmn: Populate PCL list correctly using channel select logic ini
Currently, PCL list is populated without checking channel select logic
ini. Check for channel select logic ini before selecting the second
connection pcl table.

Change-Id: I5a64d4ff43a7dcc2c70eac75b51d5f87de2903bb
CRs-FIxed: 2237403
2018-06-19 22:42:35 -07:00
Bala Venkatesh
832f0e8243 qcacmn: Skip CAC and ignore radar indication for SAP
If STA is already connected on DFS channel and SAP is going to start
on the same channel then skip the CAC for SAP.
If STA and SAP sessions are already operating on same DFS channel,
then ignore radar indication received on SAP interface.

CRs-Fixed: 2262494
Change-Id: Ife0ab6979a07c8773001a43f5a30c9a555dab37a
2018-06-19 22:42:33 -07:00
Zhu Jianmin
3bd52b06e9 qcacmn: ini parameter to allow STA+SAP SCC on LTE coex channel
When Force SCC and STA+SAP SCC on LTE coex channel are enabled:
   1. When STA on LTE coex channel, start SAP, select STA
      channel.
   2. When SAP on, connect STA on LTE coex channel, then switch
      SAP channel to STA channel.

Change-Id: I7864e0ab2655c3bee95154ea4dedfb60fe8689e4
CRs-Fixed: 2261226
2018-06-19 21:17:14 -07:00
Tushnim Bhattacharyya
1b6202d341 qcacmn: Restrict the force SCC logic for STA+SAP only
Restrict the force SCC logic for STA+SAP only unless ini is set for
QDF_MCC_TO_SCC_SWITCH_FORCE_PREFERRED_WITHOUT_DISCONNECTION.

Change-Id: If2c4c285b92ea5eba69679561c32875cff5f7b08
CRs-Fixed: 2261717
2018-06-18 16:34:01 -07:00
Ashok Ponnaiah
513c8ead13 qcacmn: Init crypto params with default value
Crypto params are not initalized with default values.
Crypto params initalized with default value during vdev
and peer creation.

Change-Id: I8adacc8b2770e3518bfbfe2da2eb3f6e0d9a5586
Crs-Fixed: 2251816
2018-06-18 16:33:42 -07:00
wadesong
d58eaf419e qcacmn: Fix incorrect indention
Fix the incorrect indention in function
util_scan_populate_bcn_ie_list, which causes newer versions of
gcc complaining.

Change-Id: I2ea0f2ea5bf3e381a789ae832f56a43d511e898e
CRs-Fixed: 2247021
2018-06-15 21:31:21 -07:00
Shashikala Prabhu
ab1d4c30ca qcacmn: Cleanup dfs unused function
Cleanup dfs_mlme_channel_mark_radar unused function.

Change-Id: I16aeacbca8f44de4dcab5667b6065fbb9b5c39d7
CRs-Fixed: 2245665
2018-06-15 20:10:50 -07:00
Bala Venkatesh
96bdde1b07 qcacmn: Fix TDLS tear down issue on initiator
The tdls peer sta id is allocated as part of wma_create_peer.
In HDD, as part of change interface,
wlan_hdd_tdls_disable_offchan_and_teardown_links API is called.
Here driver checks for valid TDLS peers based on staid.
Here HDD assumes staid zero as invalid and non zero values as
valid ID. This is not correct as staid zero also is a valid
staid. Due to this teardown status is not informed to upper layers.

Use 0xFF as invalid sta id for tdls peer to fix this issue.

Change-Id: I3827df9a63081952b2d443c175ef5a59eab85e43
CRs-Fixed: 2258171
2018-06-15 14:49:17 -07:00
Kiran Venkatappa
68cd728ed8 qcacmn: Fix compiler failure with HOST_DFS_SPOOF_TEST not defined
Callbacks are defined for both cases, so remove compiler
flag around callback declaration and assign callback for both
HOST_DFS_SPOOF_TEST enabled and disabled cases.

Change-Id: I5e3cedaaa5be550243ac090da3ab6499c5e83904
CRs-Fixed: 2249806
2018-06-15 12:39:36 -07:00
Wu Gao
7d5128c79b qcacmn: Initialize id before tx MGMT frame
It use an uninitialized variable to TX (not wait ack) MGMT frame.

Change-Id: I46c96a2879a945e8284c436e5ff6b761e1c246ba
CRs-Fixed: 2254688
2018-06-14 23:54:12 -07:00
Sandeep Puligilla
f57464c549 qcacmn: Add an API to check if scan is completed
Add a new scan util API to check if scan is completed and
if scan is success.

Change-Id: Id60056b999a7ec23df3d3458d4498d547f6ec4d9
CRs-Fixed: 2248972
2018-06-14 23:54:10 -07:00
Vignesh U
916926fd97 qcacmn: Move DFS functions to appropriate files
Move the functions dfs_set_update_nol_flag and dfs_get_update_nol_flag
from dfs_cac.c to dfs_nol.c.

Change-Id: Ie2829bf10d5c6f61c4cc062f54c4c9ca2cc6e34b
CRs-Fixed: 2252573
2018-06-14 15:20:43 -07:00
Dustin Brown
b4fd609e03 qcacmn: Reduce excessive p2p logging during suspend
Several bits of debug information are being logged to console from the
p2p module, which is seen consistently during suspend/resume. Reduce the
logging level of these debug logs to avoid spamming the console.

Change-Id: I4cf63e88a9d0391fb366b11fa3eb14e9f2f69698
CRs-Fixed: 2258427
2018-06-14 15:20:38 -07:00
Abhijit Pradhan
45098b95de qcacmn: Fix host dfs confirmation FR issues
1. Do not send the RADAR found command to FW for bangradar. Since FW is
   unaware of the bangradar command for Partial Offload chips there is no
   need to send the Radar found indication to FW in bangradar processing.

2. Fix two times vap restart during spoof test: After sending the radar
   found command to the FW, the host waits for the FW to send the status
   check event to the host but if FW takes a very long time to send the
   event then the host timer times out and restarts the channel. After the
   channel restart if the host receives the status from FW, the host does
   the channel change again. Increase the host timer timeout value to avoid
   the two times channel change.

3. When removing the spoofed-radar-infected channel from NOL list, also
   remove the channel from regulatory channel list so that the regulatory
   channels are consistent with NOL.

Change-Id: I914d48e6202261b87a5ed6f8f40e150eb42463e2
CRs-Fixed: 2250008
2018-06-14 15:20:35 -07:00
Visudha Sathurappan
3ca68af4ff qcacmn: Support PDEV CP Stats for DA
Add change to define pdev cp stats structure
for DA and provide APIs to get/set cp stats

Change-Id: Ib46d8b55b4c38b2c7a9e2bea45977de23ad21939
2018-06-14 13:04:52 -07:00
Nachiket Kukade
49f9618acc qcacmn: Allow broadcast probe req for p2p scan with empty SSID
In case where driver receives a scan request with a single SSID with
an empty string, it must be treated as an active scan with broadcast
probe requests. In case of p2p search, driver treats this as a passive
scan. With this the P2P Client fails to detect existing P2P GO or
Autonomous GO devices, leading to connection failure.

Set flag WMI_SCAN_ADD_BCAST_PROBE_REQ for this type of p2p scan req.
P2P GO devices will respond to probe requests with wildcard SSID
and Cli will be able to connect to them.

Change-Id: Iacb44fb0cb5363f5af6cf7f6efb219857a799075
CRs-Fixed: 2235604
2018-06-14 11:47:05 -07:00
Kabilan Kannan
cf124491c7 qcacmn: Remove unused data structures in TDLS component
Remove the unused data structures in TDLS component
to avoid incorrect usage

Change-Id: Id3997d5895dba8e3cb3f60fe102ca846cb009607
CRs-Fixed: 2232726
2018-06-14 02:56:47 -07:00
Om Prakash Tripathi
9b56f5dc1c qcacmn: Use atomic allocation for all scheduler context scan allocations
In low memory environments using GFP_KERNEL flag may cause
scheduler thread to sleep. Scheduler thread callback handlers
are expected to be atomic in nature to ensure timely execution
of different commands. Move all allocations done by scan module
in scheduler thread context to atomic allocation.

Change-Id: Iee3eafbc00a3afea0687ba67b3041ec0816094cc
CRs-Fixed: 2232553
2018-06-13 21:00:59 -07:00
Dustin Brown
028f560991 qcacmn: Add objmgr check for vdev leaks API
During objmgr psoc teardown, it would be useful to assert that there are
no longer any vdevs attached. Add an API that logs a list of all
vdevs attached to a given psoc, and panics if any are found.

Change-Id: Id618fa396ec1238b1bb7a78dfb6267e2b08470e4
CRs-Fixed: 2255503
2018-06-13 21:00:56 -07:00
Kiran Kumar Lokere
76da7996ae qcacmn: Add support to send regulatory sync event
Add support to send regulatory rules info in regulatory sync
event to user space for self managed regulatory when regulatory
info is updated.

Change-Id: Iac8704598fd181e47cb023405dfe592c4c93f51b
CRs-Fixed: 2242701
2018-06-13 21:00:54 -07:00
Amir Patel
ffc6a0439c qcacmn: Add spinlock release API in objmgr debug code
Spinlock is locked but not unlocked in objmgr debug code,
this leads to deadlock.
To avoid, while iterating over logically deleted nodes,
if macaddr is NULL (macaddr could be NULL, either due object
memory corruption or object itself is NULL) release list lock
and raise BUG(). Also if name of object (psoc/pdev/vdev/peer)
is NULL (object name could be NULL, if obj_type passed while
adding object to logically deleted list is >= WLAN_OBJ_TYPE_MAX)
release list lock and raise BUG()

CRs-Fixed: 2233619
Change-Id: Ib6a67817234bf352b6e3a57360db0c082be19430
2018-06-13 15:24:01 -07:00
Frank Liu
f433b0787c qcacmn: Reject tdls_vdev create/destroy when disabled in INI
Reject tdls_vdev creation and destroy, when TDLS is disabled in INI.

Change-Id: Ie85e8ed231e14dc413e4bfdcff205c47115c84dd
CRs-Fixed: 2229872
2018-06-13 14:11:05 -07:00
Sandeep Puligilla
719f933642 qcacmn: Remove scan event log
Duplicate information is logged
while processing scan event.

Removed the duplicate log from scan
event handler API.

Change-Id: I3d58e594c683875fa82349d47103cc1de67ae18a
CRs-Fixed: 2255904
2018-06-13 14:11:03 -07:00
Amar Singhal
6cc647211d qcacmn: Add legacy code CTRY_JAPAN15 to regdb
Legacy code CTRY_JAPAN15 is still being used. Add that to
regdb as well.

Change-Id: Ibf455b31b11bf909cfba85f487c9c40816eb8959
CRs-Fixed: 2255527
2018-06-08 22:59:44 -07:00
Shashikala Prabhu
26d9f36f90 qcacmn: Do not print DFS error message for non 5 GHz pdev
In Repeater AP scenario, when STA vap starts scan, it calls the
registered DFS callback function to get the AP CAC status. For a
2 GHz pdev, dfs object is NULL and hence 'dfs is NULL' print is
always seen when user enables the dfs error logs.

Add non 5 GHz pdev check in dfs callback function before dfs NULL check.

Change-Id: Id087d0b126996406f2b6e1b5b34b90a12a18a890
CRs-Fixed: 2245034
2018-06-08 10:12:04 -07:00
Wu Gao
dd58f63b13 qcacmn: pmo feature flag disable
In case PMO feature flag disable, add this change. Change
WLAN_PMO_ENABLE  to WLAN_POWER_MANAGEMENT_OFFLOAD.

Change-Id: I875e568dcb239da1b86d1a76cb8cbc925bb13cde
CRs-Fixed: 2243948
2018-06-08 08:31:10 -07:00
Dustin Brown
03f2ec07f7 qcacmn: Use configured value for channel_prediction
The scan component is currently using an unrelated field to populate
the PNO channel prediction enabled field sent to firmware. Use
channel_prediction instead.

Change-Id: I88b066c1b61e7ce49fcee889dfed9b1208d2862f
CRs-Fixed: 2252153
2018-06-06 20:28:36 -07:00
Manjunathappa Prakash
e6aba4f65f qcacmn: Add DP callbacks for flow_pool create and delete
Current lithim_dp flow pool created in wma_vdev_start, wma_vdev_start
is called for same vdev multiple times for vdev. This leads to creation
of multiple flow pools for each vdev. Instead create from policy_manager
when session become active.

Register flow pool create/delete callbacks with policy manager.
So that lithium_dp vdev flow pools are created/deleted when vdev
become active/not-active.

Change-Id: Iaf6aaece47c79c7e6f7745feaee35a6bc5cd1297
CRs-Fixed: 2231601
2018-06-06 05:49:26 -07:00
Tushnim Bhattacharyya
0dd6eb531b qcacmn: Reduce log level to debug for tdls
Reduce the log level for tdls related logs from info to debug.

Change-Id: I0de4d0b4ae78a5b1c72c975d4d928cee7c21970f
CRs-Fixed: 2252980
2018-06-04 15:03:55 -07:00
Rajeev Kumar
f0e1361efe qcacmn: Do not take PSOC ref count during PSOC create notification
Do not take a common object ref count during common object create
notification because until common object destroy notification is
not received the ref count will not be released and in this case
ref count will never be released becasue object destory notification
will never come. takign ref coutn from object create notification
will always lead to object leak.

Change-Id: Iab7da602ef2d627866c3353b978eaa63749b62dd
CRs-Fixed: 2252274
2018-06-04 10:12:37 -07:00
Rajeev Kumar
1239566fc1 qcacmn: Add numeric values to UMAC component id
Add numeric values to UMAC component id for better code
readability and easier offline debugging.

Change-Id: I10d438e68588a756eff05abc7933e78c3e7dd128
CRs-Fixed: 2252908
2018-06-04 10:12:35 -07:00
Zhu Jianmin
da1d4517f4 qcacmn: Check chip capability when enable AP+AP
Check capability of dbs, mcc and scc on single band when enable
AP+AP, then same driver code can support different chip and
firmware.
Add wmi_service_dual_beacon_on_single_mac_(mcc/scc)_support

Change-Id: I505747122504b2a89813e7bdfcd27dc07539f39e
CRs-Fixed: 2214237
2018-06-02 10:26:19 -07:00