Commit Graph

78 Commits

Author SHA1 Message Date
Rachit Kankane
758528a6e5 qcacmn: New value for ini gWlanMccToSccSwitchMode
Currently ini variable gWlanMccToSccSwitchMode has 4 values.
Value 3 enforces SCC in anycase, if SCC is not possible then switchoff
the AP.
Added new value 5 for auto specific scenarios where, if SCC is not
possible the allow MCC.

Change-Id: I584958c6c61f7d1f5e077871e3891bba79f726a3
CRs-Fixed: 2127091
2017-10-23 06:12:37 -07:00
Rachit Kankane
c4e7ce7142 qcacmn: Correction in PCL index fetching routine
In case of SBS or DBS, both the MACs are used for operations.
We have issue in PCL index fatching routines for 3-port
concurrent combinations when first two ports are configured
in DBS mode.

Change-Id: I36ca9979ef4222428e383d89b52ff1388c79ac22
CRs-Fixed: 2127091
2017-10-23 06:12:36 -07:00
Rachit Kankane
76b8464512 qcacmn: PCL update for 3-port combinations
Updated PCL table to support 3-port concurrent scenarios AP+AP+STA,
AP+GO+STA and AP+AP+AP.
The PCL entries are updated to have below behavior:
1. AP+GO or AP+AP will be supported either in DBS or in SCC mode
2. The Precedence order will be DBS, SCC.

Also disabling 3-port combinations with P2P-CLI.

Change-Id: I678e2b5a49577e173c0e34f83a7ccc528313aadd
CRs-Fixed: 2127091
2017-10-23 06:12:34 -07:00
Dustin Brown
3c49b2e6f9 qcacmn: Remove qdf_handle_t from unused qdf_defer APIs
There are many QDF APIs require a qdf_handle_t parameter. None of these
APIs actually use the qdf_handle_t parameter, meaning it can be
completely removed. As a step toward globally removing this unused
type, remove qdf_handle_t parameters from unsed qdf_defer APIs.

Change-Id: I0568aa7cbd430abc0d046143482a067d96bf6313
CRs-Fixed: 2112646
2017-10-12 14:22:02 -07:00
Tushnim Bhattacharyya
e677364a0f qcacmn: Update PCL table for non DBS to give preference to SCC
Update PCL table for non DBS to give preference to SCC in STA+P2P cases.

Change-Id: I0dfa1f2f37960b90a32e325e1397e301f6ce313d
CRs-Fixed: 2118720
2017-09-29 16:29:15 -07:00
Ganesh Kondabattini
2a8c7b0c6d qcacmn: Refactor the code to update the conc_system_pref
Refactor the code to dynamically change the conc_system_pref.
Whenever user changes conc_system_pref from application,
driver is overwriting the conc_system_pref which is getting
populated from ini file. Once it is overwritten there is no way
to get the configured value for this setting. So add a new
variable to hold the value of conc_system_pref without disturbing
default value read from ini file.

CRs-Fixed: 2082073
Change-Id: Icfb245c7a8872885332ec222780c911d08521d46
2017-09-25 13:21:42 -07:00
Ganesh Kondabattini
6c0554aac7 qcacmn: Initialize SAP mandatory chan list
Initialize SAP mandatory chan list.

Change-Id: I126d67da1bfe8426cd3a7b031e97aba907e6155a
CRs-Fixed: 2089122
2017-09-15 11:19:59 -07:00
Tushnim Bhattacharyya
5d284f7b1a qcacmn: Update PCL table for non DBS to give SCC preference
Update the non DBS PCL table to give preference to SCC.

Change-Id: I9d2d982f367bf6fb8d18e4d448fa0c45e95cbbf4
CRs-Fixed: 2063060
2017-09-08 14:28:02 -07:00
Tushnim Bhattacharyya
15c3144230 qcacmn: Strip out the DSRC channels while getting valid channel list
Strip out the DSRC channels while getting valid channel list from sme.

Change-Id: I540869a01dbc045033ba1e3623c3d237b1e5a54c
CRs-Fixed: 2063060
2017-09-08 14:28:01 -07:00
Tushnim Bhattacharyya
b641b5e094 qcacmn: Avoid deadlock while protecting connection list
Avoid deadlock while protecting connection list during SAP channel
switch.

Change-Id: Ib4f8bd3e185b3dd6bd746e49645b6456dca50e96
CRs-Fixed: 2088106
2017-09-02 04:19:21 -07:00
Tushnim Bhattacharyya
126d7e1281 qcacmn: Handle no common channel between PCL and the favorite channel list
Handle the scenario where no common channel between PCL & the
favorite channel list is found.

