Commit Graph

343 Commits

Author SHA1 Message Date
Rajeev Kumar
f5b6da2359 qcacld 3.0: Address buffer overflow due to invalid length
qcacld-2.0 to qcacld-3.0 propagation
Check for valid length before copying the packet filter data from
userspace buffer to kernel space buffer to avoid buffer overflow
issue.

Change-Id: I9548727543b903b5eaafa25c6184615d511ca99d
CRs-Fixed: 930533
2016-04-20 22:20:04 -07:00
Rajeev Kumar
1f289cf91c qcacld-3.0: Fix scan failure
Scan pending flag is maintained per adapter but it is getting
reset only when all the scans on all the adapters are
completed.
Update logic to reset scan pending flag when there is no pending
scan on that particular adapter.

Change-Id: If019f6619fa11a505c489a12474b5f550982a727
CRs-Fixed: 990466
2016-04-20 22:20:00 -07:00
Rajeev Kumar
2cce8a8a36 qcacld-3.0: Check priviledge permission for SET_THREE_INT_GET_NONE
Kernel assumes all SET IOCTL commands are assigned with even
numbers. But in our WLAN driver, some SET IOCTLS are assigned with
odd numbers. This leads kernel fail to check, for some SET IOCTLs,
whether user has the right permission to do SET operation.
Hence, in driver, before processing SET_THREE_INT_GET_NONE IOCTL,
making sure user task has right permission to process the command.

Change-Id: I3c695160d637ed87b04ccf3299985055a9791c4b
CRs-Fixed: 930948
2016-04-18 16:52:26 -07:00
Manjunathappa Prakash
585178db34 qcacld-3.0: Cleanup fastpath changes
Do following cleanup on fastpath code changes:
1) Remove reaping of Tx HIF buffers in Rx handling, instead handle
   reaping in Tx fastpath itself.
2) In ce_per_engine_service_fast check for more Rx packets after
   packet processing.
3) Make stub functions as static inline for non-fastpath enabled case.

Change-Id: If07c4344a424ce13b94128bf28931a24255b661a
CRs-Fixed: 987182
2016-04-17 18:16:51 -07:00
Manjunathappa Prakash
1c95626911 qcacld-3.0: add fastpath Rx support
With dedicated CE for Rx HTT messages, skip processing in HTC layer.
Do special handling in HIF-CE and HTT layer, this optimization results
in 3-4% CPU utilization gain.

Change-Id: I400148a0e24ac62dd09e2a95d5f35d94d83fe2df
CRs-Fixed: 987182
2016-04-17 18:16:43 -07:00
Houston Hoffman
c1f962efb7 qcacld-3.0: Support multiple RX CEs for NAPI/LRO/FastPath
Make changes so that LRO and FastPath can check whether a
given CE is a datapath RX CE. This is done through new
flags in CE_state which indicate whether or not a given
CE is a htt_[tr]x CE.
Also add support to enable multi-queue NAPI.
Note that the paths are not yet parallel-execution protected,
but this should be OK as all NAPI instances are processing
the same interrupt now and as such as serialized.

Acked-by: Orhan K AKYILDIZ<oka@qca.qualcomm.com>

Change-Id: I57125b3e1fbad0345b6e1f4ed25e71babaf4f520
CRs-Fixed: 982728
2016-04-17 18:16:31 -07:00
Sreelakshmi Konamki
720f2b7ac2 qcacld-3.0: Fix to set ptk_installed to true in 11R roaming
qcacld-2.0 to qcacld-3.0 propagation

PTK exchange and install happens during preauthentication if key_mgmt is
FT-PSK. STA TL state moves to authenticated only if ptk_installed is true.
Currently ptk_installed is false after roaming due to which STA TL state
does not move to authenticated state and also does not enter BMPS.

To fix this issue, set ptk_installed to true in case of 11R roaming

Change-Id: I59e4466994e59b055246e86613315b0299b767a7
CRs-Fixed: 961555
2016-04-17 18:12:03 -07:00
Varun Reddy Yeturu
d351a6c58e qcacld-3.0: Change name of routine is_roaming_offload_enabled
Modify the routine name of is_roaming_offload_enabled to
roaming_offload_enabled

