Commit Graph

44 Commits

Author SHA1 Message Date
Amir Patel
0b19b4b59f qcacmn: Update API signature for vdev and peer search to include pdev_id
Add a pdev_id parameter to following API
    For peer:
        a. wlan_objmgr_get_peer()
        b. wlan_objmgr_get_peer_by_mac_n_vdev()
        c. wlan_objmgr_get_peer_by_mac_n_vdev_no_state()
        d. wlan_objmgr_get_peer_no_state()
        e. wlan_objmgr_get_peer_nolock()
        f. wlan_objmgr_populate_logically_
            deleted_peerlist_by_mac_n_vdev()
    For vdev:
        wlan_objmgr_get_vdev_by_macaddr_from_psoc()

Change-Id: I7480c5e17e24b5dfb1a7846cfa773821a86a27ca
CRs-Fixed: 2210118
2018-05-09 01:44:39 -07:00
Krunal Soni
23c12b21dd qcacmn: Add NULL pointer check in p2p_remove_tx_context() API
Add NULL pointer check in p2p_remove_tx_context() API.

CRs-Fixed: 2232786
Change-Id: I67e541573d704f313a48c16c195a626a4040402c
2018-05-07 06:37:06 -07:00
Liangwei Dong
949b6394fe qcacmn: Fix OPPS set failed on p2p GO
Find the correct P2P GO vdev and update
the vdev_id to ps_config before set opps
parameter to Firmware.

Change-Id: Ie5435de8330f6e9c13f645e19d80cbd97f1f027d
CRs-Fixed: 2203066
2018-04-11 09:15:15 -07:00
Wu Gao
f54054683b qcacmn: Handle multi P2P MGMT frame TX
When P2P mgmt frame comes and there is same channel ROC requested
but not start, it will be failed to restart ROC timer and then drop
this frame.

Change-Id: I40cc2b66a266ebf2aa1017669e6d97b1c7de3da1
CRs-Fixed: 2202954
2018-03-16 00:55:18 -07:00
Wu Gao
8bd8fe504f qcacmn: Enable more debug information for P2P
Change log level and enable more debug information for P2P connection.

Change-Id: I459869d48c7f688246bc6e566ad2fae395ff8a2b
CRs-Fixed: 2204758
2018-03-15 23:35:58 -07:00
Wu Gao
b8a1068a48 qcacmn: Set flag for deleting tx context
Duplicate for MGMT frame tx ack comes before scheduler process first
one, then it will use freed memory. Add flag to avoid this case.

Change-Id: Id50f692ced0ddd5b267d096818f3e7ff12bf07aa
CRs-Fixed: 2188110
2018-03-15 23:35:55 -07:00
Will Huang
05a208a4fd qcacmn: Free ROC context if p2p_scan_abort failed
It is possible that call p2p_scan_abort fail while cleanup roc queue,
because vdev already been destroyed when unloading driver. In this case,
even the scan complete event will be discarded, so ROC context include
ROC timer has no chance to free.

Free ROC context include ROC timer in p2p_scan_abort failure path and
set cancel_roc_done event to avoid unneeded waiting while unloading.

CRs-Fixed: 2187778
Change-Id: I43751dca0c480e811c15de35ee28bc9426ac3764
2018-03-08 18:47:09 -08:00
Wu Gao
410dd64dd0 qcacmn: Save vdev id of current roc ctx
RX mgmt frame is from interrupt thread, it may be access freed roc
ctx for low rate case. Save vdev id of current roc ctx in p2p psoc
object. Low log level of P2P RX and TX conf since too many output.

Change-Id: I4c944244f32b844d78bb69d66e341a1f3bf13abf
CRs-Fixed: 2180116
2018-02-27 01:57:47 -08:00
Liangwei Dong
9409bca6b7 qcacmn: Add 80211W support to P2P component
Newly designed P2P component doesn't contain
80211W PMF related information which is one
of the mandatory requirement to make PMF work
for P2P.

Provide PMF support to P2P component by adding
necessary callbacks to protocol stack to get
11W related information.

Change-Id: I399f0d296f9461239ac9d720905b196e87983f29
CRs-Fixed: 2175898
2018-02-09 00:42:25 -08:00
Yeshwanth Sriram Guntuka
7766dffe94 qcacmn: Move wma_get_buf_start_scan_cmd to ucfg_scan_update_params
Move wma_get_buf_start_scan_cmd logic to common code in
ucfg_scan_update_params.

