Commit Graph

593 Commits

Author SHA1 Message Date
Amar Singhal
8ade126ff9 qcacld-3.0: Remove the 4.9 GHZ channels
Remove the 4.9 GHZ channels from the driver stack.
4.9 GHZ channels are not being used for any country,
so remove them.

Change-Id: I135f997bb4c8ad7a536596b4e89eb037f41e0c73
CRs-Fixed: 856727
2016-02-08 15:50:43 -08:00
Amar Singhal
fda6edaffa qcacld-3.0: Remove FEATURE_STATICALLY_ADD_11P_CHANNELS
FEATURE_STATICALLY_ADD_11P_CHANNELS was a temporary solution for
builds that were not defining DSRC channels in db.txt. That
restriction no more holds true. Also correct the list of DSRC
channels in function cds_is_dsrc_channel.

Change-Id: I1146ec9702a8eec801b635a276e981962dd42817
CRs-Fixed: 856727
2016-02-08 15:50:42 -08:00
Amar Singhal
7a1726aefe qcacld-3.0: Change regulatory data structures style
Change regulatory data structures and APIs to linux style.
Change the references to the data structures accordingly.
Leave data structures that would be deleted in subsequent
iterations as is.

Change-Id: I68dcd3485d3fb3d98f648b5844508356c3f3c29d
CRs-Fixed: 856727
2016-02-08 15:50:42 -08:00
Amar Singhal
7f1f3ecd53 qcacld-3.0 : Remove the local regdomain mapping
Remove the local country to regdomain mapping in the driver.
Return a fixed regdomain index 0 to the caller. Also update
copyright for cds_regdomain.h for 2015.

Change-Id: I33e0a861b0a3bd95b20becb2d765b8300688ec4c
CRs-Fixed: 856727
2016-02-08 15:50:42 -08:00
Srinivas Girigowda
fb796d1985 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in tSirSmeAssocCnf
Replace tSirMacAddr with cdf_mac_addr in tSirSmeAssocCnf.

Change-Id: I0b267ad09aac1f44079477cfde8d13265c1f2264
CRs-Fixed: 898864
2016-02-08 15:50:42 -08:00
Srinivas Girigowda
1a245364d6 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in tSirSmeDisassocReq
Replace tSirMacAddr with cdf_mac_addr in tSirSmeDisassocReq.

Change-Id: I9d0b77e0ce624c48ca0fea2774c0f63285793cee
CRs-Fixed: 898864
2016-02-08 15:50:42 -08:00
Srinivas Girigowda
dd3c513e76 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in tSirSmeDisassocRsp
Replace tSirMacAddr with cdf_mac_addr in tSirSmeDisassocRsp.

Change-Id: Ia196615e99506b4fa80a7d611cdefd2e7d2150fa
CRs-Fixed: 898864
2016-02-08 15:50:42 -08:00
Srinivas Girigowda
e13cc34fa3 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in tSirSmeDisassocInd
Replace tSirMacAddr with cdf_mac_addr in tSirSmeDisassocInd.

Change-Id: Icdf3420c24762f919df73d57dffdf1b51151a0e8
CRs-Fixed: 898864
2016-02-08 15:50:42 -08:00
Srinivas Girigowda
5f3c81a672 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in tSirSmeDeauthCnf
Replace tSirMacAddr with cdf_mac_addr in tSirSmeDeauthCnf.

Change-Id: I16b399bcb76a6dd3fcc35c52e5822e988d4e5001
CRs-Fixed: 898864
2016-02-08 15:50:42 -08:00
Srinivas Girigowda
9efa10edc0 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in tSirSmeDeauthRsp
Replace tSirMacAddr with cdf_mac_addr in tSirSmeDeauthRsp.

Change-Id: I7036160f39ff69be5f937a71769e057d8906f2d3
CRs-Fixed: 898864
2016-02-08 15:50:42 -08:00
Srinivas Girigowda
9cf95c5d6f qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in tSirSmeDeauthRsp
Replace tSirMacAddr with cdf_mac_addr in tSirSmeDeauthRsp.

Change-Id: I383f867f8847f66bc6f6e99ee2a56b4bc89ebe5b
CRs-Fixed: 898864
2016-02-08 15:50:42 -08:00
Srinivas Girigowda
9ee9a5c4cc qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in tSirSmeDeauthInd
Replace tSirMacAddr with cdf_mac_addr in tSirSmeDeauthInd.

Change-Id: Ic8203cb89b970d5efb4c99e5e570af95ac9f802e
CRs-Fixed: 898864
2016-02-08 15:50:42 -08:00
Srinivas Girigowda
a230265a23 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in tSirSmeStopBssReq
Replace tSirMacAddr with cdf_mac_addr in tSirSmeStopBssReq.

Change-Id: Ie758460224c632a8192f8dfbe14cbb508636ff25
CRs-Fixed: 898864
2016-02-08 15:50:42 -08:00
Srinivas Girigowda
591c56501c qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in tSirSmeSwitchChannelInd
Replace tSirMacAddr with cdf_mac_addr in tSirSmeSwitchChannelInd.

Change-Id: Ide9e600c1c4b105740bd16a13366e1e2f5f9fda6
CRs-Fixed: 898864
2016-02-08 15:50:42 -08:00
Srinivas Girigowda
cba74734a1 qcacld-3.0: Fix mangled function lim_cmp_s_sid()
Fix mangled API lim_cmp_s_sid() to lim_cmp_ssid() which were
introduced while converting the names programmatically.

Change-Id: I3a6d4b8678fc815fb8c8787bd080c9188ef98f67
CRs-Fixed: 882962
2016-02-08 15:50:42 -08:00
Srinivas Girigowda
d65dc5a905 qcacld-3.0: Remove obsolete and duplicate macros
Remove obsolete and duplicate macros.

Change-Id: I19010da3b40af1e65ec9a9a5e1fc01ecac56b0df
CRs-Fixed: 898864
2016-02-08 15:50:42 -08:00
Houston Hoffman
267723f092 qcacld-3.0: Move runtime pm bookkeeping out of hdd
Move state machine and stat logging for runtime pm feature out of hdd.

Change-Id: I2699905d9c238a1402eac11c1107b44bb9e617e4
CRs-Fixed: 935300
2016-02-08 15:50:42 -08:00
Houston Hoffman
ac31d34d80 qcacld-3.0: Instrument fastpath for runtime_pm
Fastpath needs gets and puts to work with runtime_pm enabled.

Change-Id: I2248d1e77c842ab12fcc10e3f29fa3ef4dd76052
CRs-Fixed: 935300
2016-02-08 15:50:41 -08:00
Houston Hoffman
a0e71066f3 qcacld-3.0: Fix rmmod for runtime pm
Runtime PM should be turned off before the driver is unloaded.

Change-Id: I8746e92931375893708556e77a3d93bfd6266668
CRs-Fixed: 935300
2016-02-08 15:50:41 -08:00
Houston Hoffman
746a571cf7 qcacld-3.0: Mark last busy in recieve for runtime pm
Scan was not going through.

Change-Id: I37d02a88e29da9c4fa756cc46fc812f10c58fe00
CRs-Fixed: 935300
2016-02-08 15:50:41 -08:00
Houston Hoffman
10a20bbdea qcacld-3.0: Prevent runtime suspend when linkdown not allowed
Runtime suspend does not save power in d0 mode.

Change-Id: I6bc83923a6384c3275b95bd0ffbb4404d9a3f86d
CRs-Fixed: 935300
2016-02-08 15:50:41 -08:00
Houston Hoffman
d92ae54ea1 qcacld-3.0: Log runtime suspend resume occurances
Keep track of how many times supesend resume succeeds and fails
also mark last busy on a failed runtime suspend or a successful
runtime resume.

Change-Id: I04df805429e3a9ce91bc3d7f27bfd598396257c9
CRs-Fixed: 935300
2016-02-08 15:50:41 -08:00
Houston Hoffman
b0ac63cf85 qcacld-3.0: Runtime puts for HTT messages
HTT messages do not have a tx complete and should
have their runtime puts done when the firmware response
come.  Tag messages without responses so that the
put can be done after issuing the message.  Also do
runtime put in error case.

Change-Id: I7253ace95ca6bb4fa17bc6d82ec52fc598d17712
CRs-Fixed: 935300
2016-02-08 15:50:41 -08:00
Houston Hoffman
1460fa326f qcacld-3.0: Runtime PM handling for htc messages
Check runtime pm status while sending messages.
Update runtime pm when sending messages to hif.
Update runtime pm when messages are tx completed.

Change-Id: I27840f57ff87d6d27b1e3611e7fe1f2cd933ddd0
CRs-Fixed: 935300
2016-02-08 15:50:41 -08:00
Houston Hoffman
e893708cb9 qcacld-3.0: Coordinate runtime suspend from hdd
HDD interfaces with the platform driver.  Runtime suspend
is a callback registered with the platform driver.  Coordinate
runtime suspend from hdd since it is both the logical entry point
and knows what other layers need to participate in a runtime suspend.

