Commit Graph

188 Commits

Author SHA1 Message Date
Wu Gao
3545e64d4a qcacld-3.0: Cleanup DFS CAC timer when SSR and reset all adapters
In SAP and SSR case, it won't cleanup DFS CAC timer until up layer
kill hostapd. It will call wlansap close when hostapd exit. If
enable sap internal restart in this case, it will double init DFS CAC
timer, which cause abnormal in kernel. Solution is cleanup DFS CAC
timer when reset all adapters.

Change-Id: I96962349af548074e226976c8c01cd5a8710ed3f
CRs-fixed: 2075904
2017-07-17 18:29:13 -07:00
Srinivas Girigowda
eaf136a65e qcacld-3.0: Fix clang warnings 'taking address of packed member'
warning: Taking address of packed member 're_list' of class or
structure 'dfs_event' may result in an unaligned
pointer value [-Waddress-of-packed-member].

Change-Id: I498aebc7631854774302379a96e844fa11be3ea6
CRs-Fixed: 2055487
2017-07-13 01:48:01 -07:00
Srinivas Girigowda
74a66d627b qcacld-3.0: Fix clang warnings implicit enum type tAniBool
warning: implicit conversion from enumeration type 'tAniBool'
(aka 'enum eAniBool') to different enumeration type
'eSapBool' [-Wenum-conversion]

Replace tAniBool/eSapBool with bool.

Change-Id: I919488d2accc094049375fffe8b54a5d7dea621e
CRs-Fixed: 2055487
2017-07-13 01:47:55 -07:00
Kapil Gupta
c1224bf234 qcacld-3.0: Changes to correct channel flags for vendor ACS
In the reg channel info which is sent to external channel
selection daemon, Some channel flags are missing which causes
application to select wrong channel.

Add changes to correct channel flags.

Change-Id: I80834dd7f5f4bfbd2fce88084a938356a741140c
CRs-Fixed: 2068354
2017-07-11 07:27:12 -07:00
Amar Singhal
7f55e34ea7 qcacld-3.0: Modify regulatory apis to pdev level
To support reg-domain at pdev level, modify the usage of some
apis to pdev level.

Change-Id: I37c504f77c7704553714cc74cba6c5ef882e774c
CRs-Fixed: 2048784
2017-07-10 09:37:08 -07:00
Varun Reddy Yeturu
0d3d9916c4 qcacld-3.0: Cleanup CBMode in SME
Cleanup the variable CBMode as there is no usage of
the variable in the code

Change-Id: I4e63a0f6f1cddd639f324c177b198e4b5c18e9e0
CRs-Fixed: 2063149
2017-07-09 23:41:17 -07:00
bings
61d5bec36f qcacld-3.0: Do not assign ht_sec_ch with sec_ch_offset
Supplicant reports ACS failed, if driver indicates invalid ht_sec_ch.
Do not assign ht_sec_ch with sec_ch_offset, because they are not the
same thing.

Change-Id: I8fb2a42973b67bb045d385b1fd90ee32917450ea
CRs-Fixed: 2067092
2017-07-03 19:54:18 -07:00
lifeng
c0fb61a3f5 qcacld-3.0: Fix the issue of launching guest ap in SCC
Try to set ap-ap mode on single wifi with acs enabled,
primary ap can start up successfully, but fail to bring up
the guest ap.

The fix is to call appropriate procedure once the guest ap
skip acs scan before starting bss.

Change-Id: I106269308932dafff27f9dc0665ade06b88e99a6
CRs-Fixed: 2063960
2017-06-29 23:40:52 -07:00
Varun Reddy Yeturu
dd51e8d67b qcacld-3.0: Fix logging levels - Part 2
Move the log messages to appropriate log levels so that
the console does not get a huge spam of unnecessary logs

Change-Id: Ie58b45078ad8b4732d7b84bfb77261396bd5862a
CRs-Fixed: 2043741
2017-06-29 20:30:36 -07:00
lifeng
9537f47b1d qcacld-3.0: Fix memory leak in acs procedure
qcacld-2.0 to qcacld-3.0 propagation

Free the memory for channel list once the scanStatus is NOT
eCSR_SCAN_SUCCESS in WLANSAP_PreStartBssAcsScanCallback.

Change-Id: Id2d7fe5d7df8c032d50f02880deedb2ed1ac79fd
CRs-Fixed: 2059751
2017-06-29 05:01:24 -07:00
Sandeep Puligilla
994f620e23 qcacld-3.0: Cleanup legacy scan in SAP module
Cleanup legacy scan code in the SAP module.