CRs-Fixed: 978905
Change-Id: I1bfa1ebe1f7dd9dc88c68a0c660fa1886cf0e0fe
2016-04-17 18:11:18 -07:00
Varun Reddy Yeturu
bbbbe237f9 qcacld-3.0: Enable compile time enable/disable for roaming
Enable compile time featurization support for both LFR2.0
and LFR3.0 using WLAN_FEATURE_HOST_ROAM and
WLAN_FEATURE_ROAM_OFFLOAD respectively

CRs-Fixed: 978905
Change-Id: Ib5976cd0cd5a6e117a1334bfc73a043e36e25f77
2016-04-17 18:10:33 -07:00
Varun Reddy Yeturu
a66f9c5d71 qcacld-3.0: Remove WLAN_FEATURE_ROAM_SCAN_OFFLOAD
Remove WLAN_FEATURE_ROAM_SCAN_OFFLOAD compile time flag from the code
since this is relevant to roaming (LFR2.0) and always enabled by default.
The flag also does not seem to cover the feature entirely and it does
not make any meaning to only cover this piece of code.

CRs-Fixed: 978905
Change-Id: Ifa393c2733e87fcb34aba3e4f4cdb5f534196537
2016-04-17 18:10:07 -07:00
Dhanashri Atre
fa2cfa1085 qcacld-3.0: Revert "qcacld-3.0: Add debug print for EAPOL msg"
Revert Change-Id: I1eb4f9dac6520b1ce00cdfc3e0fcef721ae498d6

This change is causing a regression on the UDP SAP -> STA
throughput.

CRs-Fixed: 990954
Change-Id: I09b8b61e70eddc2a85a6b22a186cc2eef0f8510f
2016-04-17 18:08:49 -07:00
Srinivas Girigowda
515a9efb36 qcacld-3.0: Remove FEATURE_WLAN_ESE_UPLOAD compile macro
At present and going forward ESE and ESE_UPLOAD will be the
de-facto approach supporting ESE. Hence there is no need of two compile macros
FEATURE_WLAN_ESE and FEATURE_WLAN_ESE_UPLOAD.

Instead Remove FEATURE_WLAN_ESE_UPLOAD and Keep only FEATURE_WLAN_ESE.

Change-Id: If1a04e95211a0d639db7b60a57a6d5f215d26f4e
CRs-Fixed: 950762
2016-04-17 18:07:30 -07:00
Nirav Shah
89223f7e36 qcacld-3.0: Update netif queue timestamp to avoid watchdog
Update netif queue timestamp while stopping queues
to avoid NETDEV watchdog

CRs-Fixed: 983687
Change-Id: Ifb0777001fead64836f1ea38eb8a3becc47ecac2
2016-04-17 18:07:07 -07:00
Kiran Kumar Lokere
13644679a2 qcacld-3.0: Move the channel width enum to cds
Currently channel width has different enum values in
different modules. Move the channel width enum definition
to CDS to maintain single channel width enum value in
the driver

Change-Id: I6a46d0c02546263080a15a3ec7c52486fc51e98e
CRs-Fixed: 983914
2016-04-17 18:06:59 -07:00
Mahesh A Saptasagar
d639dde9ec qcacld 3.0: Validate WPA and RSN IE for valid length
qcacld-2.0 to qcacld-3.0 propagation

Return failure to applications if genie ioctl is invoked to configure
WPS/WPA/RSN IEs with arguments of improper length.

Change-Id: I2e034ef9f2537922be35d46ce266e6b99dab7bb6
CRs-Fixed: 931451
2016-04-17 18:06:38 -07:00
Mahesh A Saptasagar
4871cdbc01 qcacld 3.0: Validate ioctls for valid input length
qcacld-2.0 to qcacld-3.0 propagation

Return failure to applications if ioctl is invoked with arguments
of improper length.