Change-Id: I80b71e504d0cd31bd5a8e47895db7e0bd233f6c3
CRs-Fixed: 935300
2016-02-08 15:50:41 -08:00
Houston Hoffman
a76591b583 qcacld-3.0: Provide wma runtime suspend resume apis
wma has to do some extra steps that were part of 802.11 suspend
for runtime suspend.

Change-Id: I91fbdcacd6c557f30e0d4f422324f2db67cb96dc
CRs-Fixed: 935300
2016-02-08 15:50:41 -08:00
Houston Hoffman
f2936d19bc qcacld-3.0: Provide hif runtime suspend resume apis
hif runtime suspend resume is identical to a regular bus suspend
resume, but provide a different api just in case this changes.

Change-Id: If069df7733d6a1ebe38d356ac5bdd4e2a250118b
CRs-Fixed: 935300
2016-02-08 15:50:41 -08:00
Houston Hoffman
47ee8ca308 qcacld-3.0: Introduce cdf_suspend_type
Introduce an enum for use by multiple layers to suspend slightly
differently when doing a runtime suspend versus a system suspend.

Change-Id: I753bbe909e53558fe592defdca021331ec6feb88
CRs-Fixed: 935300
2016-02-08 15:50:41 -08:00
Houston Hoffman
61b798b75d qcacld-3.0: Provide cdf apis for runtime suspend
Provide apis to allow and prevent runtime suspend.

Change-Id: I7604659d257823f436ff370715f421d58ce25d3a
CRs-Fixed: 935300
2016-02-08 15:50:41 -08:00
Houston Hoffman
d13fa735b2 qcacld-3.0: Add hif apis to prevent allow runtime pm
Support pm_runtime put/get/prevent/allow apis in hif layer.

Change-Id: I66be45de4177eeff3678b9ebd874c9bbde3cad22
CRs-Fixed: 935300
2016-02-08 15:50:41 -08:00
Houston Hoffman
a8ef6fb8c7 qcacld-3.0: Provide setters for pm_state to upper layer
Runtime pm opperations will be initiated in hdd, so hdd
needs an api to updated the runtime_pm state.

Change-Id: I783fc136777a56d8ea23f8b11617ebe92641221a
CRs-Fixed: 935300
2016-02-08 15:50:41 -08:00
Houston Hoffman
8eb73ed3ad qcacld-3.0: Add runtime pm initialization
Add runtime pm initialization, including the creation
of a debugfs entry.

Change-Id: Ib057feaf36a04bb525a731e236187c134449c5f2
CRs-Fixed: 935300
2016-02-08 15:50:41 -08:00
Houston Hoffman
5be9bac028 qcacld-3.0: Implement htc runtime suspend/resume
Provide the apis to suspend & resume the htc layer
for runtime suspend.

Change-Id: Ia4c4f00fa62b250c5097e6bc14137b0114c5c90f
CRs-Fixed: 935300
2016-02-08 15:50:41 -08:00
Houston Hoffman
345fa405a9 qcacld-3.0: Add dynamic wake event configuration
Want to dynamically enable and disable wakeup for
pno scan.

Change-Id: I95876979652ab16976f23561038c877cee4c930a
CRs-Fixed: 935297
2016-02-08 15:50:41 -08:00
Houston Hoffman
7260ecbc64 qcacld-3.0: Send one suspend indication message to wma
Send one suspend indication message to wma after configuring
all the offloads. Reduce context switches and complexity.

Change-Id: I020fc8864dbf7378805361d54dc6cff60b2652e5
CRs-Fixed: 935297
2016-02-08 15:50:41 -08:00
Krunal Soni
1878d3a2cc qcacld-3.0: Merge two sme & csr config structure in to one
SME holds config item in tCsrConfigParams structure as well as some of
the same items in tSmeConfigParams which makes tCsrConfigParams super
set of tSmeConfigParams. There are high chances if somebody misses
copying item from tSmeConfigParams to tCsrConfigParams and that will
result in config item not being set correctly.

In order to make it clean and easy, merge both config structure in one.

Change-Id: I8c93d9fae0986cb90b4ed4c4712b1e2b023b4be3
CRs-Fixed: 963752
2016-02-08 15:50:41 -08:00
Krunal Soni
ef3294b8e5 qcacld-3.0: Send the correct supported channel width in Assoc Resp
qcacld-2.0 to qcacld-3.0 propagation

Currently, if SAP supports 40Mhz, then it sends the supported
channel width as 40Mhz irrespective whether STA supports or not.

Changes done to check the STA capability for supported channel
width and send it accordingly in Assoc Resp

Change-Id: I58ca44b6998d4712521a10285b9fd2a3f825d2ed
CRs-Fixed: 728676
Signed-off-by: Krunal Soni <ksoni@qca.qualcomm.com>
2016-02-08 15:50:40 -08:00
Krunal Soni
1867f16018 qcacld-3.0: Fix checkpatch error in wlan_qct_sys.c
This patch is to fix the check-patch errors in wlan_qct_sys.c

CRs-Fixed: 824222
Change-Id: I99f5c2daad9d14fcc6a7ab24dee95810829eeaf4
2016-02-08 15:50:40 -08:00
Ryan Hsu
4252a2fc6f qcacld-3.0: clean up the WLAN_FEATURE_MBSSID flag (phase 1)
WLAN_FEATURE_MBSSID flag is originally added to support MBSSID,
specifically for the MOBILE ROUTER build, and is now enabled for all
builds, there is no longer needed to have a separate feature flag,
so that removing it.

This commit cleans up the following modules - cds/mac/sap/sme.

Change-Id: I79ad9767b7945af0c567b6294ac07e7697898e9e
CRs-fixed: 958154
2016-02-08 15:50:40 -08:00
Chandrasekaran, Manishekar
3cc29cbc23 qcacld-3.0: Deactivate and clean up logging thread on driver load failure
This is qcacld-2.0 to qcacld-3.0 propagation

Deactivate and clean up the logging thread during driver load failure and
ensure that logging thread is not enabled for FTM mode

CRs-Fixed: 961865
Change-Id: I53f85a30f52fc5715705624bf515ab5e4666db8e
2016-02-08 15:50:40 -08:00
Chandrasekaran, Manishekar
0c5441e64c qcacld-3.0: Avoid all module logging onto kmsg during driver load
This is qcacld-2.0 to qcacld-3.0 propagation

Avoid logging of all module logs into kmsg during the driver load
phase. All module log level is set much before setting of the
flag that indicates whether multicast logging is enabled or not.
Because of this all module log levels are getting printed for a
brief duration in kmsg during driver load. Fix the same by
setting the multicast flag appropriately so that when multicast
logging is enabled, all the logs are multicast to user space
and only the error and fatal messages continue to get logged in
the kmsg.

CRs-Fixed: 958705
Change-Id: I260e38ef64f704dfd9ca1ca4dc68c56428526559
2016-02-08 15:50:40 -08:00
Chouhan Lokesh
4e5521b52c qcacld-3.0: Prefer ini params logging preference over code preference
qcacld-2.0 to qcacld-3.0 propogation

Previously trace logging levels are set from cfg.ini for different
modules which again over written by code. Ultimately code logging
preference was taking place.

After changes if the log level for any module is set to DEFAULT(0xffff)
then only code logging preference will be used else cfg.ini logging will be
preferred.

CRs-Fixed: 875973
Change-Id: Ia3df86908cec1d5c487d614a418721c0cd98fc52
2016-02-08 15:50:40 -08:00
Chandrasekaran, Manishekar
794a098c18 qcacld-3.0: Add new IOCTL to change SAP/P2P-GO's operating channel
Add new IOCTL 'CHANNEL_SWITCH' which is used to move the operating
channel of SAP/P2P-GO. This IOCTL is supported only for SAP/P2P-GO
and not for STA/P2P-GC.

E.g., format to issue command through wpa_supplicant:
DRIVER CHANNEL_SWITCH <CH> <BW>
- <CH> is channel number to move (1 for ch1, 149 for ch149 etc.)
- <BW> is bandwidth to move (20 for BW 20, 40 for BW 40 etc.)

Change-Id: Ie65f2ceb9ece04053ab32ee60f83fd09cd232f77
CRs-Fixed: 955368
2016-02-08 15:50:40 -08:00
Chandrasekaran, Manishekar
a74bb024b1 qcacld-3.0: Accommodate channel bandwidth as input during channel switch
Add support to include channel bandwidth as one of the inputs to
decide the channel switch parameters. Currently only the target channel
is used as the input to decide the channel switch parameters. With this
fix, user specified channel bandwidth is also taken into consideration.

Change-Id: Ic49b24edde6cabc52aa2b38110763da82da6790d
CRs-Fixed: 955368
2016-02-08 15:50:40 -08:00
Chandrasekaran, Manishekar
dc351569d8 qcacld-3.0: Fix invalid operating class calculation during channel switch
Fix invalid operating class calculation while sending out channel switch
frames. The operating class is getting wrongly calculated using the
channel width instead of the channel offset. Fix this by calculating and
passing the channel offset parameter instead of the channel width to the
necessary function to ensure that the operating class gets calculated
correctly.