Change-Id: Ifdb2575727c5c52a2b09c03d8bde43e5fd8fb910
CRs-Fixed: 2063667
2017-06-21 05:56:13 -07:00
Arif Hussain
8cc9d8407b qcacld-3.0: Fix sap context memory leak
Make sure to decrement sap context ref count in wlansap_roam_callback
for failure case also, else this will prevent freeing sap context memory
in during driver unload in wlansap_close().

Change-Id: I07bd8a254196e2fc38018b738b20a9f6746d6b92
CRs-Fixed: 2012433
2017-06-16 05:26:11 -07:00
Manikandan Mohan
3dad1a4869 qcacld-3.0: Fix mem leak in SAP SSR
Fix a memory leak observed if SAP restart fails after SSR.

Change-Id: I868b20972e4b78b6f6c89a26fc41ad10161c239c
CRs-fixed: 2060614
2017-06-14 19:26:43 -07:00
Varun Reddy Yeturu
beaf750b85 qcacld-3.0: Fix the logging levels
Move a few logs to appropriate levels so that they are
not unnecessarily spamming the dmesg

Change-Id: I0ae839ef1420f3a540cfccee3867261ddf5a5870
CRs-Fixed: 2043741
2017-06-05 19:29:02 -07:00
Mahesh Kumar Kalikot Veetil
8d3cbeebc0 qcacld-3.0: Add missing enums to sap_hdd_event_to_string()
Add eSAP_DFS_CAC_INTERRUPTED, eSAP_ECSA_CHANGE_CHAN_IND and
to sap_hdd_event_to_string(). Currently these events are
printed as eSAP_HDD_EVENT_UNKNOWN.

Change-Id: Ic59b4dfcfdd09aa808398d9dcd0b935cedfa7de3
CRs-Fixed: 2053387
2017-06-05 13:29:42 -07:00
Arif Hussain
957b20873a qcacld-3.0: Fix isCacEndNotified flag init to fix issues across ssr
If SAP operating in DFS channel and CAC was done, isCacEndNotified
flag was set to true. If ssr triggers, SAP will restart and does cac
wait, and isCacEndNotified flag remains set which will prevent sending
vdev up to firmware to start beacon after cac done.

Change-Id: I02b9c1dbcd1f37df1de134ce54233c2061bf7cec
CRs-Fixed: 2049957
2017-06-02 14:47:38 -07:00
Arif Hussain
72edc5955a qcacld-3.0: Fix cac duration issue with weather channel
Make sure to update cac duration correctly if any of the
bonded channel is weather channel.

Change-Id: If96654427abd32757a592a1e89113c185127f221
CRs-Fixed: 2034640
2017-06-01 21:21:20 -07:00
Naveen Rawat
8021e459e1 qcacld-3.0: Fix memory leak in restart bss path
Function sapconvert_to_csr_profile is allocating memory for
pRSNReqIE without checking if it is already populated. This
will leak memory if this function is getting called for sap
restart. Fix this by first freeing memory if already allocated.

Change-Id: I562b1dabb330057b4f1b934b0edad692330aab70
CRs-Fixed: 2046608
2017-05-19 11:06:34 -07:00
Kiran Kumar Lokere
b1d412e15d qcacld-3.0: Add support for regulatory component ucfg apis
Add support for regulatory component ucfg apis to provide user
configuration

Change-Id: I994e53b17788472de979df9dce9e18c6f68de850
CRs-Fixed: 2012415
2017-05-18 13:42:29 -07:00
Jayachandran Sreekumaran
68c952c716 qcacld-3.0: Add acs config parameter acs_policy
A new external acs configuration parameter acs_policy.
This parameter indicates the external ACS module whether
its mandatory or preferrable to select a channel
from the preferred channel list provided by the
driver

Change-Id: I80925109349c68c95f25ba27d87bd68964c4eb04
CRs-Fixed: 2037034
2017-05-11 01:26:07 -07:00
Krunal Soni
0bdfc7716c qcacld-3.0: Release sapctx in all cases when sap close is requested
Present wlansap_close API walks out without releasing the sapctx when
hal context is null which creates the memory leak.

Release sapctx in all cases when caller requests to close the
sap session.