Change-Id: I4c9dcb48b4862ad10f64e260d87938251e270185
CRs-Fixed: 2180960
2018-02-08 23:34:41 -08:00
Dustin Brown
48467505c0 qcacmn: Replace QDF_MAC_ADDRESS_STR
QDF_MAC_ADDRESS_STR has been depreciated in favor of
QDF_MAC_ADDR_STR. Replace all usages with the new macro.

Change-Id: I534923783a32288f7861caf9ae52ca3aac965809
CRs-Fixed: 2179126
2018-01-25 23:39:30 -08:00
Varun Reddy Yeturu
27f023ad59 qcacmn: Fix potential NULL dereference in P2P
1) Check for validity of ps_config before dereferencing.
2) Check for validity of lo_start before dereferencing.
3) Initialize tmp_p2p_ie before using it.

Change-Id: I4cd5bcb025e63d727e5535921a4e4121d618ee36
CRs-Fixed: 2160760
2018-01-12 01:53:50 -08:00
Wu Gao
3488bf405f qcacmn: Cancel ROC if cancel tx MGMT
It do not cancel the roc for tx MGMT frame, then wait this ROC timeout
even if the next off channel tx is coming. This affact WLAN DPP test.

Change-Id: Iffdef35d137485d7b17b3671e6bbe35a228b0893
CRs-Fixed: 2155852
2017-12-22 03:20:04 -08:00
Paul Zhang
07992021c7 qcacmn: Do sanity check of requester ID
If the requester id is 0 or other invalid values,
the function scm_scan_get_requester_event_handler
will get unexpected handler.

Change-Id: I505e2e1a1bdc9cec57aaa0c28abadf28d228ba5b
CRs-Fixed: 2147555
2017-12-16 14:08:10 -08:00
Wu Gao
ef459873af qcacmn: Handle late tx ack in P2P component
In some special case, ota tx ack of P2P action frame comes more than
2 second and tx context is free due to tx time out, than crash happens
since of invalid pointer access. Solution is search tx context by nbuf,
do not process the ota tx ack if not find tx context from waiting for
ack queue.

Change-Id: I0778d0f22d963b00af5212b9d6080a95a4888e73
CRs-Fixed: 2142870
2017-12-05 17:37:16 -08:00
Wu Gao
e823bbf9d5 qcacmn: Use qdf API instead of linux function
Replacing linux function with qdf API in P2P conponemt.

Change-Id: Ibf4e8acef0b2f4be113dbecb9ac2a685f456fd53
CRs-Fixed: 2148472
2017-12-05 17:37:14 -08:00
Om Prakash Tripathi
6097caa167 qcacmn: Add support for wide band scan
Add support for 40 MHz or wider channel bandwidth scan

Change-Id: I72f3cf42e6dc957ef56842d0c333c62169cb6d68
CRs-Fixed: 2139415
2017-11-10 17:41:00 -08:00
Jeff Johnson
8713e345e6 qcacmn: Use enum QDF_OPMODE
Change "qcacmn: Rename enum tQDF_ADAPTER_MODE" (qca-wifi-host-cmn
Change-Id I20f1b6d1a0ab4b8fe6a85cefdff96a49e2f4652c) renamed enum
tQDF_ADAPTER_MODE to QDF_OPMODE. Update all references to use the
new name.

Change-Id: Ic6f663dac11a100f168b2626c7c0fbcaccbfca4f
CRs-Fixed: 2141061
2017-11-09 23:42:58 -08:00
Wu Gao
295b100739 qcacmn: Fix memory leak in P2P component
Due to race condition, there is memory leak in P2P component. Free
buffer in error scenarios.

Change-Id: I5baf77ec0d0d2f3aea9da5fcca9105dc2c60c3d0
CRs-Fixed: 2136089
2017-11-06 19:21:28 -08:00
Rajeev Kumar Sirasanagandla
c5e4a344ba qcacmn: Fix invalid buffer access in p2p mgmt tx processing
While transmitting p2p mgmt action tx frame, there is no check for
minimum payload length which can result in buffer over-read.