CRs-Fixed: 955414
Change-Id: I011db65e57c477e381fd471a4a930a02e2a7ee21
2016-02-08 15:50:40 -08:00
Kiran Kumar Lokere
999e58c920 qcacld-3.0: Remove the cb_mode usage in channel bonding
Remove the CB mode usage in channel bonding since the center
center frequency is calculated using channel width and channel
number.

Change-Id: Ie9685a833750bf3b69cce40c5d9587fb9b232047
CRs-Fixed: 962174
2016-02-08 15:50:40 -08:00
Varun Reddy Yeturu
d5939f8b45 qcacld-3.0: Optimize LFR3 roam synch propagation
The current roam sync propagation for LFR3.0 in the host driver is
based on queuing and message processing mechanism. This can lead
to many unknown sequence of operations as there might be other
messages sitting in the queue which may interrupt with this
operation. Hence, it would be good to introduce a callback mechanism
which take care of running the code to execution completely in case
of roam synch propagation.
It also improves to reduce the roam delay by 50 percent as compared
to the existing mechanism.

CRs-Fixed: 962290
Change-Id: I4af569b1e3020a64beb606e8bbffd7613775138f
2016-02-08 15:50:40 -08:00
Satish Singh
729d12f6a8 Release 5.0.0.157
Release 5.0.0.157

Change-Id: If54fac1194de693983bf4f0744fb11dfffdeb7ba
CRs-Fixed: 688141
2016-02-08 15:50:40 -08:00
Yue Ma
664effc92c qcacld-3.0: Fix potential memory leaks in SSR
qcacld-2.0 to qcacld-3.0 propagation

During SSR, since VDEV detach won't happen, some contexts saved in VDEV
may not get a chance to be freed. Add change to check these contexts
in SSR shutdown routine to make sure they are freed.

Change-Id: I36d12b3bb524ca107ece2441c1dc1d80293cb31b
CRs-fixed: 957587
2016-02-08 15:50:40 -08:00
Yue Ma
23d128364d qcacld-3.0: Save call stack for each memory allocation in SLUB builds
qcacld-2.0 to qcacld-3.0 propagation

Currently only one level of information (file name and line number of
the caller who wants to allocate memory) is saved when each memory is
allocated. This may not be able to provide enough information for some
cases that multiple levels of callers are the same. Hence save call stack
as well for each memory allocation in SLUB builds for debug purpose.

Change-Id: I245d53ec3805217ca34d7c1f5e31b84cac73e395
CRs-fixed: 930557
2016-02-08 15:50:40 -08:00
Govind Singh
24db1ed70b qcacld-3.0: Fix build failure in cds module
pRoamInfo is not initialized in cds_force_sap_on_scc function.
This is resulting in build failure when FEATURE_WLAN_FORCE_SAP_SCC
flag is enabled. Modify cds_force_sap_on_scc function to fix the same.

CRs-Fixed: 953618
Change-Id: I136d33f108dab19c236c7bf1aadf7608c0673baf
2016-02-08 15:50:40 -08:00
Prashanth Bhatta
915b9d342f qcacld-3.0: Use CDF APIs for spin lock
sched_scan_lock and connection_status_lock's are using spin lock
APIs directly from kernel. Change to use CDF APIs for spin lock.

Change-Id: I0f56624df34682150b402fc36b9dfdba36a598f3
CRs-fixed: 959287
2016-02-08 15:50:39 -08:00
Mahesh Kumar Kalikot Veetil
d43e165149 qcacld-3.0: Add backward compatibiilty to older FW
If DBS hwmode is not available from FW, return accrodingly in
wma_get_hw_mode_from_idx.

Change-Id: I603edd8a49bfd584300dcfc21c2b3c8c4c3c1892
CRs-Fixed: 934012
2016-02-08 15:50:39 -08:00
Houston Hoffman
616679618f qcacld-3.0: Revert merge conflicts in wma_suspend_req
wma_suspend_req is rewritten in changes
I020fc8864dbf7378805361d54dc6cff60b2652e5
and I95876979652ab16976f23561038c877cee4c930a

Revert "qcacld-3.0: Fix the PNO WoW is not configured in concurrency case"
This reverts commit 3bf7846a5ee12e0641f90b9ff05a80a068cde777.
Revert "qcacld-3.0: Cleanup WOW_NLO_SCAN_COMPLETE_EVENT"
This reverts commit 8098644b8cbf89f23442c5bef02f186460cd9f8f.
Revert "qcacld-3.0: Find extscan_in_progress irrespective of connected or pno"
This reverts commit 7bb7f564b75965bfbf09fef6b5406aaa19c245a7.

Change-Id: If0953ad7ca8d7224c87f026e77d1a3f256c4f124
CRs-Fixed: 935297
2016-02-08 15:50:39 -08:00
Houston Hoffman
7a39c0cb30 qcacld-3.0: Replace ServiceID with service_id
Removes cammel case.

Change-Id: I8107c9fa783bdec41468191315c901018f6fd05f
CRs-Fixed: 935297
2016-02-08 15:50:39 -08:00
Houston Hoffman
9e7c1c77c5 qcacld-3.0: Replace EndPoint with endpoint
This change also changes EndPointStats to endpoint_stats.

Change-Id: I88509901b0d15a59f35633dccbe7ca0b5f7b3b76
CRs-Fixed: 935297
2016-02-08 15:50:39 -08:00
Houston Hoffman
a2cdf2284e qcacld-3.0: Rename cdf_sched_work to cdf_schedule_work
The api is clearer without the abreviation. The api is
cleaner without an unused cdf_handle. Also remove
unnecessary cdf_schedule_work api.  cdf_create_work
is also cleaner without cdf_handle.

Change-Id: Id8c32596a92184d6768e2bc3210c308b44da2a57
CRs-Fixed: 935297
2016-02-08 15:50:39 -08:00
Houston Hoffman
f709c67be7 qcacld-3.0: Fix firmware assert completion handling
Hif needs to guarantee that it frees the buffers that it doesn't
pass to upper layers.

Change-Id: I816d0a1b19a5a0c00e9669c18dfdf427c102c911
CRs-Fixed: 958124
2016-02-08 15:50:39 -08:00
Houston Hoffman
6ccc86afd8 qcacld-3.0: Remove IHELIUM_BU flag
This flag supports depricated emulation hardware.
Remove conditionally compiled code and dummy functions
that become unused as a result.

Change-Id: Ie21df7e39b196109acfb6b41afc6b8c22fecb822
CRs-Fixed: 958120
2016-02-08 15:50:39 -08:00
Houston Hoffman
79b4af2999 qcacld-3.0: Define wma_is_vdev_in_beaconning_mode
Define wma_is_vdev_in_beaconning_mode to remove in function ifdefs.
Remove conditional compilation arround wma_is_vdev_in_ibss_mode calls.

Change-Id: I4b047d05088b5cbe51fa49818634fdd3a78e6b68
CRs-Fixed: 935297
2016-02-08 15:50:39 -08:00
Tushnim Bhattacharyya
24e12a6966 qcacld-3.0: Add config for the MCC restriction on Adrastea emulation
On M2M emulation platform we have a fixed mapping between macs, hence
vdev transition & MCC support is not possible on this platform. But MPR
platform doesn't have these limitations. This config allows at runtime
enable/disable vdev transition & MCC support depending on the platform
it is running on.

Change-Id: I17a92dce695ee30f7994f040d4bc612a38680f3e
CRs-fixed: 922181
2016-02-08 15:50:39 -08:00
Tushnim Bhattacharyya
4adb368b6a qcacld-3.0: cleanup cds_concurrency files
Code cleanup & update of correct copyright information.

Change-Id: Icee77761cf00cee3b633bd260d5af38286a4f22c
CRs-fixed: 956394
2016-02-08 15:50:39 -08:00
Ryan Hsu
e839f8f3fb qcacld-3.0: clean up hddLog API in wlan_hdd_green_ap.c
Clean up wlan_hdd_green_ap.c to use the unified hdd logging APIs.

Change-Id: If444137793895dea9b0e0ed894f238ac00363f2d
CRs-fixed: 959696
2016-02-08 15:50:39 -08:00
Srinivas Girigowda
110d620564 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in tSirNsOffloadReq
Replace tSirMacAddr with cdf_mac_addr in tSirNsOffloadReq.

Change-Id: Ic53f963b3df46d67bf5f202ac6aaf7c49ab858a9
CRs-Fixed: 898864
2016-02-08 15:50:39 -08:00
Srinivas Girigowda
a9d12f1907 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in tSirTdlsSendMgmtReq
Replace tSirMacAddr with struct cdf_mac_addr in tSirTdlsSendMgmtReq.