CRs-Fixed: 2040045
Change-Id: I3c8f0a33c11de9d88d6b29f726f36a838f2428d2
2017-04-30 12:30:28 -07:00
Rachit Kankane
2487f8f7e9 qcacld-3.0: HDD, SAP changes to Disable/Enable NOA
P2P-GO whenever goes offchannel, issues NOA. With this behavior, we
have issue whenever legacy STA connects to P2P-GO as legacy STA
does not understand NOA. To handle this case, changes are done in HDD
and SAP component and the revised behavior will be:
 1. By default no change in NOA.
 2. Whenever first legacy STA connects to GO, SAP informs HDD with
    new parameter station type. HDD will communicate the same to
    p2p protocol component. Once the connected station is authorized
    p2p protocol component will disable NOA (i.e. P2P-GO will start
    issuing Self-CTS whenever it goes off-channel).
 3. Whenever last legacy STA disconnects from GO, p2p protocol
    component enables NOA (i.e. P2P-GO will start issuing NOA whenever
    it goes off-channel).

Change-Id: Iadab47c9a2aeb434371d4c262623d7196f3b1ab4
CRs-Fixed: 2035609
2017-04-28 04:42:04 -07:00
Arif Hussain
4e9afac0cf qcacld-3.0: Use dfs api to convert chan to freq
center frequency of 40/80/160 are not valid frequency
for regulatory component, so regulatory api's may not
covert freq to channel or chan to freq. use dfs api’s
to covert the same.

Change-Id: I3bb7d4997d0dbcbd757537fe3fee9ad5f7f97904
CRs-Fixed: 2017481
2017-04-27 23:11:27 -07:00
Arif Hussain
cd1516322d qcacld-3.0: Use dfs component support
Remove legacy dfs api’s and use dfs component.

Change-Id: Ia0fa016b174ef4b50e2cc339e4e476ec65642dbf
CRs-Fixed: 2021357
2017-04-25 01:08:44 -07:00
Kiran Kumar Lokere
a3de226328 qcacld-3.0: Replace regulatory apis with reg component apis
Replace the legacy regulatory apis with regulatory component
public service apis

Change-Id: Ifd8c93fc8f57116cfc432b853248b35fd7ed1b94
CRs-Fixed: 2008013
2017-04-20 17:10:19 -07:00
Krunal Soni
074dd2c690 qcacld-3.0: Don't open or close sap session internally
There are few instances in current driver code, where SAP's
session is getting opened or closed internally by SAP module
which is wrong. It should come from HDD module.

Resolve above mentioned issue by following:
1) allocating and opening sap session through wlansap_open and
   wlansap_start APIs respectively.
2) freeing and closing sap session through wlansap_close and
   wlansap_stop APIs respectively.

Remove all other instances of sap_open_session and
sap_close_session.

Change-Id: I9ac9f68c9cd1f8c856b6228d4e3b32d3310c936a
CRs-Fixed: 2036385
2017-04-20 11:33:25 -07:00
Krunal Soni
b01de79ea7 qcacld-3.0: Refactor sap_open_session & sap_close_session APIs
Divide sap_open_session in to two parts. One where sme_open_session
is happening and the other one where sap context is getting initialized
to some values.

Divide sap_close_session in to three parts. One where sme_close_session
is happening, another where sap context is getting reset, and the
remaining one where global dfs parameters are getting reset.

Change-Id: I3126acbf4174261938c1f1ff19637bce87d7bddf
CRs-Fixed: 2036385
2017-04-20 11:33:23 -07:00
Amar Singhal
5cccafec64 qcacld-3.0: Wiphy initialization for regulatory offload
For regulatory offload, send the regulatory config settings to regulatory
component to compute the current channel list. Query channel list for
each band. Populate the channel list in wiphy. Also do not register
regulatory notifier with the kernel anymore.

CRs-Fixed: 2008013
Change-Id: Ia4995c7498d97fe1e37717e65daa9dcacb2f21b3
2017-04-16 15:58:42 -07:00
bings
1fe8a4759b qcacld-3.0: Restore pMac->sap.sapCtxList in start_ap context
qcacld-2.0 to qcacld-3.0 propagation

sap_OpenSession is called in add_virtual_intf context, while
sap_CloseSession is called in stop_ap context. Sap can't start
successfully in dfs channel if hostapd is killed and restarted,
because sap_CloseSession clears pMac->sap.sapCtxList.

Restored pMac->sap.sapCtxList in start_ap context.