To avoid this, add check for header and payload length.

Change-Id: I9e3b4ef0878d934f3425d91bb6ea4a37b1892a3d
CRs-Fixed: 2103849
2017-10-26 23:48:04 -07:00
Sandeep Puligilla
fc4449c809 qcacmn: Initialize the mgmt tx params
Triggering crash at firmware due to
uninitialized value sent to firmware
as part of wmi_mgmt_params.

Initialize the management tx params
at p2p_mgmt_tx before populate.

Change-Id: Iea77266ee11f5742ea6a0074e4a6612452a764b1
CRs-Fixed: 2128419
2017-10-20 18:17:39 -07:00
Wu Gao
96f75a6038 qcacmn: Add suspend and resume handler in P2P
Add suspend and resume handler in P2P component. Cleanup mgmt tx
queue and roc queue in P2P suspend handler.

Change-Id: I36bbe98e51eb817b60f08404636f0617b6aa537f
CRs-Fixed: 2058858
2017-10-20 13:53:58 -07:00
Wu Gao
8f099b8930 qcacmn: Add debug functions to P2P component
In order to facilitate debugging P2P issues, add debug information to
P2P component.

Change-Id: I0192b1ee25bb74dc512b01ad451b03d1a45a5446
CRs-Fixed: 2105782
2017-10-17 06:44:17 -07:00
Jeff Johnson
dc3f822c6e qcacmn: umac: Replace instances of unadorned %p
Replace instances of unadorned %p in umac.

Change-Id: I7ae33c51405b31df24670dee3c98b6b4f1da9ab4
CRs-Fixed: 2111274
2017-10-03 16:02:30 -07:00
Naveen Rawat
36a2ad6e13 qcacmn: Add APIs to get IE by EID and Ext ID
Add wlan utility APIs to get IE pointer from within IE buffer by
EID or Ext ID.

Change-Id: I26492078cec73b5877f3fc346a91223a045f31aa
CRs-Fixed: 2103529
2017-09-18 20:27:41 -07:00
Prashanth Bhatta
bcd3481965 qcacmn: Change semantics of Runtime Lock APIs
Runtime PM lock init API right now returns pointer to a context
but this would cause confusion to the caller if feature is not
defined and dummy function return NULL as caller can't find real
failure versus dummy function returning because feature not being
enabled.

Fix declaring a data structure in QDF layer that caller can use
but it hides the internal details of HIF implementation for
Runtime PM locks.

CRs-fixed: 1116509
Change-Id: I4dcba604e803faa0e14fac6403610391895e382e
2017-08-15 13:27:07 -07:00
Vivek
245f447a24 qcacmn: Remove vdev/peer locks for trivial APIs
Remove vdev/peer locks from trivial API's. This follows the changes from
which the lock requirement from few simple APIs are removed.

Change-Id: I9972d51dfd1a42bdedbfd0fd4e67af03d030a1f5
CRs-Fixed: 2060880
2017-06-26 23:32:22 -07:00
Wu Gao
af44d14a13 qcacmn: support presence request
Support presence request frame in P2P component.

Change-Id: I21c1e63742396f328da1b2c7b2446abc4c35ef52
CRs-Fixed: 2039628
2017-06-02 14:47:26 -07:00
Wu Gao
6b436516fe qcacmn: Add API to cleanup roc request by vdev
It required to cleaup remain on channel request before changing adpter
type, add this API in P2P component. Handling scan dequeue event and
start failed event same as scan complete event.

Change-Id: Ie5926c954f4deff75fec53ae2c8f9762b576374e
CRs-Fixed: 2030079
2017-05-01 15:01:05 -07:00
Rachit Kankane
3abaf942a0 qcacmn: P2P protocol changes to Disable/Enable NOA
P2P-GO whenever goes offchannel, issues NOA. With this behavior, we
have issue whenever legacy STA connects to P2P-GO since legacy STA
does not understand NOA. To handle this case, changes are done in p2p
protocol component and the revised behavior will be:
 1. By default no change in NOA.
 2. Whenever first legacy STA connects to GO, p2p protocol component
    disables NOA (i.e. P2P-GO will issue Self-CTS whenever it goes
    off-channel).
 3. Whenever last legacy STA disconnects from GO, p2p protocol
    component enables NOA (i.e. P2P-GO will issue NOA whenever it goes
    off-channel).

