Commit Graph

5131 Commits

Author SHA1 Message Date
Anirban Sirkhell
d01ccdf6eb qcacmn: Add WMI for estimated airtime calculation
Add support for sending WMI command to firmware
to measure estimated airtime that a new client
will get and populate the result that firmware
returns in the ESP IE.

Change-Id: Ic5fcb11100ecd0597ba02dfa5512e2f4ff3558c9
CRs-Fixed: 2261469
2018-07-06 04:45:23 -07:00
Subrat Mishra
ab28071e57 qcacmn: Add OL param for estimated airtime calculation
Introduce OL param to configure estimated airtime metrics.
Periodicity, airtime, ppdu duration and block ACK window.

Change-Id: Id3d538928f9140fabfaaa6f042fcff6b9df4bef0
CRs-Fixed: 2261469
2018-07-06 04:45:21 -07:00
gaurank kathpalia
4a987aa95d qcacmn: Fix hw mode change issue in case of DBS
The driver stops the oppurtunitistic timer for DBS, when
the start AP requests come, which results in HW mode stuck
in DBS if the next vdev start request comes on the same MAC
This further results in NSS = 1 for the MAC, hence throughput
decreases.

Fix is to set hw mode to single MAC in case the STA/SAP comes up
in the band/channel

Change-Id: I8ec4282c78594ee7e133a1e7768fa230bb2e8180
CRs-Fixed: 2273443
2018-07-06 03:19:19 -07:00
Nirav Shah
4c8b78a44c qcacmn: Add support for QCN7605(Genoa)
1. Copy engine assignment changes for Genoa.
2. Add support for QCN7605 device type.

Change-Id: I5cf6b765a51608c27f2ef2e6d3bf45b64875dd6c
CRs-Fixed: 2265278
2018-07-06 03:19:17 -07:00
Sathish Kumar
07734b957b qcacmn: Add OL param for DBR ring status dump
Direct Buffer Rx module has an API to print the status of the rings
per module per pdev. Introduce OL param to support this through
CLI.

Change-Id: Iebbd2c314e72dc0753cdcb581f17d93d3c71a5db
CR-Fixed: 2263968
2018-07-06 01:46:08 -07:00
c_priys
b214c2454c qcacmn: WMI Recording Failure on Multi-radio RDPs
WMI recording is done per pdev and hence an instance of
debugfs directory (eg: WMI0, WMI1, WMI2 for 3 radio boards)
has to be created in /sys/kernel/debug/ path.

The wmi handle is per pdev and hence is causing the problem of wmi_instance
being 0 always as each pdev has its own wmi_handle.
WMI1 and WMI2 debugfs directories are not created as wmi_instance
is always 0.

WMI debugfs directory is created for every pdev of the psoc and naming
convention is changed to WMI_SOCx_PDEVx.

Change-Id: Ieb7e9d072d84f699588a8f719508c5cd8d9873fb
CRs-Fixed: 2232472
2018-07-06 00:16:36 -07:00
c_priys
85191774b5 qcacmn: Re-configure interrupt bits once again after FW resets
Issue:
Customer sees a lot of NOC errors after wifi comes up as
FW resets the interrupt bits that host configured and
then checks whether interrupt bits are enabled. FW then enters
into MSI mode without filling the necessary MSI address and MSI
data registers with proper values and this leads to lot
of NOC errors on the platform.

Fix description:
Configure the interrupt bits one more time after FW
resets the registers and then mark the host ready bit
in FW indicator address

CRs-Fixed: 2056198
Change-Id: I7a8871a9878b415ec90c4938df669c6225e79586
2018-07-06 00:16:33 -07:00
Kiran Kumar Lokere
b49263bc0b qcacmn: Add support for SRD channels in ETSI domain
Add support for Short Range Devices 25 mW max power
channels in ETSI regulatory domain.

Add Short Range Devices 25 mW max power channels only
if DSRC feature is disabled.
Provide service apis to check SRD and DSRC channels.

Change-Id: Ib2a1d7cf191d07319cb29038ad60130f5cbe7f16
CRs-Fixed: 2264790
2018-07-05 20:49:34 -07:00
Wu Gao
661ec9d74a qcacmn: Verify id before removing idr
It causes kernel warning if remove an invalid id. So, verify id before
removing idr.