Change-Id: I01589f37996510ee130485ef43e1f36811692e28
CRs-Fixed: 930542
2016-04-17 18:06:33 -07:00
Amar Singhal
6842e8f33a qcacld-3.0: Fix set-band operation
Currently, in regulatory callback, we do not update channels
that are out-of-band. For example, if the current band is set
to 2.4 GHz, we do not update channels of 5 GHZ band. Now, if the
band gets changed, the channel list goes wrong. Fix this issue by
updating all the channels and then calling
wlan_hdd_cfg80211_update_band to update wiphy for the current
in-band channels.

Change-Id: If6d6fee01c7a7d6b2aa0f7d3acb862decce0819e
CRs-Fixed: 978660
2016-04-17 18:06:24 -07:00
Amar Singhal
a7bb01b460 qcacld-3.0: Regdomain kernel-doc and other changes
Add kernel documentation for regdomain data structures. Also
rename some of the data structures to better names.

Change-Id: Iae26079ae8a7f06e2670594694ae36c2c2a0a524
CRs-Fixed: 961806
2016-04-17 18:06:17 -07:00
Amar Singhal
2299511d9f qcacld-3.0: Make regdomain code linux style
Fix the data structures of regdomain code; to make it linux style.

Change-Id: If8123370f4ce370adba1a49636b42449c2644144
CRs-Fixed: 961806
2016-04-17 18:05:45 -07:00
Naveen Rawat
3b6068c457 qcacld-3.0: Remove the file cds_regdomain_common.h
Data structures defined in cds_regdomain_common.h are similar
to those defined in cds_regdomain.h. Therefore remove the file.

Change-Id: I929b03058e9441e4a652314789cf91dbd94d0329
CRs-Fixed: 961806
2016-04-17 18:05:22 -07:00
Krunal Soni
fb84cbd911 qcacld-3.0: (part-8)Replace enum device_mode to tQDF_ADAPTER_MODE
Instead of using two different enums for setting adapter mode,
combined them to make only one set of enum.

Change-Id: Ic3e7c2944d1b8d66042398c57eb307ab30223524
CRs-Fixed: 985273
2016-04-17 18:01:56 -07:00
Krunal Soni
9b04c9b8dd qcacld-3.0: (part-7)Replace enum device_mode to tQDF_ADAPTER_MODE
Instead of using two different enums for setting adapter mode,
combined them to make only one set of enum.

Change-Id: If408976d5554a50a0023c2a49f80876911fdf1d8
CRs-Fixed: 985273
2016-04-17 18:01:51 -07:00
Krunal Soni
056ea0ffde qcacld-3.0: (part-6)Replace enum device_mode to tQDF_ADAPTER_MODE
Instead of using two different enums for setting adapter mode,
combined them to make only one set of enum.

Change-Id: Ia98c4406992c1065850dc70ab3b33c49216d0a24
CRs-Fixed: 985273
2016-04-17 18:01:47 -07:00
Krunal Soni
b4326f27d9 qcacld-3.0: (part-5)Replace enum device_mode to tQDF_ADAPTER_MODE
Instead of using two different enums for setting adapter mode,
combined them to make only one set of enum.

Change-Id: I62a36b3e4d7f92a6d8b15648645035c6ea7735c2
CRs-Fixed: 985273
2016-04-17 18:01:43 -07:00
Krunal Soni
f07bb38727 qcacld-3.0: (part-3)Replace enum device_mode to tCDF_ADAPTER_MODE
Instead of using two different enums for setting adapter mode,
combined them to make only one set of enum.

Change-Id: I963d1d7f854ecdfe8c301cc5c8fc554ce8df4e35
CRs-Fixed: 985273
2016-04-17 18:01:29 -07:00
Krunal Soni
be766b01b8 qcacld-3.0: (part-2)Replace enum device_mode to tQDF_ADAPTER_MODE
Instead of using two different enums for setting adapter mode,
combined them to make only one set of enum.