Change-Id: I113950ac3fa99ca68fcafcfe4c6095cf4b2def43
CRs-Fixed: 2035609
2017-04-28 04:42:00 -07:00
Wu Gao
152c87421e qcacmn: register vendor specific action frame after P2P started
It only register vendor specific action frame when requested remain on
channel. When DUT as GO and invite third P2P peer, there isn't remain
on channel request and doesn't register this action frame from mgmt
txrx component, then P2P component can't receive provision discover
request frame and invitation failed.

Change-Id: Ia04e1af97aedf91fd75047b12994011b054177fc
CRs-Fixed: 2037600
2017-04-27 02:54:17 -07:00
Wu Gao
0b3198cbc0 qcacmn: Add runtime pm lock for P2P
Add runtime pm lock for remain on channel request in P2P component.

Change-Id: Ic29c5edf9e9325d1f9b65d766385327b91b0d14a
CRs-Fixed: 2036085
2017-04-24 20:06:00 -07:00
Rajeev Kumar
9d0085ee8b qcacmn: Initialize scheduler_msg on stack before posting message
Initialize scheduler_msg on stack before posting using scheduler API
such that un-used fields in message structure are initialized to 0.

Change-Id: Ib3183b2c65eb9affd6610f4572c751c39a25fff7
CRs-Fixed: 2034772
2017-04-17 23:18:18 -07:00
Wu Gao
cf450f183b qcacmn: Handle scan dequeue event and start failed event
Handle scan dequeue event and start failed event in P2P component,
same as scan complete event. Fix incorrect method to call qdf wait
single event. Fix code style issue.

Change-Id: Id8fbf5180a942183eff9b02f36f945fe17ceab6e
CRs-Fixed: 2032600
2017-04-13 17:08:30 -07:00
Abhishek Singh
f3a3e912af qcacmn: Fix peer ref count issue in p2p_mgmt_tx
In p2p_mgmt_tx ref count of peer is increased and then frame is
passed to wlan_mgmt_txrx_mgmt_frame_tx which again increase the peer
ref count. But the ref count is decreased only once when frame tx
complete is received. Thus peer is not deleted while vdev destroy
and as peer contain the ref count of vdev, vdev is also not
deleted.

To fix this Release peer ref count in p2p_mgmt_tx after
wlan_mgmt_txrx_mgmt_frame_tx.

Change-Id: I8e42b22559f3baf43fefd6183a079f9629efae3c
CRs-Fixed: 2028550
2017-04-04 22:59:38 -07:00
Wu Gao
72e062a734 qcacmn: Support rx p2p public action frame
Support rx p2p public action frame and extend the roc timer for
special frames. Also add scan requtest paramters when trigger scan
request.

Change-Id: I295bdcf9c5ff78320cbe600a483d245d38d05c06
CRs-Fixed: 2024412
2017-03-27 08:31:30 -07:00
Wu Gao
214d713362 qcacmn: Add necessary header files
Some MCL build environment report that it lack of headers. Add these
header files.

Change-Id: Ibb4a931840f00119b2abe496d755d1554a715fcd
CRs-Fixed: 2022862
2017-03-23 07:04:00 -07:00
Wu Gao
47276d6785 qcacmn: mgmt frame txrx
Modify P2P IE and tx mgmt frame. Handles tx confirm and rx frame
events.

Change-Id: I0c0ada2e12ee5ebdd3e8d7b7a6f2bd2af4357548
CRs-Fixed: 2015297
2017-03-22 18:42:14 -07:00
Wu Gao
01309adc5c qcacmn: remain on channel
Handles roc request, cancel roc reuqest and scan event in P2P
component.

Change-Id: I47085ddc3551e76ef042e9d72dc4b29de6c2b118
CRs-Fixed: 2006262
2017-03-22 18:42:12 -07:00
Wu Gao
d16c4e5622 qcacmn: Private commands and wmi events for P2P
Deliver private commands for P2P component. Registers and unregisters
wmi events by target interface. Handles wmi events from target
interface.