Change-Id: I22cd5753a6e4fae0087faaee1c722017523b311e
CRs-Fixed: 2271235
2018-07-05 19:32:04 -07:00
Sravan Kumar Kairam
f1e0766647 qcacmn: DP peer functions code cleanup
Remove pre processor directives for platform specific
dp peer functions and have stubs for them.

Change-Id: Ibdb9114918bbec86cc4be411f730da5777204226
CRs-Fixed: 2262603
2018-07-05 14:14:05 -07:00
Dustin Brown
45b7264097 qcacmn: Enable configuration component in dispatcher
Enable the configuration component in dispatcher, by calling the
cfg_dispatcher_init() and cfg_dispatcher_deinit() functions.

Change-Id: I1aa0d79729f35be422457280700cf1121a1873bf
CRs-Fixed: 2258230
2018-07-05 14:14:03 -07:00
Pramod Simha
21e69f5fe2 qcacmn: Handle reinjected pkts in REO null q execption
Prevent setting of nbuf length when it's non linear
i.e. contains an extension list. This happens when a reinjected
defragmented packet encounters a NULL q exception.

Change-Id: I937b1bf9e1461edd89dec62a9c9e17b8c3b9315f
CRs-Fixed: 2256075
2018-07-05 12:44:12 -07:00
Yeshwanth Sriram Guntuka
985e8440d5 qcacmn: Fix possible buffer overflow in wma_encrypt_decrypt_msg_handler
Data len received in encrypt decrypt data response
is not validated against the max allowed size which
can result in buffer overflow.

Fix is to validate data len against max allowed size.

Change-Id: I69bd8e63014220e5a2f291e4a0b1914d10c79fd7
CRs-Fixed: 2226375
2018-07-05 12:44:10 -07:00
Linux Build Service Account
686253e1f1 Merge "qcacmn: Deregister rx callback if failed to abort P2P scan" 2018-07-05 10:03:11 -07:00
Gerrit - the friendly Code Review server
ff887f7a2e Merge changes into wlan-cmn.driver.lnx.2.0 2018-07-05 09:47:33 -07:00
Wu Gao
7e6e9b3180 qcacmn: Deregister rx callback if failed to abort P2P scan
For failed to abort P2P scan case, it won't deregister rx callback and
then memory leak. To fix the memory leak, call deregister rx callback
if abort P2P scan fails.

Change-Id: Iad4087175d437bf73363c782181b070492251f5b
CRs-Fixed: 2268674
2018-07-05 08:23:35 -07:00
Ajit Pal Singh
973024916e qcacmn: Add new definition of usb_hif_get_logical_pipe_num()
Add new definition of usb_hif_get_logical_pipe_num() for Genoa(QCN7605)

Change-Id: I278407b6f373c8a4e0509a1597ca27d83f8104fd
CRs-Fixed: 2266915
2018-07-05 06:42:22 -07:00
Ajit Pal Singh
a63ed8be19 qcacmn: Init tgt_info->target_type for QCN7605 USB
1) Setup target_type for QCN7605(Genoa) USB.
2) Do not reset soc in hif_usb_diag_write_cold_reset() for QCN7605
3) Skip USB_REQ_SET_CONFIGURATION and usb_set_interface() for QCN7605
4) Return false in hif_needs_bmi() for QCN7605

Change-Id: I159b7043d55c5a1a341defde89cd8ccc760bb830
CRs-Fixed: 2266915
2018-07-05 06:42:20 -07:00
Ajit Pal Singh
cd4a1c4308 qcacmn: qcn7605: Add support for HIF_RX_CTRL_PIPE
For QCN7605-USB, WMI_CTRL_SERVICE will use an exclusive
IN USB endpoint.

Change-Id: Ia943c9c3741e91f4b13a85719eee770c08ce8379
CRs-Fixed: 2266915
2018-07-05 06:42:17 -07:00
Bala Venkatesh
9bf4f33852 qcacmn: Avoid possible buffer overflow
In function tdls_ct_sampling_tx_rx, memcpy of
unknown length buffer is done into fixed size
struct array. Mem copying without checking
length can lead to buffer overflow.

Change-Id: I0608bd69d71ff1901f82b44d045963e9d383e6ce
CRs-Fixed: 2269276
2018-07-05 06:42:15 -07:00
Frank Liu
1a3151ed20 qcacmn: Post tdls connet/disconnect event to target_if queue
TDLS will update tdls firmware state according to STA connection status,
the change is to post tdls connect/disconnect event to target_if queue,
otherwise these events will be scheduled too late which would be out of
sync, cause unexpected results.