Change-Id: I560d7ef861d89f3f4a0c63afacd0ffbf6aaa976e
CRs-Fixed: 2063060
2017-09-02 04:19:18 -07:00
Tushnim Bhattacharyya
c5348955ec qcacmn: Fix logic to force SCC in SAP+STA concurrency
If SAP is up & STA is coming up next(or vice versa) on a different
channel causing MCC, move SAP to cause SCC or DBS. This logic is
enabled only if gWlanMccToSccSwitchMode is set to
QDF_MCC_TO_SCC_SWITCH_FORCE_WITHOUT_DISCONNECTION or
QDF_MCC_TO_SCC_SWITCH_WITH_FAVORITE_CHANNEL.

Change-Id: I16615d828a285762133ee3533339320ef119b3d3
CRs-Fixed: 2063060
2017-09-02 04:19:15 -07:00
Tushnim Bhattacharyya
8d185ebf41 qcacmn: Dynamically allocate memory for work sta_ap_intf_check_work
To handle back to back scheduling of sta_ap_intf_check_work, allocate the
memory used by the work dynamically.

Change-Id: Ibbcfafb2fadd2de1cca44086f9335dca86641f50
CRs-Fixed: 2070220
2017-09-02 04:19:12 -07:00
Tushnim Bhattacharyya
5e026735cb qcacmn: Add logic to force SCC in SAP+STA concurrency with ACS
If STA is up & SAP is comings up on a ACS derived channel causing MCC,
move SAP to the other band if DBS is supported. This logic is enabled
only if gWlanMccToSccSwitchMode is set to
QDF_MCC_TO_SCC_SWITCH_FORCE_WITHOUT_DISCONNECTION.

Change-Id: I48d809f83921292f51ca1735bff4c4d6dd339975
CRs-Fixed: 2063060
2017-09-02 04:19:09 -07:00
Tushnim Bhattacharyya
a2c3b62a86 qcacmn: Add logic to force SCC in SAP+STA concurrency - Part 2
If STA is up on a a DFS or passive or LTE unsafe channel & SAP is
comings up that causes MCC, move SAP to the other band if DBS
is supported. This logic is enabled only if gWlanMccToSccSwitchMode
is set to QDF_MCC_TO_SCC_SWITCH_FORCE_WITHOUT_DISCONNECTION.

Change-Id: I5d393a21301f3fa838f7cf38620fb1d57ae1d57a
CRs-Fixed: 2063060
2017-09-02 04:19:06 -07:00
Tushnim Bhattacharyya
08a833946d qcacmn: Add logic to force SCC in SAP+STA concurrency
If SAP is up & STA comes up or moves to a DFS or passive or LTE
unsafe channel that causes MCC, move SAP to the other band if DBS
is supported. This logic is enabled only if gWlanMccToSccSwitchMode
is non zero.

Change-Id: I56f78dfaedec31c4c41aea6ac8c66261c9ad4c91
CRs-Fixed: 2063060
2017-09-02 04:19:03 -07:00
Liangwei Dong
0027e3f02b qcacmn: Fix hotspot starting failure
When softap is stopping, there are two threads
accessing the "conc_connection_list".
hostapd thread (__wlan_hdd_cfg80211_stop_ap) read
and modify it by cds_decr_session_set_pcl.
cds_mc_thread thread (cds_get_valid_chan_weights)
read and modify it by cds_store_and_del_conn_info
and cds_restore_deleted_conn_info.

They are not protected,which causes two same
station connection info saved to the
"conc_connection_list".

This fix is to acquire lock before read/modify
the list.

Change-Id: I5f1becef711363f659044c46e69fab1cd6d07d81
CRs-Fixed: 2038000
2017-08-29 20:57:54 -07:00
Tushnim Bhattacharyya
05328bb022 qcacmn: Save the unsafe channels in policy manager
Save the list of unsafe channels in policy manager to be used on PCL.

Change-Id: Ibb705830e878d1cc03dfbc76e49c169d2febd75d
CRs-Fixed: 2095290
2017-08-29 20:56:02 -07:00
Linux Build Service Account
2e60f19594 Merge "qcacmn: Fix the use of uninitialized variable in policy manager" 2017-08-24 08:11:07 -07:00
Linux Build Service Account
8d8abf08a3 Merge "qcacmn: Reduce log spam from policy manager" 2017-08-24 08:11:06 -07:00
Tushnim Bhattacharyya
8b60ebb5c6 qcacmn: Reduce log spam from policy manager
Reduce log spam from policy manager by converting non essential & periodic
logs to debug level.