Change-Id: If20617734c5f6f71cef6b85b86d907f8be9d39f9
CRs-Fixed: 985273
2016-04-17 18:01:19 -07:00
Krunal Soni
276241e3d2 qcacld-3.0: (part-1)Replace enum device_mode to tQDF_ADAPTER_MODE
Instead of using two different enums for setting adapter mode,
combined them to make only one set of enum.

Change-Id: Ie41244becec39fe1f5f24a721f5b24e137e7fd26
CRs-Fixed: 985273
2016-04-17 18:01:12 -07:00
Rajeev Kumar
dd4dd08b2c qcacld-3.0: Fix deadlock in hdd_adapter_lock usage
hdd_adapter_lock is acquired from MC thread and hif_napi soft IRQ
context so it should be acquired using spin_lock_bh such that when
MC thread is holding the lock soft IRQ can't pre-empt it and lead
to deadlock

Change-Id: Iee4a4905bf7cc09cba9bd26f416d505eb47a5c96
CRs-Fixed: 981886
2016-04-17 18:00:21 -07:00
Amar Singhal
90aaa6ae49 qcacld-3.0: Fix setting vht160/80p80 driver capablities.
We dont need to set both 80p80 and 160 mhz driver capabilties
in driver. Since 160 is a subset of 80p80 capability; we need to
set only one

Change-Id: I20ea254523bade3ad93e49added35d4bdc1d0509
CRs-Fixed: 985763
2016-04-17 17:56:05 -07:00
Chandrasekaran Manishekar
cde33d77d6 qcacld-3.0: Send channel switch request instead of doing SAP restart
Send channel switch request instead of performing SAP restart when
doing a MCC to SCC switch. This is controlled using the existing INI
item 'gWlanMccToSccSwitchMode'. The new value of '3' will perform
this channel change by sending (E)/CSA whereas the old value of '2'
can still be used to do a channel change by doing SAP restart

Change-Id: I79e7317219503de0a9957940f3cf7a4e91c7a521
CRs-Fixed: 986202
2016-04-17 17:55:17 -07:00
Chandrasekaran Manishekar
068e25eeb8 qcacld-3.0: Enable FEATURE_WLAN_MCC_TO_SCC_SWITCH flag in the driver
Enable feature flag FEATURE_WLAN_MCC_TO_SCC_SWITCH in the Kbuild to
make use of the MCC to SCC switch feature. The resulting errors in
compilation are fixed along with some enhancement in the debug logs
in this feature path