Change-Id: I0f545721d184c17b2d150df5435d51cd6ca7bf9e
CRs-Fixed: 898864
2016-02-08 15:50:39 -08:00
Hanumantha Reddy Pothula
b834021a5e qcacld-3.0: Process SIR_LIM_ADDTS_RSP_TIMEOUT command in defer state
qcacld-2.0 to qcacld-3.0 propagation

If ADDTS response timer is fired because of not receiving ADDTS RSP
within time then this timer handler posts SIR_LIM_ADDTS_RSP_TIMEOUT
command to LIM. But if deferring is enabled(say due to processing any
action frame) then SIR_LIM_ADDTS_RSP_TIMEOUT command will be added to
defer queue and as gLimAddtsSent is set to TRUE, including this
command all other defer commands will never be processed. This may
lead to active command timeout.
Hence process SIR_LIM_ADDTS_RSP_TIMEOUT command in defer state.

Change-Id: I48f09a7fd560702ac7701e0a1a41c77ad94626d4
CRs-Fixed: 919490
2016-02-08 15:50:39 -08:00
Rajeev Kumar
217f217599 qcacld-3.0: Fix compilation issues on MSM8998 RUMI platform
Fix compilation issues on MSM8998 RUMI platform caused by
CONFIG_CNSS not being defined and un-initialized local variable usage.

Change-Id: Iaf8bec493a42ec9fd09e1b2b6aa085be8de4bc8a
CRs-Fixed: 959249
2016-02-08 15:50:39 -08:00
Abhishek Singh
acfdc92a12 qcacld-3.0: Remove roam cmd from sme active list in case of failure
qcacld-2.0 to qcacld-3.0 propagation

-In case CSR is already connected and it receives connect with the
 same profile, csr will silently return and try to send the connect
 success to HDD. But if roamInfo staId is 0 this roam command is not
 removed from sme active list and leads to active list timeout.
 This back to back connect to CSR can happen if HDD and CSR go out
 of sync and is taken care already.

-Also if disconnect is received in case scan for ssid is in progress
 it will be dropped and roam session state is set to disconnecting.
 But this roam session state is not reset for the fresh connection
 and thus if next connect also issue scan for ssid the connect
 command will be dropped assuming disconnect is in progress.

This change removes roam cmd from sme active list in case of
above failure and resets roam session state for fresh connections.
Also does some cleanup in HDD disconnect command.

Change-Id: I222626f1da6bdad83a5264668dde9aafd3dda149
CRs-Fixed: 953196
2016-02-08 15:50:39 -08:00
Abhishek Singh
03f992e41d qcacld-3.0: Abort previous connect if fresh connect is received
qcacld-2.0 to qcacld-3.0 propagation

If connect is received with previous connect in progress, driver
doesn't abort the previous connect and process the new connect.
In csr if new connect is for same profile, sme directly indicate
connection success to hdd and thus hdd increment the active
session count twice for both connect.

Now if one more connect is received it will try to disconnect the
previous connection and decrements the active session count.
So the count is 1 though no session is active.

Eventually if same scenario happens again the active session
count will become 2 with no active session. As max active session
limit is 2, no more connect is accepted.

To avoid this, if fresh connect is received and previous connect is
in progress abort the previous connect.

CRs-Fixed: 958963
Change-Id: I1544bc6e7894ffeda1956a19a553b6fe4e35f988
2016-02-08 15:50:39 -08:00
Abhishek Singh
7996eb7a8e qcacld-3.0: Send management frame indication directly to HDD from PE
qcacld-2.0 to qcacld-3.0 propagation.

If MC thread stall while waiting on any event, In case of WPS,
probe requests may get accumulated in PE message queue.

Now every time MC thread process a probe request,
eWNI_SME_MGMT_FRM_IND msg is posted in SME message queue. But
unless PE queue is fully processed SME queue won't be processed.
This will gradually use all vos message wrapper.

To avoid this register a callback to send management frame
indication directly to HDD from PE which avoids posting message to
SME queue.

Change-Id: Ib83700825112cc52dade594909bfa8993909ac29
CRs-Fixed: 944961
2016-02-08 15:50:39 -08:00
kaliu
154d789744 qcacld-3.0: eSmeCommandDelStaSession stuck in smeCmdActiveList
qcacld-2.0 to qcacld-3.0 propagation.

1.Use iw tool to let dut connect to remote ap, dut is working
on wlan0.
2.At same time, use hostapd to start sap also on interface
wlan0.

In item1, before connect to ap, dut will do an internal scan
to search ap, if scan result matched configured ap profile,
dut trys to connect to ap.

In item2, when starting sap, found it's sta mode it will try
to disconnect dut with remote ap and close sta session.

  #1 If ap start action happened in item1's scan period, trying
  disconnecting won't take effect as currently sta has not yet
  connected with remote ap.
  So after item1's scan finished, dut continues to do connection.

  #2 During closing sta session, sme issued eSmeCommandDelStaSession,
  as currently sta is doing connection, so session is in started
  status, this cause closure failed, so there is no chance to remove
  cmd in smeCmdActiveList.
  While cmd pending in smeCmdActiveList for 120s, driver issued crash.

The solution is in item1 after scan complete to check whether it's
needed to start following connection. If stop action has been issued
during scan period, then don't do the connection.

Change-Id: If632e21cb13277fba371ff1bf8df97febf856d09
CRs-Fixed: 923375
2016-02-08 15:50:38 -08:00
Jeff Johnson
bd561a9d95 qcacld-3.0: Convert wlan_hdd_driver_ops.c to unified logging
Currently the HDD code uses a variety of logging APIs.  In qcacld-3.0
HDD should converge on a unified set of logging APIs.  Update
wlan_hdd_driver_ops.c to use the unified set of APIs.

Change-Id: I5620e91797412c0dbf32c1071b3eefd54f54aca7
CRs-Fixed: 937590
2016-02-08 15:50:38 -08:00
Jeff Johnson
103cc5b594 qcacld-3.0: Convert wlan_hdd_lro.c to unified logging
Currently the HDD code uses a variety of logging APIs.  In qcacld-3.0
HDD should converge on a unified set of logging APIs.  Update
wlan_hdd_lro.c to use the unified set of APIs.

Change-Id: I72bf2b55390e1c72706077d22f61e59d17d14f13
CRs-Fixed: 937662
2016-02-08 15:50:38 -08:00
Jeff Johnson
9991f47eb5 qcacld-3.0: Fix incorrect logging in hdd_send_re_assoc_event()
Change "qcacld-3.0: Roaming enhancement to allow multiple ssid"
(Change-Id If4953e64f9e0485edec85167a7bc1dd6ca7c2047) added some
incorrect logging to function hdd_send_re_assoc_event().  The intent
was to perform a hex dump of the buf_ssid_ie and final_req_ie buffers,
but in reality the code actually uses these buffers as logging format
strings.  Fix this by invoking the correct API to perform a hex dump.

Change-Id: Id861ececd119ea7247ce24c7c8ea9173f13703d3
CRs-Fixed: 958752
2016-02-08 15:50:38 -08:00
Jeff Johnson
1aa2909060 qcacld-3.0: Convert wlan_hdd_nan.c to unified logging
Currently the HDD code uses a variety of logging APIs.  In qcacld-3.0
HDD should converge on a unified set of logging APIs.  Update
wlan_hdd_nan.c to use the unified set of APIs.

Change-Id: I4dcc61656f1cd45d3a2c9d63441c27a733385328
CRs-Fixed: 937673
2016-02-08 15:50:38 -08:00
Satish Singh
b675801e9b Release 5.0.0.156
Release 5.0.0.156

Change-Id: Ia96b37945abda73a18cb4a1c4df0939d1e23a099
CRs-Fixed: 688141
2016-02-08 15:50:38 -08:00
Rajeev Kumar
d71df8271f qcacld-3.0: Configure FW WMI logging for adrastea and rome
In adrastea multithreaded firmware WMI logging infrastructure
is not yet ready. Disable WMI FW logging for adrastea and enable
it for ROME based targets.

Change-Id: I64c858681f57a2a013fd23bcd9204f59ff638102
CRs-Fixed: 959416
2016-02-08 15:50:38 -08:00
Yun Park
ab828073af qcacld-3.0: Remove code to clean pending_cons_req from WLAN_CLIENT_CONNECT
qcacld-2.0 to qcacld-3.0 propagation

There is a race condition between TX_RESUME opcode, where checks
pending_cons_req before sending WLAN_CONS grant notification to IPA,
and WLAN_CLIENT_CONNECT event where clearing the pending_cons_req.
We don't need to clear pending_cons_req from WLAN_CLIENT_CONNECT
event, which is actually cleared by TX_RESUME opcode.

Change-Id: Icc5d05bc77800251b031efd0c07b0feaa2ae921d
CRs-Fixed: 952171
2016-02-08 15:50:38 -08:00
Yun Park
6a46ad80ee qcacld-3.0: call IPA cleanup when cds_enable failed
qcacld-2.0 to qcacld-3.0 propagation