Change-Id: I3cb01b47dd56edcf141479b14ea1e51e89b0473a
CRs-Fixed: 2094743
2017-08-22 10:56:00 -07:00
Tushnim Bhattacharyya
ecc6e108b1 qcacmn: Expand the use of gDualMacFeatureDisable INI
Few OEMs want DBS to be disabled for connections while
keeping DBS scan enabled.
Few OEMs want advance DBS scan features to be disabled.
Provide different value to gDualMacFeatureDisable INI item
to achive the goal.

Change-Id: Iddf5df23575a2f907bb8dbd0c37e03ff4ebbdea8
CRs-Fixed: 2068779
2017-08-22 08:40:53 -07:00
Tushnim Bhattacharyya
42b8067e18 qcacmn: Fix the use of uninitialized variable in policy manager
Initialize the uninitialized variable in
policy_mgr_get_channel_from_scan_result().

Change-Id: I435e6021b989562b69b3bccaa9a90d9cfd3ae560
CRs-Fixed: 2091884
2017-08-21 13:16:35 -07:00
Tushnim Bhattacharyya
c989ebe26e qcacmn: Relax the check on nss field during HW mode table lookup
Relax the check on nss field during FW advertised HW mode table lookup.
Instead of looking for exact match look for less than or equal to the FW
advertised nss value.

Change-Id: I360d14282f03aad25f4338546cbcbfb3cbd3a76b
CRs-Fixed: 2090863
2017-08-17 17:25:19 -07:00
bings
ffe5ca51ed qcacmn: Fix connection information deleting and restoring
Currently only one connection information corresponding to the
provided mode is deleted and restored, which causes channel
selecting failure in DFS testing with AP+AP concurrency mode.
When radar is found in AP+AP concurrency mode, a new valid channel
should be selected. Before selecting the channel, all existing
connection information of SAP mode should be deleted, otherwise
no valid channel can be selected.

All the connection information corresponding to the provided mode
should be deleted and restored.

Change-Id: Id363dbb2c31485fefcd6915696060923063079bb
CRs-Fixed: 2079597
2017-08-16 03:27:29 -07:00
Tushnim Bhattacharyya
da68b5a736 qcacmn: policy_mgr_mode_specific_modification_on_pcl to be called per mode
policy_mgr_mode_specific_modification_on_pcl to be called for the
connection type for which get_pcl is called.

Change-Id: I78010ebf877130eca9eaa0074a833fb5b7faa4a1
CRs-Fixed: 2079986
2017-08-03 18:04:24 -07:00
Archana Ramachandran
944f1fda18 qcacmn: Disallow moving to single MAC mode when a 2.4GHz connection exist
After the P2P GO is up on 2.4 GHZ, the opportunistic upgrade
timer handler is sending request to move to single MAC mode.
Since 2.4 GHZ connection is always on MAC1 in DBS 2X2 capable
HW, this is causing P2P connection failure. Add fix to not
downgrade to single MAC mode when there exist a 2.4 GHZ
connection.

Change-Id: I90e2b5b43a6bc8a5b5b44ea96905410092f2866e
CRs-Fixed: 2055867
2017-06-27 18:12:55 -07:00
Vivek
92e301c414 qcacmn: Remove vdev/peer locks for trivial APIs
Remove vdev/peer locks from trivial API's. This follows the changes from
which the lock requirement from few simple APIs are removed.

Change-Id: I9972d51dfd1a42bdedbfd0fd4e67af03d030a1f5
CRs-Fixed: 2060880
2017-06-26 23:32:22 -07:00
Ajit Pal Singh
c1246b19b9 qcacmn: Move GO to STA channel to achieve SCC
Enable movement of GO to STA channel to achieve SCC.
This movement is controlled by the ini variable
"gWlanMccToSccSwitchMode" just as its done for SAP.

Change-Id: I50f9487aa26dfc359211699f3d46e7869cedca4b
CRs-Fixed: 2062450
2017-06-19 00:45:54 -07:00
Nitesh Shah
c26d3bdbb3 qcacmn: Validate mode and vdev while decrementing session
The function policy_mgr_decr_active_session() decrements mode
and then remove the session from the pm_conn_connection_info
table after validating vdev.

This change adds a check to validate if the session is present
with specific mode and vdev_id, and then decrement the session.
If not present, then return without doing any change.