Change-Id: I0ddb2f371c28ade6d8fc9ea12ba104a99394827f
CRs-Fixed: 986079
2016-04-17 17:54:28 -07:00
Ryan Hsu
9206a4ef77 qcacld-3.0: Update cfg80211_vendor_event_alloc for Kernel upgrade
Commit: 6c09e79 ("cfg80211: Allow NL80211_ATTR_IFINDEX to be added
to vendor events")

This commit add parameter wdev to cfg80211_vendor_event_alloc(), that would
be used to check at __cfg80211_alloc_vendor_skb() to assign ifindex to
the skb and is merged in Kernel 4.1, so add a kernel version macro to
support this

Also merge the hdd_vendor_put_ifindex into cfg80211_vendor_event_alloc
to assign the ifindex when wdev is given, that way we can unify the interface.

Change-Id: I321e12bfe3f9160a8a0fcfeb2408f6336d50e2c5
CRs-fixed: 964291
2016-04-17 17:51:33 -07:00
Kiran Kumar Lokere
333a995e90 qcacld-3.0: Enable Tx LDPC by default
Enable Tx LDPC by default.

Change-Id: I5d276dbf40b8f85cedcf19be0aff5de2809661ea
CRs-Fixed: 983920
2016-04-17 17:50:46 -07:00
Sreelakshmi Konamki
9d6b75d1a4 qcacld-3.0: Downgrade WMM AC for data frames if BMPS disabled
qcacld-2.0 to qcacld-3.0 propagation

As per the current implementation STA is sending Vo tagged data after
delTspec if BMPS disabled.

To fix this issue, make wmmAcAccessAllowed to false in hdd_wmm_delts().

Change-Id: I2351a4fd463e0e80cc7aefa5485046eab491ce45
CRs-Fixed: 967685
2016-04-17 17:05:13 -07:00
Archana Ramachandran
393f3796b6 qcacld-3.0: Dynamic antenna switch in disconnected/station mode feature
Functionality for switching antenna mode (TX/RX chains)
from 1x1 to 2x2 and vice versa dynamically without reloading
the driver. This feature is currently supported in the
disconnected state where only scan operation can happen and
standalone station mode.

The changes include the following:
1. Driver command IOCTL to set/get antenna mode as follows
DRIVER SETANTENNAMODE <# of streams>
DRIVER GETANTENNAMODE

2. Processing SETANTENNAMODE and GETANTENNAMODE to dynamically
change the number of TX/RX chains as follows

Dynamic switch request is allowed only when the supported
number of chains in the system is greater than 1.

Dynamic antenna switch is achieved by sending
WMI_PDEV_SET_ANTENNA_MODE command to the FW chain mask
manager with parameters to change the number of TX/RX chains.
This request will be maintained by the chain mask
manager and applied whenever only one MAC is active.

If there is a station association followed by dynamic switch
to 1x1 mode then SM power save IE is included in the HT caps
of the association/reassociation request management frame.

Dynamic switch in the connected standalone station mode is
achieved by sending SMPS force mode command with appropriate
values for smps mode by the chain mask manager.

Change-Id: I65d51d173a627dc2751ef10cc2172a5215e7b8db
CRs-Fixed: 931250
2016-04-17 17:05:12 -07:00
Archana Ramachandran
fec2481466 qcacld-3.0: Do not send SMPS force mode on dynamic antenna mode switch
When dynamic antenna selection requests to change the number of
TX/RX chains, the FW chain mask manager will take care of sending
the corresponding SMPS action frames to the AP to put the station
in 1x1 or 2x2 mode. The host driver should only handle setting
the right SMPS mode in the HT capabilities of association
or re-association requests.

CRs-Fixed: 931250
Change-Id: I9bedcc5024a98040f571f730ff084f6fe3e3ad00
2016-04-17 17:05:12 -07:00
Archana Ramachandran
a20ef8127d qcacld-3.0: Dynamic antenna selection request/response messages
Add support to request for antenna mode to FW to switch from
1x1 to 2x2 and vice versa dynamically and process the response
status of whether the request was sent successfully.

Change-Id: Ie4b0b36981423f9325c48c7ebad445d5cc1f2a21
CRs-Fixed: 931250
2016-04-17 17:05:12 -07:00
Archana Ramachandran
d41c3ed58c qcacld-3.0: Add interface files for dynamic antenna selection
Add interface files for dynamic antenna selection feature

CRs-Fixed: 931250
Change-Id: Ieafe368a25c3a69e32cd5de6822ef84130528096
2016-04-17 17:05:12 -07:00
Chandrasekaran, Manishekar
6e9aa1b9cd qcacld-3.0: Avoid message handler of netlink APIs to be OS agnostic
Avoid message handler of netlink APIs to be OS agnostic. Retain the
message handler to get the concurrency matrix in HDD.

Change-Id: Ieb121512e3d8ae15678da46ed8425c07fd003f69
CRs-Fixed: 946161
2016-04-17 17:05:12 -07:00
Ryan Hsu
07495ea2e6 qcacld-3.0: Update wlan_hdd_add_virtual_intf for Kernel upgrade
Commit: 6bab2e19 ("cfg80211: pass name_assign_type to
rdev_add_virtual_intf)

Above commit add new parameter - name_assign_type to indicate the
ifname is set by userspace or generated by the kernel.

Also add this new param to all underlying interfaces, so that we can
get rid of the conditional flag interleave in APIs but only to the
toppest and lowest one.

Change-Id: I2233391f4e7313cf4134c975e14b6060ad852c5d
CRs-fixed: 966067
2016-04-17 17:05:12 -07:00
Gupta, Kapil
3e61707d7c qcacld-3.0: Add debug print for EAPOL msg
qcacld-2.0 to qcacld-3.0 propagation

Currently driver has debug print for EAPOL
but it doesn't tell whether its M1, M2 etc.
As part of fix, add debug print for M1-M4 msg.

Change-Id: I1eb4f9dac6520b1ce00cdfc3e0fcef721ae498d6
CRs-Fixed: 919617
2016-04-17 17:05:12 -07:00
Rajeev Kumar
8e3e283a82 qcacld-3.0: Add extended IBSS feature on qcacld-3.0
Add extended IBSS feature on qcacld-3.0

Change-Id: I7faaf646df363a74954defbef103afbb4b72af92
CRs-Fixed: 766181
2016-04-17 17:05:12 -07:00
Peng Xu
66162de29e qcacld-3.0: Fix firmware assertion caused by vdev delete
Currently the SME session is deleted during interface change API and
a new session is not opened until SAP is ready to start. This will
cause crash when scan API is invoked. This fix opens the SME session
after interface type is changed, so that it can be used to scan and
SAP later.

Change-Id: I3c4f8da14dbc70a3102fb1892bb101eb1a90a00d
CRs-fixed: 968572
2016-04-13 21:51:26 -07:00
Sandeep Puligilla
93a29ecadd qcacld-3.0: HDD: Add support for 2.4Ghz HT40 STA
- Add support for 2.4Ghz HT40 STA.
- Add HT40 OBSS scan start and stop operation.
- Add support for extraction of OBSS scan paramters from beacon
  and probe response

Change-Id: Idc69d4d17271864c1d3bc2c6e16f25eae73331b0
CRs-Fixed: 947086
2016-04-13 21:51:26 -07:00
Tushnim Bhattacharyya
15596cf5c1 qcacld-3.0: Fix compilation issues with ocb functions
OCB header files shouldn't be under FEATURE_WLAN_CH_AVOID. During cld2.0 to
cld3.0 propagation ocb header file inclusion mistakenly got inside above
featurization. Relocate it outside the FEATURE_WLAN_CH_AVOID conditional.

Change-Id: Ib1cbc179dc0f5b769e18a4d7d8268081a25ede3f
CRs-Fixed: 975731
2016-04-13 21:51:25 -07:00
Kiran Kumar Lokere
9a733a7fcc qcacld-3.0: Remove WLAN_FEATURE_11AC feature flag
Remove WLAN_FEATURE_11AC feature flag

Change-Id: I8c521502a44f2e8a0647843cd7a972497e900c17
CRs-Fixed: 980682
2016-04-13 21:51:25 -07:00
Yue Ma
da39642b24 qcacld-3.0: Fix compilation bug for LPASS feature
If CONFIG_WLAN_FEATURE_LPSS flag is not enabled, there will be
compilation errors due to missing definitions. Fix them by moving
inline funtions to the corresponding header file.

Change-Id: I90b55daeb0068b2ab40fbb27d650a5382681705c
CRs-fixed: 979523
2016-04-13 21:51:25 -07:00
Amar Singhal
388b3f01f0 qcacld-3.0: Make regulatory code more readable
Re-write part of regulatory code to make more readable.
Rename variables to more intuitive names. Also simplify the
logic.

Change-Id: I4ab896d18a6b5f6e2f9c84884268e2af2077f74b
CRs-Fixed: 856727
2016-04-13 21:51:25 -07:00
Amar Singhal
b8d4f1575c qcacld-3.0: Change channel nomenclature
Change channel nomenclature to more appropriate names.

Change-Id: If7fcd832a35563896534bab425ca05b528e1de93
CRs-Fixed: 856727
2016-04-13 21:51:25 -07:00
Amar Singhal
7ccdc4ff47 qcacld-3.0: Remove 40mhz bonded channel from driver
40 mhz channel array is redundant and does not give the
correct channel bonding information. Therefore remove
these channels, bonding array, and its associated usage.

Change-Id: I913fb97cdc913b1a027d21b0df526dfd5cd5902f
CRs-Fixed: 856727
2016-04-13 21:51:25 -07:00