CRs-Fixed: 2032512
Change-Id: Ief31b4994ad74159795619f3d4f13891f28585de
2017-04-16 01:43:41 -07:00
bings
e278238ac1 qcacld-3.0: Fix channel weight in sap_sort_chl_weight_all
qcacld-2.0 to qcacld-3.0 propagation

Currently if acs configs channel width as 40/80MHZ, it may select
invalid channel as its second channel.
When doing sap_select_channel, if acs configs channel width as
40/80MHZ, every candidate channel and its adjacent channel should
be checked whether it can satisfy 40/80MHZ or not. Mark the weight
of the channel that can't satisfy 40/80MHZ as max value
in sap_sort_chl_weight_all, so it will not be selected.

Change-Id: I69abbb752be8d0fae2644a9000156735048d6d16
CRs-Fixed: 1085469
2017-04-11 04:16:40 -07:00
Srinivas Girigowda
678586caff qcacld-3.0: SAP: Reduce the log spam in kmsg
Move the logs to appropriate log levels to reduce
the log spam in kmsg.

Change-Id: Ib53e9944677893ee29a59293dbbfa4a1df2f224d
CRs-Fixed: 2014745
2017-04-08 08:50:26 -07:00
Arif Hussain
759a023602 qcacld-3.0: Add cac and phyerr processing offload support
In case of dfs offload, do not run cac timer, as cac will also be
offloaded in that case. Decide the same based of service bit info.

Change-Id: If4dd62628270ff0ba8632a9cd644a9d7ed6f31a4
CRs-Fixed: 2021357
2017-04-03 18:41:24 -07:00
Arif Hussain
671a190aa9 qcacld-3.0: Add cac duration and dfs region in vdev start
Add support to fill cac duration and dfs region in  vdev
start command, these values are used in firmware on phyerror
processing and cac timer offload cases.

Change-Id: I8bfbd4a3f59002f92ee2e5e321c15da849fce9ec
CRs-Fixed: 2021357
2017-04-03 18:41:22 -07:00
Srinivas Girigowda
f10a42e811 qcacld-3.0: Fix the variable uninitialized compile error
This is a qcacld-2.0 to qcacld-3.0 propagation.

Fix the variable uninitialized compile error.

Change-Id: I941d76a75a52b4cc6bd3de831b04f960f506f802
CRs-Fixed: 2022835
2017-03-31 23:57:41 -07:00
Archana Ramachandran
2eb7a61aeb qcacld-3.0: Register legacy callbacks with Policy Manager part 2
Register legacy callbacks with Policy Manager part 2.

Change-Id: Ia2d2999d75866bf1f9ca5984ae49cbbe7c5a3192
CRs-Fixed: 2009818
2017-03-30 16:27:02 -07:00
Tushnim Bhattacharyya
45ed04f74c qcacld-3.0: Add correct header files in legacy code
After removing legacy policy manager header file had to add
correct header files from host common to allow the compilation
to happen successfully.

Change-Id: I566b8f09776520e8a43eb48cc944ce627dc0c5cf
CRs-Fixed: 2009818
2017-03-30 16:26:43 -07:00
Tushnim Bhattacharyya
66348bd6ba qcacld-3.0: change mac for policy manager restructuring
Modify mac code to cope with the policy manager moving to host
common.

Change-Id: I2fa5f7ed1a597b4fa5cea6aa87f5ed9f849a1cd7
CRs-Fixed: 2009818
2017-03-30 16:26:29 -07:00
Will Huang
55ba104911 qcacld-3.0: Avoid dead loop in sap_process_avoid_ie
qcacld-2.0 to qcacld-3.0 propagation

In function sap_process_avoid_ie, if type of avoid_ch_ie is not
QCOM_VENDOR_IE_MCC_AVOID_CH, we need to get next node(scan result)
for process. Otherwise the dead loop causes VosMcThread stuck.

Change-Id: If0e736c5b8a5638ea2bc96c3afb25be286959942
CRs-Fixed: 2019048
2017-03-28 13:00:57 -07:00
Dustin Brown
d28772bde9 qcacld-3.0: Change sme_open_session to take a session Id
Currently, vdev_id and session_id are assumed to be the same, but are
generated in two separate code paths. Unsurprisingly, this leads to a
whole host of desync issues. Instead, modify sme_open_session to take
a session_id, which will be populated with an objmgr vdev_id. This means
vdev_id and session_id can no longer desync, as there is only a single
source for both.