Change-Id: If53d7fc9356b2c3bb72b22b228103389396910ce
CRs-Fixed: 2057599
2017-06-15 03:55:01 -07:00
Tushnim Bhattacharyya
ee5e70ec85 qcacmn: Restart SAP with CSA/ECSA when gWlanMccToSccSwitchMod=3
Restart SAP with CSA/ECSA when ini variable gWlanMccToSccSwitchMod=3.
Currently ini variable setting gWlanMccToSccSwitchMod=2 was
causing SAP to restart with CSA.
Change-Id: I9a4b68cd154fa63325d146510832c2410f2dc244
CRs-Fixed: 2058567
2017-06-14 03:21:22 -07:00
Krunal Soni
2ff84bd4de Revert "qcacmn: Provide Rx LDPC support for 2G STA"
This reverts change-id: Ib0183fea06619056c61e297d3fcfd82d91775dcd.

CRs-Fixed: 2046542
Change-Id: I558d2d78683133fbd8ab97260aa484a997bd3e7e
2017-06-12 12:41:42 -07:00
Nitesh Shah
df19983a64 qcacmn: Provide Rx LDPC support for 2G STA
Currently Rx LDPC is disabled for STA(2G) connection due to
PHY-B hardware limitation. PHY-A can still support RxLDPC, so
make changes such a way that when ever STA is on 2G band and
current hardware mode is non-dbs then enable the Rx LDPC and if
STA is on 2G band and current hardware mode is dbs then disable the
RX LDPC.

Change-Id: Ib0183fea06619056c61e297d3fcfd82d91775dcd
CRs-Fixed: 2046542
2017-06-08 11:34:40 -07:00
Ajit Pal Singh
c0af3e87c6 qcacmn: Add vdev-mlme caps MASK for restrict_offchannel
Adds new vdev-mlme caps mask WLAN_VDEV_C_RESTRICT_OFFCHAN for
tracking restrict offchannel setting.
When this bit is set any operations which can cause the AP/GO
to leave the operating channel are avoided.

Also reads vdev-mlme caps:WLAN_VDEV_C_RESTRICT_OFFCHAN in function
policy_mgr_is_dnsc_set() to determine if Do_Not_Switch_Channel
is enabled.
Moves declaration of policy_mgr_is_dnsc_set() to
wlan_policy_mgr_api.h so that it can be used outside of policy manager.

Change-Id: I53013af5f4c72917f862630e63333951ec75ce8c
CRs-Fixed: 2050999
2017-06-05 11:41:36 -07:00
Nitesh Shah
6bc3f98983 qcacmn: Avoid race condition while modifying connection list
In case of STA-AP case, new thread is created to call the func
policy_mgr_check_sta_ap_concurrent_ch_intf() that calls
policy_mgr_get_pcl_for_existing_conn() that modifies
pm_conc_connection_list table. The mc_thread calls
policy_mgr_get_valid_chan_weights() that also modifies
pm_conc_connection_list table. But the race condition is
created that mess up the pm_conc_connection_list table.

This race condition also leads to the scenario where the STA
connection to the AP is not updated properly . This shall lead
to the improper PCL update for a STA+SAP concurrency and thus
the channel switch fails.

The fix is to protect the whole sequence of the function
policy_mgr_check_sta_ap_concurrent_ch_intf() with mutex to avoid
race condition.

Change-Id: Ibb6d804afa70ef45d99e7ec9fc7fecc4993c7621
CRs-Fixed: 2047765
2017-05-26 19:20:46 -07:00
Vikrampal
7e4d4c2699 qcacmn: Handle multiple H/w DBS modes
Host handling enhanced in case of F/w advertising multiple DBS H/w modes

Change-Id: I90dfd9360df60be126dbfa8add30d38aeb6f7bf1
CRs-Fixed: 2048301
2017-05-26 06:20:28 -07:00
Kabilan Kannan
5125d0f518 qcacmn: Fix TDLS set state cmd sequence for roaming
Firmware expects TDLS set state cmd before vdev stop, but
the cmd is going out of sequence during roaming and induce
crash in the system.
Send the TDLS set state cmd with correct sequence.

Change-Id: Ie106b8a8cebaa7f107c9eff67dda924b231162da
CRs-Fixed: 2048036
2017-05-17 21:07:33 -07:00
Tushnim Bhattacharyya
6fb01f70f4 qcacmn: Move the lock initialization to module open for policy manager
Move the lock initialization to module open from module enable for policy
manager.

Change-Id: I44716537dcb3f559c1c27401bb579239c98a9f02
CRs-Fixed: 2009818
2017-05-09 19:05:45 -07:00
Nitesh Shah
3ab43844f0 qcacmn: Get channel properly from conc_connection_list table
The channel information is obtained from the conc_connetion_list
table using the index equal to the session_id. But the session in
conc_connection_list table is not kept in the increasing order of
session_id. Thus, the wrong channel information can be obtained.