Change-Id: Ic25f1c22ae1650f2b059b3fb428daa1b2e66b93c
CRs-Fixed: 2015115
2017-03-22 18:42:11 -07:00
Wu Gao
88c1dd0509 qcacmn: Align frameworks of P2P component to convergence policy
Remove include folder of P2P core. Move P2P structures about noa
and listen offload to public since wmi just can be used in target
interface layer. Add more logs.

Change-Id: If9a78d02c8c970daf09ea09be05a80dd4ed4c553
CRs-Fixed: 2006243
2017-03-08 23:20:13 -08:00
Wu Gao
53531c5b9b qcacmn: Initialization of P2P component
Defines main APIs and data structures. Initial basic frame work of
P2P component.

Change-Id: I08d2e2cec734ddc535d88996f7d5ece5ef3d270a
CRs-Fixed: 1099441
2017-02-17 17:34:25 -08:00
Prakash Dhavali
1226de9d06 Merge commit '0219ae6' into wlan-cmn.driver.lnx.1.0-dev
Sync up wlan-cmn.driver.lnx.1.0-dev to CAF 5.0.0.160
from 5.0.0.149 release as baseline for subsequent win
and mcl convergence refactoring.

* commit '0219ae6': (554 commits)
  Release 5.0.0.160
  qcacld-3.0: Add wma handler for vdev delete and peer delete responses
  Release 5.0.0.159
  qcacld-3.0: Fix Compilation error on WLAN_FEATURE_11W disabled
  qcacld-3.0: Update channel width and center freq
  qcacld-3.0: Move sta state to not connected after try disconnect
  qcacld-3.0: Remove #ifdef FEATURE_WLAN_LFR from HDD
  qcacld-3.0: Remove RRM ie in Assoc Req based on AP capability
  qcacld-3.0: Fix fw statistics parsing on the host
  qcacld-3.0: Fix IPA-uc callback in NON-SMP system
  qcacld-3.0: SAP DFS-3 Feature support in DFS layer
  qcacld-3.0: SAP DFS-3 Feature support in WMA
  qcacld-3.0: correct phy_mode in hdd_chan_change_notify
  qcacld-3.0: move hif_bus_open to hif_open
  qcacld-3.0: Remove hif_claim_device
  qcacld-3.0: Remove epping context from cds
  qcacld-3.0: Enable Tx beamformee in SAP mode
  qcacld-3.0: Set the IMPS enable/disable based on INI
  qcacld-3.0: Fix memory leak in case of fw reset stats command
  qcacld-3.0: Use appropriate API to get total free descriptors
  ...
  qcacld-3.0: Enable athdiag debug support for SNOC devices
  qcacld-3.0: Remove support of power gating parameters
  qcacld-3.0: Add log in vos_mem_alloc if kzalloc takes more than 3 seconds

Change-Id: I903d2b6edfb715570daffbcfcdb46866f04737dc
CRs-Fixed: 688141
2016-03-01 09:14:32 -08:00
Prakash Dhavali
b0b838e6d5 Merge remote-tracking branch 'origin/caf/caf-wlan/master' into wlan-cmn.driver.lnx.1.0-dev
Sync-up wlan-cmn.driver.lnx.1.0-dev branch to caf master version
of host-common driver that is exactly same as qcacld-3.0 driver
version 5.0.0.149

* origin/caf/caf-wlan/master: (294 commits)
  qcacld-3.0: Lower the log level for unhandled Action frame logs
  qcacld-3.0: Add disconnect to the head of sme pending command list
  Release 5.0.0.149 QCACLD3 WLAN Driver
  qcacld-3.0: Enable emergency reaping for wmi pipe.
  qcacld-3.0: add retry logic if htc_issue_packets fails
  qcacld-3.0: Ignore HTT_T2H_MSG_TYPE_MGMT_TX_COMPL_IND from FW
  qcacld-3.0: Do not reserve mgmt descriptors
  qcacld-3.0: Use appropriate list API
  qcacld-3.0: Remove per vdev tx descriptor pool
  qcacld-3.0: Enable enahnced flow control
  qcacld-3.0: Add support for telescopic PNO
  ...
  Release 5.0.0.140
  ...
  Initial readme for WLAN Host Driver for iHelium

Change-Id: I36e7222946f442159390bd78a65ee5dc6876b582
CRs-Fixed: 688141
2016-02-25 23:45:07 -08:00