Change-Id: I104aba29beb3c19d0ef2ff23380e3d005e01ced0
CRs-Fixed: 2022136
2017-03-28 12:49:04 -07:00
Service qcabuildsw
00aa176941 Merge "qcacld-3.0: [11AX] Add dot11mode changes to support 11ax" into wlan-cld3.driver.lnx.2.0-dev 2017-03-23 11:54:45 -07:00
Krishna Kumaar Natarajan
4f1d7724a8 qcacld-3.0: [11AX] Add dot11mode changes to support 11ax
Add new dot11mode and update the utility functions to derive
the dot11mode based on the userspace config, INI config and
FW capability.

Change-Id: I5780120ef7bc2b78fd596e937fe14a2c8ad88348
CRs-Fixed: 1073481
2017-03-22 09:09:29 -07:00
bings
297247160e qcacld-3.0: Fix invalid peer local id in sap start bss
qcacld-2.0 to qcacld-3.0 propagation
Currently when cac ends, it will trigger eSAP_START_BSS_EVENT
with peer local id 0. If there is no peer with 0 local id, sap
starts fails.

Actually valid peer local id should be saved in sap context,
so it can be used in sap_signal_hdd_event.

Change-Id: I3779cb181390650844475b1a2f18768cb5784cf2
CRs-Fixed: 1096534
2017-03-20 23:57:04 -07:00
Arif Hussain
405587c313 qcacld-3.0: Remove unnecessary log from wlansap_roam_callback
wlansap_roam_callback function logging an error message if
roam_status is not handled, in default case of switch, but same
information is logged before switch. So remove this log.

Change-Id: Id53eb392929d9328f959c7e54d7f0a5dd77b0739
CRs-Fixed: 2007415
2017-03-17 16:19:41 -07:00
Kapil Gupta
43c2f997ea qcacld-3.0: Correct API for acs channel range validation
qcacld-2.0 to qcacld-3.0 propagation

Add changes to correct the function to check for acs channel range.

CRs-Fixed: 1117328
Change-Id: Ie0a53c2f5ee26552d36da0e6c4dcda124abc71a7
2017-03-13 04:39:13 -07:00
yeshwanth sriram guntuka
92fefea5ed qcacld-3.0: Fix rate population on channel change of SAP
On channel change of SAP to 5G, SAP is populating 2.4G basic
rates in 5G beacon.

Set number of supported and extended rates to zero for populating
rates based on network type. CSR layer will pick default rates if
hostapd rates are passed as zero

Change-Id: Ia393f7b6067f31dc8f792cda2bd74c441c2112e6
CRs-Fixed: 1105867
2017-03-10 01:36:34 -08:00
Sandeep Puligilla
91273c2799 qcacld-3.0: Conditional compile scan registration
Move scan registration API under NAPIER_SCAN conditional
compilation flag.

Change-Id: I177fd66f72fc8d9e27613dbb0ee479709d11b5da
CRs-Fixed: 2013212
2017-03-09 01:15:02 -08:00
Ashish Kumar Dhanotiya
48c6b6e708 qcacld-3.0: Handle the channel selection failure case for ACS mode
In case of auto channel selction failure, clean exit does not happens
which results as scan completion event timeout in start bss API.

Add appropriate  API call with channel selection failure
case.

Change-Id: I66a81f586234adb5a0edc4c85cfbaa221424217f
CRs-Fixed: 2006960
2017-03-09 00:39:05 -08:00
Sandeep Puligilla
0806e0f980 qcacld-3.0: Modify SAP ACS scan
Modify SAP ACS scan logic according to new
scan common component.

Change-Id: Id85b6c8a9a1500eeec488b30ee3fd1707b402347
CRs-Fixed: 2013212
2017-03-07 10:49:53 -08:00
gbian
32b067081b qcacld-3.0: Fix the compiling error for macros SM/MS redefinition
Fix the compiling error for macors SM/MS redefinition in both htc.h
and dfs_phyerr_tlv.h.

Change-Id: I591bc8a55542ff8f3b6ce27201c33164e4bdfb66
CRs-Fixed: 1102190
2017-03-04 09:45:56 -08:00
Tang Yingying
523322db1a qcacld-3.0: Add "static" before function to fix compilation error
Some functions are only used in the file which it is defined
in. Add "static" before function to fix compilation error.

Change-Id: Ie99c8e2a2c4dd6564c19876f8456a47786d3e5cb
CRs-Fixed: 1112463
2017-02-15 19:11:23 -08:00