Change-Id: I76d70339f236b580bfb98fb1b8f5121784cb3465
CRs-Fixed: 2269978
2018-07-04 17:30:42 -07:00
Shreedhar Parande
ced1918365 qcacmn: Commands related to PreCAC auto channel switch support
Added commands for setting intermediate channel and
getting precac channel state.

CRs-fixed: 2272085
Change-Id: I735f70008abdbe60ce2c167e7c0fe9227572b96c
2018-07-04 13:05:10 -07:00
Lihua Liu
0fd49e9a6f qcacmn: Add check for valid length to avoid buffer overflow
Add check for valid length before copying in function
extract_ndp_ind_tlv to avoid potential buffer overflow issue.

CRs-Fixed: 2271344
Change-Id: I2ddcbc46a45d4d5308b1e0cf663598c85512bbaf
2018-07-04 11:38:14 -07:00
Jianmin Zhu
e0abd264db qcacmn: Move SAP to safe channel after STA disconnection
Standalone SAP is not allowed on lte-coex channel if STA+SAP SCC
enabled on lte-coex channel. So move the SAP to a safe channel
once STA disconnected.

Change-Id: I00682f5bbb3da772e3e26ccd8d08183be28cc9ec
CRs-Fixed: 2265263
2018-07-04 10:22:19 -07:00
Jianmin Zhu
143f083967 qcacmn: Fix compile implicit conversion from enumeration type error
Error: implicit conversion from enumeration type
'enum wlan_umac_comp_id' to different enumeration type
 'wlan_objmgr_ref_dbgid' [-Werror,-Wenum-conversion]

Change-Id: I641c1eee77e977547841cebb4fd2fef8c06ca18c
CRs-Fixed: 2271058
2018-07-04 10:22:16 -07:00
Venkateswara Swamy Bandaru
f290a54316 qcacmn: Fix irq imbalance issue
irq imbalance issue happens when some irq is disabled or enabled multiple
times. For group interrupts enabling one interrut can cause irq to come.
By this time other interrupts in the group are not enabled. But the irq
will disable all group interrupts in qir context. Later those interrupts
will be enabled. This can cause race condition and in turn irq imbalance
issue. Fix this issue by protecting request_irq and free_irq of group
interrupts to avoid race condition.

Change-Id: Ic99e80600ef63c0d7aff45231d0dae6767cd084c
CRs-Fixed: 2262333
2018-07-04 08:45:52 -07:00
Dustin Brown
ce28cb1bdb qcacmn: Add optional reason to QDF_DEBUG_PANIC
It is generally useful to log the reason for a panic at the time of
panic. The Linux panic API accepts a reason string, so to aid in moving
from panic() to QDF_DEBUG_PANIC(), add an optional reason parameter.

Change-Id: If4ed0e664f6b15deb4c6edf76bdc25f55ba82fac
CRs-Fixed: 2271764
2018-07-04 06:54:52 -07:00
Yeshwanth Sriram Guntuka
f48e5a8e20 qcacmn: Ignore deauth ind received when in DEAUTH_REQ substate
P2P GO received deauth frame from p2p client and del_station is
received from userspace. As part of del_station FORCE_DEAUTH_STA
command is processed. Deauth frame is processed after this which
sends DEAUTH_IND to csr. Wm status change command is enqueued and
is not processed since there is already an active command. Cleanup
is done as part of del_station. Auth frame received is processed
and auth rsp is sent. Message is posted to lim on receiving assoc
req frame from p2p client. Wm status change command is processed
and DEAUTH_CNF msg is posted to lim. Assoc req frame is processed
and ASSOC_CNF is posted to lim. DEAUTH_CNF is processed before
ASSOC_CNF due to which sta_ds entry is removed. Assoc resp is
not transmitted as a result and p2p group formation fails.

Fix is to ignore deauth indication received when csr substate
is DEAUTH_REQ.

Change-Id: Ia1966a4cced3faf15605aeb3d69b8fafa2176c22
CRs-Fixed: 2269609
2018-07-04 03:01:58 -07:00
Krishna Rao
490ccc914e qcacmn: Add definitions for WMI_HOST_SMART_LOG_SCENARIO
Add definitions for the enum WMI_HOST_SMART_LOG_SCENARIO which defines
individual smart logging scenarios which can be enabled/disabled. Also
add utility macros to set/get the same.