Thus, the fix is to obtain the channel information from the
conc_connection_list table corresponding to the index whose
vdev_id matches the session_id.

Change-Id: If289ea7c0567b892dba495b878540f9cb5df5668
CRs-Fixed: 2039474
2017-05-05 04:31:29 -07:00
Tushnim Bhattacharyya
9647e35f73 qcacmn: Filter PCL with NOL
Filter the PCL with NOL before providing to the requester to avoid
including radar channels in PCL.

Change-Id: I915572f6653a6c9c98cb525c03570543cfc86e12
CRs-Fixed: 2009818
2017-05-01 13:45:13 -07:00
Vikrampal
31eb12c1b2 qcacmn: Modify H/w DBS cap check and fetch NSS
Modify API policy_mgr_is_hw_dbs_2x2_capable() to check H/w DBS
capability and check if downgrading needed while entering DBS.

Define a new API policy_mgr_get_hw_dbs_nss() to get NSS
information of both MAC0 and MAC1.

Change-Id: If24817017f675e45197d060cd75317aa381256de
CRs-Fixed: 2037487
2017-04-30 18:20:38 +05:30
Ajit Pal Singh
c65575e543 qcacmn: Add API to check Do Not Break Stream eligibility
1) Adds new policy mgr API 'policy_mgr_is_chan_ok_for_dnbs' to check
if a channel is OK for "Do Not Break Stream".
It means that if Do_Not_Switch_Channel is set for AP/GO vdev,
the channel passed should be either the AP/GO channel or a channel
from the other band.
2) Adds a new function policy_mgr_get_mode_specific_conn_info() to get
the mode specific connection count.

Change-Id: I4da6f7d56d01b01761a5f3557b8acbb84226a6fd
CRs-Fixed: 2037302
2017-04-28 01:18:55 -07:00
Tushnim Bhattacharyya
d7655cae83 qcacmn: Add missing ini configurations to policy manager
Add missing ini configurations to be used in policy manager.

Change-Id: Id94c017f3c96ef0376028d124b11fd48ee24fe7e
CRs-Fixed: 2009818
2017-04-27 23:59:22 -07:00
Tushnim Bhattacharyya
590c40f63b qcacmn: Fix memory leak at policy manager initialization
Fix memory leak in policy manager init/deinit sequence.

Change-Id: I3c1728f2becb16b415f532acf657c7c29dc76122
CRs-Fixed: 2009818
2017-04-27 23:59:21 -07:00
Tushnim Bhattacharyya
fe5117036d qcacmn: Fix next action status in policy manager for SBS
The next action function to reflect the SBS capability in its status
correctly. If SBS is not supported the second connection should proceed,
without waiting for a HW mode change to SBS.

Change-Id: I99eee6c854c6a1605f1c5b7655773818811f19ea
CRs-Fixed: 2021512
2017-04-27 23:59:20 -07:00
Kabilan Kannan
c81d3750b0 qcacmn: Add sta connect/disconnect in TDLS UMAC component
Add sta connection and disconnection event related
methods into TDLS component

Change-Id: I1309792cf68df87b1ecf5a7686ac645ac21d1c7c
CRs-Fixed: 2034220
2017-04-20 00:04:49 -07:00
Tushnim Bhattacharyya
ce237d682b qcacmn: Replace legacy regulatory APIs with new ones from host cmn
Get rid of legacy regulatory API references from policy manager
as the new ones are available now.

Change-Id: I48d41599d7faeb760b51ca5f0d7672e8484e7f91
CRs-Fixed: 2009818
2017-04-16 15:58:34 -07:00
Tushnim Bhattacharyya
9807d0cd8d qcacmn: Prune PCL to active channels only for P2P GO
Prune the PCL to have only active channels for P2P GO mode.
Change-Id: Ifade00b3ccfcecff16a49e9e9aa5e077d5f9629b
CRs-Fixed: 2029007
2017-04-11 11:04:15 -07:00
Tushnim Bhattacharyya
d187078c65 qcacmn: Fix checkpatch warning in policy manager component
Fix checkpatch warning in policy manager component.

Change-Id: Ibef1681f3dc8e17b0d1d7bcde0d7dbea5526eedf
CRs-Fixed: 2009818
2017-04-04 20:07:23 -07:00
Tushnim Bhattacharyya
00ccf115f5 qcacmn: Add null check for legacy callback functions in policy manager
Add null check for callback functions registered from legacy modules
with policy manager.

Change-Id: I8a08870ea904f4e01a17f6a472bdd609df9c3c4c
CRs-Fixed: 2009818
2017-03-29 07:58:09 -07:00