When CDS enable fails after IPA init, IPA cleanup is missed.
This will cause a system crash later as IPA resource is not properly
teared down.

Change-Id: I563e92e4ed5319b6489dcc8cffb6a802d54e8549
CRs-fixed: 949015
2016-02-08 15:50:38 -08:00
Prashanth Bhatta
9e14305000 qcacld-3.0: Maintain driver state in CDS
Driver state of loading, unloading, logp are maintained in
multiple modules like HDD, CDS. Change to maintain the driver
state in CDS and provide CDS APIs to find out the state of the
driver so that any of the module can query it.
Also rename the logp to recovery in progress for clarity purpose.

Change-Id: I8e1864e1bc7f3b1dd6f4eb804ce2578c6695967d
CRs-fixed: 958659
2016-02-08 15:50:38 -08:00
Prashanth Bhatta
d1d446914b qcacld-3.0: hdd: Clean-up FTM initialization
FTM initialization has conditional compilation within the
function. Clean-up and create separate functions to initialize
and remove FTM during driver probe and remove.

Change-Id: I04890f49447c22b6d7dd93baf0a266ea9f5a4ca7
CRs-fixed: 957630
2016-02-08 15:50:38 -08:00
Yuanyuan Liu
fd9bfc50d6 qcacld-3.0: Add cdf_mem_exit cdf_mc_timer_exit when wlan exits
cdf_mem_exit cdf_mc_timer_exit are missing from hdd_driver_exit.
Add them back so that wlan driver exits properly.

Change-Id: I571f65118a1755d2f43c29e8320563a43b49e713
CRs-Fixed: 951519
2016-02-08 15:50:38 -08:00
Krishna Kumaar Natarajan
9ac8efd704 qcacld-3.0: Add data length in oem data request msg
Add data length information in oem data request
messages.

Change-Id: Ibc132d31dd4345c4168dad23b4acf699f2a8c8e6
CRs-Fixed: 942260
2016-02-08 15:50:38 -08:00
Krishna Kumaar Natarajan
4e9cf39d1d qcacld-3.0: Add event handler for oem data response
Add event handler for oem data response event from FW.
Add new boolean member to differentiate the response
generated internally and one coming from the FW.

Change-Id: Ia906c5dcbb7e560fd78ccd96fc47c7801b33aa6a
CRs-Fixed: 942261
2016-02-08 15:50:38 -08:00
Satish Singh
4d37cc29c4 Release 5.0.0.155
Release 5.0.0.155

Change-Id: I1ca017dec644ec2d352a3576e28a28302e412b30
CRs-Fixed: 688141
2016-02-08 15:50:38 -08:00
Naveen Rawat
db124a64e0 qcacld-3.0: Use assoc req len from roam sync msg in if condition
Use assoc req from roam_sync_ind_ptr instead of ft_session_ptr in
condition statement.

assoc req from ft_session_ptr is not populated yet and hence will be
0 when the condition is invoked. This will cause if block to never
execute.

Change-Id: I9cd758674d13603087de013a0aea751032bc8603
CRs-Fixed: 957591
2016-02-08 15:50:38 -08:00
Nirav Shah
2ae038d42e qcacld-3.0: Do not allocate mgmt descriptors
Do not allocate txrx descriptors for management
if management over WMI is enabled.

Change-Id: Iafb231bebe83b658940119ed13a41d64a10d4eb0
CRs-Fixed: 955450
2016-02-08 15:50:38 -08:00
Deepak Dhamdhere
652d7e834e qcacld-3.0: Fix issue about signal jump
rssi_raw should not be updated when the channel
in probe response does not match the channel in BD.

Added rx_channel field to beacon descriptor passed from LIM to
CSR. Channel check is performed in csr_remove_dup_bss_description()
before computing new averaged rssi.

CRs-Fixed: 873549
Change-Id: Iefacbf73f880e9d0c957ad83839dd2203fdf862d
2016-02-08 15:50:38 -08:00
Deepak Dhamdhere
68929ec509 qcacld-3.0: Optionally report raw rssi value to supplicant
qcacld-2.0 to qcacld-3.0 propagation

Add raw rssi in the beacon header from WMI to beacon descriptor.
Pass it up to SME and report it to supplicant through a call to
wlan_hdd_cfg80211_inform_bss_frame().
It can be enabled as a .ini configuration parameter "gInformBssRssiRaw".
Default is 1, it will report raw rssi by default.
Roaming decisions are based on rssi field of beacon descriptor,
its interpretation and usage are unchanged.

CRs-Fixed: 815344
Change-Id: I6dacdc0b333c093d16a74f8cf36471dfc183ce56
2016-02-08 15:50:37 -08:00
Tushnim Bhattacharyya
ca50b3204f qcacld-3.0: cleanup cds_concurrency files
Remove hdd context from argument list of all the cds concurrency
APIs.

Change-Id: Ic9f94ab2e0f975a745776675c254ecbd5ba6b203
CRs-fixed: 956394
2016-02-08 15:50:37 -08:00
Orhan K AKYILDIZ
4f20db56bc qcacld-3.0: fix softlock-up caused by co-existence of NAPI and rx-thread.
If rxthread is on, NAPI will call the kernel-thread context API (instead
of softirq context) API to transfer the packet to the stack.

Eventually, this part will be re-considered when multi-queue NAPI gets
in, which will eliminate the rx-thread.

Change-Id: Ib3d4d1450fb36f5c1e710802ceaab5d015e20c7d
CRs-Fixed: 957299
2016-02-08 15:50:37 -08:00
Ryan Hsu
f75bd24407 qcacld-3.0: fix regression for STA PNO WoW
qcacld-2.0 to qcacld-3.0 propagation

This is to fix the regression in the case of suspend request.
Below patch overkills the case for PNO and extscan in progress.

  Commit Subject: "Fix the PNO WoW is not configured in concurrency case"
  change id: I97084cfde73025f0d09b60616959c9530ba82c80

The combined condition check should be maintained to check
the case for PNO or extscan in progress, otherwise the WoW would
be enabled in the case PNO in progress is not enabled,
and end up not setting PNO patterns and failed to reconnect
after resume.

Change-Id: Icc5f19d07abea9fb25479452ce1c467d7811317c
CRs-fixed: 953257
2016-02-08 15:50:37 -08:00
Satish Singh
f324e9ce6a Release 5.0.0.154
Release 5.0.0.154

Change-Id: I90325f3ebc5cbbc70c3d4fc24060f6acc94e2beb
CRs-Fixed: 688141
2016-02-08 15:50:37 -08:00
Peng Xu
4d67c8fbb9 qcacld-3.0: Vendor command to scale TX power
This is for FR23278: Runtime configuration of softAP Tx power.
The value that send by the vendor command will set the power levels
as below:
	0 --- no scaling, 100%
	1 --- 50% of max power
	2 --- 25% of max power
	3 --- 12% of max power
	4 --- minimum power
Another vendor command is to decrease the power by actual db value.

CRs-fixed: 941772
Change-Id: I61d48299b4af361c214e2ab8bb1fa848161431de
2016-02-08 15:50:37 -08:00
Peng Xu
f5d60c8524 qcacld-3.0: Clean up usage of con_mode
Separate con_mode from adapter mode definition and clean up usage of
con_mode.

CRs-fixed: 917959
Change-Id: Ia058826cdb873558ab8703fcd4f80d37d3f782df
2016-02-08 15:50:37 -08:00
Manikandan Mohan
130eb5797f qcacld-3.0: CL 1431762 update fw common interface files
qcacld-2.0 to qcacld-3.0 propagation

Update to add WMI interface for Berkeley packet filter feature.

Change-Id: Ib531691c227a4b9e4c4087f6eaf08796677c93c1
CRs-fixed: 865207
2016-02-08 15:50:37 -08:00
DARAM SUDHA
e83cda60b6 qcacld-3.0: Fix datapath defects detected by Static code analyser
qcacld-2.0 to qcacld-3.0 propagation