Change-Id: I2b188a6f5cb202868d43253e706115de570cb1e8
CRs-Fixed: 2162053
2018-07-04 03:01:56 -07:00
gaurank kathpalia
cb5ce20e28 qcacmn: Remove DBS logic from scm_calculate_nss_score
Driver calculates nss score for BSS, depending upon the
current DBS status. Thus it does not give more preference
to 2x2 and considers it the same as 1x1.
But the DBS condition can change and driver
can move to single mac.

Fix to give more preference to 2x2 BSS so that
better throughput can be achieved in single mac.

Change-Id: Ib684abe423fd21a81cb13db5f741fdfbb750328d
CRs-Fixed: 2271976
2018-07-04 00:57:47 -07:00
Linux Build Service Account
62b8a9886d Merge "qcacmn: Fix vendor abort scan failure" into wlan-cmn.driver.lnx.2.0 2018-07-03 19:45:22 -07:00
Linux Build Service Account
449009a34c Merge "qcacmn: Map IGMPMLD pdev param to appropriate param supported by target" into wlan-cmn.driver.lnx.2.0 2018-07-03 17:54:57 -07:00
Sandeep Puligilla
dc89e47503 qcacmn: Fix vendor abort scan failure
Vendor abort scan request is cancelling all
the pdev scans instead of a specific scan command.

Modified vendor abort scan API to cancel specific
scan request.

Change-Id: I087637e44b8ee7f6cc12e9e47db04eec3f9ff93e
CRs-Fixed: 2270030
2018-07-03 15:16:46 -07:00
Arif Hussain
9e6c82e47f qcacmn: dfs: Reduce log level for false radar detections
Reduce log level for false radar detections.

Change-Id: I01b822db19204eec8e0294f1555463c6dc0837cd
CRs-Fixed: 2271621
2018-07-03 13:42:22 -07:00
Sathish Kumar
257b307eb0 qcacmn: Map IGMPMLD pdev param to appropriate param supported by target
Pdev parameter to prioritize IGMP packets are supported through
WMI_PDEV_PARAM_IGMPMLD_AC_OVERRIDE. In legacy platforms, they are
supported by different pdev parameters WMI_PDEV_PARAM_IGMPMLD_OVERRIDE
and WMI_PDEV_PARAM_IGMPMLD_TID.

Map host maintained pdev params wmi_pdev_param_igmpmld_override and
wmi_pdev_param_igmpmld_tid to WMI_PDEV_PARAM_IGMPMLD_AC_OVERRIDE since
this is the one supported by TLV based targets.

Change-Id: Ia11787265bd926f257dc1b028552c6e7f1f733d2
CRs-Fixed: 2272219
2018-07-03 08:46:41 -07:00
Linux Build Service Account
cb090521de Merge "qcacmn: Allocate DP_TRACE buffer dynamically" 2018-07-03 05:33:24 -07:00
Linux Build Service Account
fa056a3e14 Merge "qcacmn: Configure Allowed Channels and ACS Allowed Channels" 2018-07-03 05:33:24 -07:00
Pramod Simha
6e10cb2dd6 qcacmn: Add CDP API to set key in data path
1. Add CDP API to set encryption key in datapath.
   Used to perform RX TKIP demic.
2. Fixes to RX TKIP demic function.

Change-Id: Ia14caeb71a320b4746f4303cf6611f1b6e4947ae
CRs-Fixed: 2214749
2018-07-02 16:09:03 -07:00
Pramod Simha
366c1e01e6 qcacmn: Add WAR for fragmented TKIP MIC error
HW wrongly calculates MIC for the last fragment of TKIP
encrypted packets due to which this packet ends up on WBM
execption ring. Add code to handle the last fragment
in WBM execption ring.

Change-Id: I2dea5b3fbcb48036435e26f32f4641e7a0840bcd
CRs-Fixed: 2214749
2018-07-02 16:09:01 -07:00
Abhinav Kumar
bfbf4422a7 qcacmn: Fix qbss calculation in case of good RSSI threshold
Currently, when Current RSSI is better than good RSSI threshold
first driver calculates qbss percentage and set qbss score accordingly
and when current RSSI is weaker than or equal to good RSSI threshold
(-70dBm) driver directly sets 10% as qbss score. But as per requirement
Driver should calulate qbss percentage in order to set qbss score for
RSSI = -70db

Fix is to allow driver to ignore qbss percentag calculation only
when current RSSI is less than good RSSI threshold.

Change-Id: I1be2ab71016d779a60d21923a34340ae19d6c7f5
CRs-Fixed: 2261635
2018-07-02 16:08:58 -07:00
Keyur Parekh
d005ca2492 qcacmn: Added change to correct Tx PPDU BW value
This change required to match Tx PPDU BW value with
FW stats. As per firmware enums its starts with 5MHz
BW value. So to match 20MHz value with enum zero, need
to subtract from BW populated from TLV.

Change-Id: Ifcc49839c08de78c9200b877890fdce2e0846f1d
2018-07-02 16:08:56 -07:00
Frank Liu
1113c5b649 qcacmn: Initialize tdls peer sta_id
TDLS sta_id check logic has changed, the value zero is valid, so
initialize the tdls peer sta_id as 0xff, otherwise add tdls peer
won't happen.

Change-Id: I805e4abdec8806f649d15da4f02980de9ffdc0ea
CRs-Fixed: 2263523
2018-07-02 13:52:48 -07:00
Manjunathappa Prakash
cf4286b730 qcacmn: DPtrace: Do not log to memory during high throughput
During high TPUT scenario logging of DPT trace is not useful,
require more MIPS. Disable datapacket DPtrace logging during
TPUT runs, but contiue to log special packets like ARP/DHCP/ICMP etc..

Change-Id: I70c9368de4cb2423901449b267452a34d652213d
CRs-Fixed: 2255756
2018-07-02 12:23:38 -07:00
Manjunathappa Prakash
617ff247dd qcacmn: Affine NAPIs based INI CPU mask
Affine NAPI CPUs based CPU mask specified in INI config.

Change-Id: I0bea3389a7565f8ec157d4587a442b5e11c33fb2
CRs-Fixed: 2255756
2018-07-02 12:23:36 -07:00
Bala Venkatesh
b5a400ee01 qcacmn: Move the SAP to non DFS channel after STA disconnection
Standalone SAP is not allowed on DFS channel if STA+SAP SCC enabled
on DFS channel. So move the SAP to a non DFS channel as soon as STA
gets disconnect.

CRs-Fixed: 2269249
Change-Id: I27d018739f53997641a7113cfc7c844e02bd7e29
2018-07-02 10:59:57 -07:00
Bala Venkatesh
dea772a6b7 qcacmn: Add support to allow user select preferred band for SAP
Add enum QDF_MCC_TO_SCC_WITH_PREFERRED_BAND(6) for this.
If ini gWlanMccToSccSwitchMode is selected to
QDF_MCC_TO_SCC_WITH_PREFERRED_BAND(6) then following will be the
behaviour of STA+SAP concurrency.
1. If second interface(SAP/STA) comes in same band as
   first interface(STA/SAP) respectively then force SCC
   irrespective of channel.
2. If second interface(SAP/STA) comes in other band as
   first interface(STA/SAP) then dont force SCC allow
   interband MCC or DBS based on DBS capability.
Allow interband MCC but not intraband MCC.

Change-Id: I91d41b4b0306ed4e362b5bcab9538f5fd5feea7d
CRs-Fixed: 2260677
2018-07-02 08:45:47 -07:00
Rachit Kankane
b3ba76975e qcacmn: Allocate DP_TRACE buffer dynamically
Allocate memory for g_qdf_dp_trace_tbl buffer dynamically.

Change-Id: Id5cc51776f4378ecc97d7d758d5e502055423fb2
CRs-Fixed: 2268793
2018-07-02 11:24:53 +05:30
Nandha Kishore Easwaran
dd68508f03 qcacmn: Check pdevhandle before processing htt msg
Add null check for pdevhandle before processing htt msg.
This is added for polled mode to avoid race between pdev detach
and CE poll timer stop.

Change-Id: I925e70985bd11e05e0679ad0107493aaefe8a273
CRs-fixed: 2352564
2018-07-01 04:37:44 -07:00
Anurag Chouhan
15da7ce9be qcacmn: Fix compilation error on LE target
Fix compilation errors on LE target.

Change-Id: I57c337c8144e4f49a8fd7eefb22164f05beb13c5
2018-06-30 08:58:38 -07:00
Amar Singhal
dbff0cc4f2 qcacmn: Make worker thread processing API non static
Worker thread WMI processing API has more broader use now. So make it
non-static.

CRs-Fixed: 2268243
Change-Id: Iae51e1115f5f3664d08c891e8a42d24bd3ef7bcf
2018-06-30 00:18:01 -07:00