Line 118: CID 50610 (#3 of 3): Out-of-bounds access (OVERRUN)
Line 200: CID 50680 (#1 of 1): Out-of-bounds read (OVERRUN)
Line 367: CID 50732 (#1 of 1): Out-of-bounds write (OVERRUN)
add TID validation check in RX_IND to avoid tid >19 scenario.

Change-Id: I32a3339902e231a8193fb8ee984ef029e24bc7e5
CRs-Fixed: 836067
2016-02-08 15:50:37 -08:00
Himanshu Agarwal
31f2856f13 qcacld-3.0: Avoid double free of vdev
Propagation from qcacld 2.0 to qcacld 3.0

Due to a race condition, vdev is getting deleted in
ol_txrx_vdev_detach and after that in
ol_txrx_peer_unref_delete, as vdev->delete.pending
is not equal to 0 as it is some garbage value, vdev
is getting deleted again causing crash.

This fix release the lock after checking
vdev->delete.pending so that before vdev gets deleted
in ol_txrx_vdev_detach, this check has been made and as
vdev->delete.pending is 0, it will not delete the
vdev in ol_txrx_peer_unref_delete and so vdev will be
deleted only once.

Change-Id: I4a7362b0e226c66ccb7c72243276d77e8df60b20
CRs-Fixed: 949397
2016-02-08 15:50:37 -08:00
Himanshu Agarwal
3df0752b05 qcacld 3.0: Fix return type of few "cdf_atomic" APIs
Propagation from qcacld 2.0 to qcacld 3.0

The atomic variables are of integer type but "cdf_atomic_read",
"cdf_atomic_dec_and_test" and "cdf_atomic_inc_return" APIs
have return type of unsigned int. Because of this, these APIs
return positive value even when it is negative.

This fix change the return value of "cdf_atomic_read",
"cdf_atomic_dec_and_test" and "cdf_atomic_inc_return" APIs
from unsigned int to int so that negative value remains negative.

Change-Id: I9c4077547e1e1370bbb401af77b248944cdf25fa
CRs-Fixed: 902636
2016-02-08 15:50:37 -08:00
Abhishek Singh
10112381b7 qcacld-3.0: Add extended rates in Assoc req if AP has it
qcacld-2.0 to qcacld-3.0 propagation

Extended Supported Rates are filled in Assoc req based on the
dot11mode and in Case dot11mode is 11A it's not filled.
Some AP have Basic rate in Extended Rate set in 11A mode.
Thus AP reject the association as Driver does not sent the extended
rate set in 11A mode.

Removed the dot11mode dependency for Extended Supported Rates.
With this change if AP have Extended Supported Rates driver will
add the Extended Supported Rates IE in Assoc req.

Change-Id: Ibd1c98a7cfae46988ff4434579edde7d4222841d
CRs-Fixed: 903270
2016-02-08 15:50:37 -08:00
Abhishek Singh
b1d73ab4b5 qcacld-3.0: Abort preauth if disconnect is received for the current AP
qcacld-2.0 to qcacld-3.0 propagation

If preauth is in progress with too many APs in the roamable AP
list and at the same time disconnect is received from supplicant as
part of unload, the deauth req will be queued in sme pending list
till csr completes the preauth process.

Now as part of unload, driver may purge the sme pending command list
and with it the disconnect command may also get removed if preauth
takes too much time.

This will lead to DEL BSS missing before HAL STOP and thus crash.

To avoid this abort the preauth process once disconnect is received.

Change-Id: I1c35f0c7e38295cfadafdad69f0b9a99ba61404c
CRs-Fixed: 942579
2016-02-08 15:50:37 -08:00
Satish Singh
ce7212f414 Release 5.0.0.153
Release 5.0.0.153

Change-Id: I30b27c1d77de35cacb94e0b1ac3f384e87dd7ece
CRs-Fixed: 688141
2016-02-08 15:50:36 -08:00
Srinivas Girigowda
f9d9dd47ab qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSirFTUpdateKeyInfo
Replace tSirMacAddr with cdf_mac_addr in struct sSirFTUpdateKeyInfo.

Change-Id: I427217dfb4f08dde6bef874de6d68ca5281502e0
CRs-Fixed: 898864
2016-02-08 15:50:36 -08:00
Srinivas Girigowda
d5965c4b92 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSirSmeSetContext Req/Rsp
Replace tSirMacAddr with cdf_mac_addr in struct sSirSmeSetContext Req/Rsp.

Change-Id: If4f75c162dbb4156d462a927033f94b9170a518f
CRs-Fixed: 898864
2016-02-08 15:50:36 -08:00
Srinivas Girigowda
bcd04a6313 qcacld-3.0: Remove obsolete struct sAniGetStatsReq
Remove obsolete struct sAniGetStatsReq.

Change-Id: I8478e8d94f00b63ff2926ec4ea4e3dd7f271de13
CRs-Fixed: 898864
2016-02-08 15:50:36 -08:00
Srinivas Girigowda
aeb3332ba9 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSirAddtsReq
Replace tSirMacAddr with cdf_mac_addr in struct sSirAddtsReq.

Change-Id: I9a9f4cfc2185859c30d56ec4bc98891c9895531d
CRs-Fixed: 898864
2016-02-08 15:50:36 -08:00
Srinivas Girigowda
bab88935f0 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSirDelts Req/Rsp
Replace tSirMacAddr with cdf_mac_addr in struct sSirDelts Req/Rsp.

Change-Id: I66f2b191b1eb823d395f70fc2c66697b377c7482
CRs-Fixed: 898864
2016-02-08 15:50:36 -08:00
Srinivas Girigowda
99faf48d43 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSirAggrQosReq
Replace tSirMacAddr with cdf_mac_addr in struct sSirAggrQosReq.

Change-Id: I1f58cf95eb3028ef763cd624fa05dcdc288d820e
CRs-Fixed: 898864
2016-02-08 15:50:36 -08:00
Srinivas Girigowda
01d1c3c1b5 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in tSmeIbssPeerInd
Replace tSirMacAddr with cdf_mac_addr in tSmeIbssPeerInd and
tSirIbssPeerInactivityInd.

Change-Id: Ie83aa414e312431aeb7f730a3f8027ea960acc36
CRs-Fixed: 898864
2016-02-08 15:50:36 -08:00
Srinivas Girigowda
61de4bbbfe qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sSmeMaxAssocInd
Replace tSirMacAddr with cdf_mac_addr in sSmeMaxAssocInd and
tSirSmeGetAssocSTAsReq.

Change-Id: Ie36a22b5ee5c823833981b51ef91525f6c6af692
CRs-Fixed: 898864
2016-02-08 15:50:36 -08:00
Srinivas Girigowda
c9148f798b qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in tSmeCsaOffloadInd
Replace tSirMacAddr with cdf_mac_addr in tSmeCsaOffloadInd.

Change-Id: Iaf4357b2da216d9f11ca35331d45bff5193a2ee9
CRs-Fixed: 898864
2016-02-08 15:50:36 -08:00
Srinivas Girigowda
ca40f98808 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in WowlEnterParams
Replace tSirMacAddr with cdf_mac_addr in WowlEnterParams.

Change-Id: Ifc2edce83693fb01ef4ea642727902d493347225
CRs-Fixed: 898864
2016-02-08 15:50:36 -08:00
Srinivas Girigowda
5d4860029f qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in tSirUpdateAPWPSIEsReq
Replace tSirMacAddr with cdf_mac_addr in tSirUpdateAPWPSIEsReq.

Change-Id: Ia6d8ea2523257caac541c84d10b7e6a81afc606b
CRs-Fixed: 898864
2016-02-08 15:50:36 -08:00
Srinivas Girigowda
8e717d30cf qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in tSirChangeBIParams
Replace tSirMacAddr with cdf_mac_addr in tSirChangeBIParams.

Change-Id: I21823288cb43379625ec892967eab432c89510cc
CRs-Fixed: 898864
2016-02-08 15:50:36 -08:00
Srinivas Girigowda
c52474ded0 qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in tSirSetHT2040Mode
Replace tSirMacAddr with cdf_mac_addr in tSirSetHT2040Mode.

Change-Id: I802cd0353e6a6408f911ccf26a80b938be8a6e48
CRs-Fixed: 898864
2016-02-08 15:50:36 -08:00
Sushant Kaushik
b50010fbd7 qcacld-3.0: Fix static analysis error in limProcessTdls.c
qcacld-2.0 to qcacld-3.0 propagation

Currently while populating 11a and 11b rates, there is
no bound check for rateset array. This can result in buffer
overflow. As a part of fix add bound check to avoid any
buffer overflow for the rateset.

CRs-fixed: 798054
Change-Id: Ib42f5de642ad54d5c2a1ccdab37d88928b98af01
2016-02-08 15:50:36 -08:00
Yuanyuan Liu
edcbc30ce9 qcacld-3.0: Add support of setting FW debug mode
FW needs the debug mode from WLAN INI file. After parsing INI file,
WLAN driver passes the mode value to platform driver, which uses
QMI message to exchange information with FW.

Change-Id: Ifd01b18bcfafad2344196d80ab17c605cca35972
CRs-Fixed: 942237
2016-02-08 15:50:36 -08:00
Naveen Rawat
14298b94a9 qcacld-3.0: For LFR 3, save reassoc frame sent OTA by firmware
In LFR3 reassoc frame is sent by firmware and host or supplicant is not aware
of its content. Because of this supplicant does not have complete information
to perform EAP exchange with authenticator if fresh EAP exchange is requested.
To fix this:
1) Take the reassoc req frame passed by firmware and save that to pe session
   This frame will then be passed to supplicant through usual path.
2) In case of FT connection, do not pass key replay counter attribute to
   supplicant.

Change-Id: I51dd8004c910b45c7f25e9cd140448e592b096b3
CRs-Fixed: 943711
2016-02-08 15:50:36 -08:00
Naveen Rawat
d1cee1208c qcacld-3.0: Fix rrm capability update from config ini file
Get rrm capab from mac_ctx in function sme_get_config_param().

This ensures that subsequent calls to this function will correctly
update rrm config.

Change-Id: Iddaae66b94ccaa127f08fd0a897bc986a959a0eb
CRs-Fixed: 955114
2016-02-08 15:50:36 -08:00
Naveen Rawat
16b8287816 qcacld-3.0: Move 5GHz channels ahead of 2 GHz for Early Stop
In case prefer 5 GHz preference is set, move the 5GHz channels ahead
of 2GHz channels in channel list as used in Early Stop Roaming Scan
feature. This ensures that while roaming, when these features are
enabled DUT will scan 5 GHz channels first and roam if a candidate
AP is found.

Change-Id: I96d997560a3eca5fd378aa3ed78c5766d097cafd
CRs-Fixed: 951959
2016-02-08 15:50:36 -08:00
Houston Hoffman
2ab3f43df1 qcacld-3.0: Recheck firmware indicator register after enabling interrupts
qcacld-2.0 to qcacld-3.0 propagation

We suspect that the firmware indicator interrupt is being dropped when
the firmware indicator interrupt is disabled.  Check the firmware indicator
after reenabling the firmware indicator interrupt.

Change-Id: I600bd9dfae99ab96dfaf7e3448cef9128f8b7357
CRs-Fixed: 925315
2016-02-08 15:50:35 -08:00
Houston Hoffman
6710de643f qcacld-3.0: completion_freeq_lock needs initialization
Initialization of completion_freeq_lock was removed as part of
removing the completion thread.  The lock still protects the
variable num_sends_allowed for copy engines used for sending.

Change-Id: Ia52d2c1b839d2ccfedbd175f1b8f60f953d08203
CRs-Fixed: 951563
2016-02-08 15:50:35 -08:00
Houston Hoffman
c9f2a429a0 qcacld-3.0: Record polled completion processing
Since the wmi tx copy engine's completions can be
processed in both its tasklet context and through
ce_per_engine_servicereap on a polled basis, we
wish to be able to distinguish the when each is used.

Change-Id: I5892eeeab4e1c7e4c35b958d98db7ad0293ec24f
CRs-Fixed: 951569
2016-02-08 15:50:35 -08:00
Houston Hoffman
d93b804d66 qcacld-3.0: Make ce_init_ce_desc_event_log not static
Fix a compilation error for perfbuild.

Change-Id: I26950eddb8c0f0835cf1faf145f7997a601f2339
CRs-Fixed: 955059
2016-02-08 15:50:35 -08:00
Vidyullatha Kanchanapally
dcd3b5a3a2 qcacld-3.0: Post message to SME upon DelBSS/DelSta failure
qcacld-2.0 to qcacld-3.0 propagation.

This fix ensures that a response message is sent back to SME if
a DelBSS/DelSta failure is returned by firmware, without which SME
command can get stuck.

Change-Id: I42425809ef93d447af0b34aee05e601e30a18ccc
CRs-Fixed: 810491
2016-02-08 15:50:35 -08:00
Ryan Hsu
cb118cf9df qcacld-3.0: hdd: Add EGAP interface and ini configuration
qcacld-2.0 to qcacld-3.0 propagation

This change introduces 4 ini parameters to configure to firmware
    - gEenableEGAP:   forcely overwrite firmware feature capb
    - gEGAPInactTime: inactivity timeout value
    - gEGAPWaitTime:  wait timeout value before enter EGAP mode
    - gEGAPFeatures:  the feature flag firmware would support
        WMI_AP_PS_EGAP_F_ENABLE_PHYERR_DETECTION       0x1
        WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_PS_STATE    0x2
        WMI_AP_PS_EGAP_F_ENABLE_PWRSAVE_BY_INACTIVITY  0x4

Integrate the hdd_wlan_kick_green_ap to execute the Green AP
and EGAP features, depending on the ini and also the tgt_cfg
capability flag,

Change-Id: Ic5db3990aa0a028ed700f6e2f60a11e75c0f1ed1
CRs-fixed: 929063
2016-02-08 15:50:35 -08:00
Ryan Hsu
3c8f79f22c qcacld-3.0: Add Enhanced Green AP interfaces and event handler
qcacld-2.0 to qcacld-3.0 propagation

The firmware reports the Enhanced Green AP (EGAP) service
(EGAP_SERVICE) feature flag to indicate the support of EGAP
feature.

The EGAP is to offload the legacy Green AP feature to firmware
in order to aggressively enable the Green AP other than wait
for host control latency.

Add the knob to hold the EGAP infomation when firmware support
it, also populate the information up to hdd target config.

And then add a SME interface to allow hdd layer to configure
the EGAP configuration.

Change-Id: I9be927369e7cf07731f8e9ba49d65224e05c340b
CRs-fixed: 929063
2016-02-08 15:50:35 -08:00
Deepak Dhamdhere
ecce974317 qcacld-3.0: Remove #ifdef FEATURE_WLAN_LFR from SME
The condition #ifdef WLAN_FEATURE_LFR is used to include some of
the roaming code. It has been defined for all the recent driver
builds. Roaming code underneath is permanent part of the driver.
Remove #ifdef FEATURE_WLAN_LFR compiler flag from SME so that the code
will always be compiled in.

CRs-Fixed: 936683
Change-Id: I86b9e3dee6b92c89a54de6df769800c31fc3ad17
2016-02-08 15:50:35 -08:00
Deepak Dhamdhere
42b5c11dd8 qcacld-3.0: Remove #ifdef WLAN_FEATURE_NEIGHBOR_ROAMING from SME
The condition #ifdef WLAN_FEATURE_NEIGHBOR_ROAMING is used to include
some of the roaming code. It has been defined for all the recent driver
builds. Roaming code underneath is permanent part of the driver.

Remove #ifdef WLAN_FEATURE_NEIGHBOR_ROAMING compiler flag from SME
and CSR so that the code will always be compiled in.

CRs-Fixed: 936683
Change-Id: I63a43b7cfd9360341d4ac4126cbf9fc8ac89071a
2016-02-08 15:50:35 -08:00
Deepak Dhamdhere
9d1615c29b qcacld-3.0: Remove #ifdef WLAN_FEATURE_NEIGHBOR_ROAMING from HDD
The condition #ifdef WLAN_FEATURE_NEIGHBOR_ROAMING is used to include
some of the roaming code. It has been defined for all the recent driver
builds. Roaming code underneath is permanent part of the driver.

Remove #ifdef WLAN_FEATURE_NEIGHBOR_ROAMING compiler flag from HDD so
that the code will always be compiled in.

CRs-Fixed: 936683
Change-Id: I777d48f26aea36383747281bd4fef2eadc7beefb
2016-02-08 15:50:35 -08:00
Abhishek Singh
e068085f29 qcacld-3.0: Delete preauth session in case of deauth from host
qcacld-2.0 to qcacld-3.0 propagation

The preauth session is not deleted if the deauth is from host
(eCsrForcedDeauth).
Adds the check to delete the preauth session and stop the
preAuthReassocIntvlTimer timer, in case of deauth from host.

Change-Id: I181344b0f3a41ff5c3a77f30b4c8cf80557c23b5
CRs-fixed: 649521
2016-02-08 15:50:35 -08:00
Ganesh Kondabattini
59a4a9597f qcacld-3.0: set TX_USAGE flag for bss key in AP mode.
qcacld-2.0 to qcacld-3.0 propagation

Set TX_USAGE flag for default key (BSS key) when using WEP40 or
WEP140 encryption in AP mode.

Change-Id: Icb4411410d84b05a47f193ffbd632445f736246e
CRs-Fixed: 940725
2016-02-08 15:50:35 -08:00
Abhishek Singh
1e39fc24ee qcacld-3.0: If RSN IE is present ignore WPA IE to get cbmode
qcacld-2.0 to qcacld-3.0 propagation

if AP has RSN IE and supports AES, driver goes on to check
WPA IE and if it contains only TKIP in unicast cipher, it
sets cbmode to 0 (20Mhz).
Added a check to ignore the WPA IE if RSN IE is present and take
decision on cbmode with respect to RSN IE only.

Change-Id: I4eaf8a2d6a9f3a43e74e606045af995fbaa800ad
CRs-Fixed: 739345
2016-02-08 15:50:35 -08:00
Sreelakshmi Konamki
3b8ba61288 qcacld-3.0: Make data length as zero whenever we free the data
qcacld-2.0 to qcacld-3.0 propagation

In limSendSmeJoinReassocRsp API, assoc req, assoc rsp, ricData, tspecIes
are sent to SME layer if corresponding pointer in psessionEntry is
not NULL. There is bug here where the pointer is NULL but the length is
non zero. Because of this data is copied at incorrect offset and data
at SME layer is not at right offset leading to corrupted IE in
next re-assoc request.

Fix this by making length as zero whenever we free the data.

Change-Id: I4ba4ff49e56bc2f2758d869eae8ff9370b0c0489
CRs-Fixed: 932712
2016-02-08 15:50:34 -08:00
Ganesh Kondabattini
d6641d8473 qcacld-3.0: Transmit tdls mgmt frames only for STA in authenticated state
qcacld-2.0 to qcacld-3.0 propagation

Before transmitting the tdls mgmt frames the STA should be
connected to AP and it should be in authenticated state.

Change-Id: Id79d4e6ad55a6b80e2fac2369f48bedf6551bcd6
CRs-Fixed: 893784
2016-02-08 15:50:34 -08:00
Sreelakshmi Konamki
c88f537ccb qcacld-3.0: Add missing MTRACE log in HDD
qcacld-2.0 to qcacld-3.0 propagation

Currently, MTRACE logs are not captured for the events posted
from SME to HDD. So, add missing MTRACE log in hdd_smeRoamCallback()
and also add missing eRoamCmdStatus enums in get_eRoamCmdStatus_str().

Change-Id: I26ef8c651b7b873939341b643056ff977a40ea19
CRs-Fixed: 855875
2016-02-08 15:50:34 -08:00
Sreelakshmi Konamki
39acb13377 qcacld-3.0: Changes in Protocol Stack logs from numerical values to string
qcacld-2.0 to qcacld-3.0 propagation

As a part of logging enhancement,to make logs more
interactive, changed pmcstate,scanType etc from
numerical values to human readable string in
Protocol stack.

Change-Id: I589088c2c5fd0afa106a1d0773a2ff525b0dd083
CRs-Fixed: 638916
2016-02-08 15:50:34 -08:00
Sushant Kaushik
465560671b qcacld-3.0: Set peer staId for management frame.
qcacld-2.0 to qcacld-3.0 propagation

Currently for sta mode while sending management
frames such as auth, assoc, reasssoc,deauth,
diassoc driver sends selfStaId. This results
in frames going on the air with the self data
rate and not the data rate supported by peer.
As a part of fix, make sure that the peerStaId is
used for sending above management frames.

Change-Id: Ia368ff13aed1002600f5fb3ad55c3d20106d586a
CRs-Fixed: 826260
2016-02-08 15:50:34 -08:00
Abhishek Singh
96bda8e0e3 qcacld-3.0: Do not send DEL BSS to FW if ADD BSS fails
qcacld-2.0 to qcacld-3.0 propagation

Even though ADD_BSS fails the driver tries to send DEL BSS to
firmware which will crash upon receiving DEL BSS.

To avoid this crash do not send DEL BSS to Firmware if ADD BSS
fails and just do cleanup.

Change-Id: Ieabf241c8277ae76bb5f491f9d8a2b783d8ea47e
CRs-Fixed: 929249
2016-02-08 15:50:34 -08:00
Vidyullatha Kanchanapally
3554e4e25f qcacld-3.0: Error handling in Roaming code #2
Qcacld-2.0 to qcacld-3.0 propagation.

This fix contains the following changes
1. Ensure rx mgmt packet is freed in all cases.
2. Fail preauth if the pre-auth response timer
   failed to start.
3. Correct some logging and remove unnecessary code.

Change-Id: Icd3a12ba8878de5bad7ff1125ba8be123dfae4eb
CRs-Fixed: 808756
2016-02-08 15:50:34 -08:00
Krishna Kumaar Natarajan
03cc3860e6 qcacld-3.0: Check for session validity in pe_delete_session
Check if PE session passed to pe_delete_session is valid
before proceeding with the deletion.

Change-Id: Icfe54e8bc286f14ea757b0619c067cc74ce87492
CRs-Fixed: 948924
2016-02-08 15:50:34 -08:00
Krishna Kumaar Natarajan
48de7dedc8 qcacld-3.0: Initialize PMF timer in create session
Initialize PMF comeback timer in PE create session.

Currenlty PMF comeback timer is initialized in join request and
destroyed in delete session. In offload cases, PE session is
created without join request resulting in destruction of timer
which was not initialized. Add timer initialization in
pe_create_session.

Change-Id: I3dba6713b2bf64cc69f0f2d8322293ff763c0989
CRs-Fixed: 948924
2016-02-08 15:50:34 -08:00
Kiran Kumar Lokere
37d3aa2c93 qcacld-3.0: Log the rssi info from FW in sta kick out event
qcacld-2.0 to qcacld-3.0 propagation.

Log the RSSI info of the disconnect if the STA disconnection is
due to STA kick out event from FW.

Change-Id: I0fad3f8d0e7990f4211b7840bed7605a4b97f3cb
CRs-Fixed: 874197
2016-02-08 15:50:34 -08:00
Krishna Kumaar Natarajan
4d090352a5 qcacld-3.0: Check tdls off-channel passed is not a DFS channel
qcacld-2.0 to qcacld-3.0 propagation

Add check to validate if non-DFS channel is passed as
TDLS off channel via driver command and INI config.

Change-Id: I6696c47d438bdcc1b8733241e60ca5c52fb1022f
CRs-Fixed: 915972
2016-02-08 15:50:34 -08:00
Kiran Kumar Lokere
a3e5e0b538 qcacld-3.0: do not process HT IE change if RoC is in progress
qcacld-2.0 to qcacld-3.0 propagation.

Ignore HT IE change if RoC is in progress because as
part of HT IE change we will try to change the channel
parameters which use the same callback as RoC. So if
we try to change the channel parameters if RoC is in
progress we will overwrite the callback causing problems
in the upper layers which are expecting a notification.

Change-Id: I6bace6dd2bd40728ece94e3efe59f3e7038a4e6a
CRs-Fixed: 710027
2016-02-08 15:50:34 -08:00
Jeff Johnson
d399e90f96 qcacld-3.0: Relocate key adapter fields
This is a qcacld-2.0 to qcacld-3.0 propagation.

A crash was observed internally where wlan_hdd_ipv6_changed() was
accessing unmapped memory.  This function has logic which looks at key
fields in the netdev's private data area to make sure the netdev
belongs to this driver before it further utilizes the netdev.  The
problem with this logic is when it is invoked with non-wlan netdevs,
if those netdevs were created with small private data areas, then the
offsets at which the key fields would exist in the wlan netdev may
fall outside the memory mapped for those other netdevs.  In order to
avoid accessing unmapped memory in those cases, relocate the key wlan
netdev fields to the beginning of the wlan adapter structure.

Change-Id: Idb830fd18e5724a684505c9d110f6f1de5622eac
CRs-Fixed: 946373
2016-02-08 15:50:34 -08:00
Jeff Johnson
19caeb103e qcacld-3.0: Relocate init of tx_action_cnf_event
HDD has a completion variable which is used to synchronize the sending
of an action frame with the send confirmation.  Proper use of a
completion variable requires a specific sequence of steps:
- Initialize the completion variable
- Perform the activity that has asynchronous processing
- Wait on the completion variable

Currently HDD does not correctly follow this model for sending action
frames; it incorrectly initializes the completion variable after it
has invoked the UMAC function which sends the frame.  This creates a
race condition whereby the TX could complete and set the completion
variable before the completion variable is initialized, and then when
the completion variable is initialized the fact that the activity has
already completed will be lost.

In order to prevent this race condition and conform to the sequence of
steps required for proper completion variable usage, relocate the
initialization of tx_action_cnf_event.

Change-Id: Ibc54b8dd62c3a828d1a43922d89e7970af325f6e
CRs-Fixed: 950132
2016-02-08 15:50:34 -08:00
Jeff Johnson
f6358f1060 qcacld-3.0: Remove OEM DATA request callback support
qcacld-2.0 to qcacld-3.0 propagation.

The SME OEM DATA request API supports a callback function pointer,
however this callback functionality is obsolete.  Therefore remove
this functionality.

Change-Id: Id06910841ad625412ba1f3222407e471f4d7edd7
CRs-Fixed: 911404
2016-02-08 15:50:34 -08:00
Chandrasekaran, Manishekar
34e325a210 qcacld-3.0: Remove usage of fixed broadcast sta id for IBSS
Remove the usage of fixed broadcast sta id of 1 for IBSS.
Fixed broadcast std id of 1 was getting used for IBSS since
no concurrency was supported for IBSS earlier and sta id 1
was always used as broadcast sta id. Now with concurrency
being allowed with IBSS, this fixed broadcast sta id cannot
be used. Make the broadcast sta id dynamic.

Change-Id: I79222e276fbdd41a8938a3a26e58af9335f17ade
CRs-Fixed: 953523
2016-02-08 15:50:34 -08:00
Chandrasekaran, Manishekar
12a818a9a6 qcacld-3.0: Wait for MC thread clean-up during IBSS leave
Ensure that wait for MC thread clean-up happens as part
of IBSS leave so that by the time upper stack calls the
change interface, we are all set to proceed further.

CRs-Fixed: 949956
Change-Id: Ib0ee79fe38cbf3c462bd8157c4e014c086f5c29f
2016-02-08 15:50:34 -08:00