Commit Graph

64 Commits

Author SHA1 Message Date
Shiva Sankar Gajula
8e829748d9 qcacmn: Handiling FT action frames in driver
STA is unable to do roam from one AP to another AP due
to not handiling FT action frames that are received from
the STA.
So, Added changes to handle FT action frames without
dropping the FT action frames in driver.

Change-Id: I6461fe84ffb29b33636b6831e6ed046fae22e19e
2019-10-05 05:40:28 -07:00
Rajeev Kumar Sirasanagandla
63b0f33c4c qcacmn: Use frequency for channel operation
As a part of 802.11ax amendment, 6GHz band operation is added.

Since the 6 GHz channel numbers are overlapping with existing 2.4GHz
and 5GHz channel numbers, use frequency to identify unique channel
operation instead of channel number. Channel frequency is unique across
bands.

As a part of above requirement, in the existing WMI interface handlers
and related functions, wherever missing, add frequency attributes to
identify unique channel operation.

Change-Id: I7c7542aa8488b4c55764c733590b77c64c397029
CRs-Fixed: 2517900
2019-09-18 11:23:14 -07:00
Alan Chen
7a0394d444 qcacmn: Move wakelock outside of spin lock
Wake lock acquire and release API is doing console logging, which has
side effects and hence move wake lock APIs outside spin lock.

Change-Id: Ib697c5fc1b1c44dbeafd94a72cb79e63640cb0d7
CRs-Fixed: 2521000
2019-09-11 17:27:50 -07:00
Akshay Kosigi
07df14c270 qcacmn: Move config files out of cmn dev
Move AP specific CONFIG files out of cmn dev

Change-Id: I53adb20ea910c0bc8842daa85cb762d4d3968e45
CRs-Fixed: 2506563
2019-08-19 02:10:57 -07:00
Akshay Kosigi
8fcd7c7f99 qcacmn: Clean up MGMT_DESC_POOL_MAX
Clean up MGMT_DESC_POOL_MAX and add the corresponding
macro values in umac cmn_services mgmt_txrx ap config file

Change-Id: I083a199e2cacf70738851426167c601ab793c29d
CRs-Fixed: 2496215
2019-08-05 10:56:02 -07:00
Tushnim Bhattacharyya
2b629e7661 qcacmn: Clean up CONFIG_MCL for MGMT_DESC_POOL_MAX
Clean up CONFIG_MCL and add MGMT_DESC_POOL_MAX in the
default_defconfig file.

Change-Id: Id22787b99363bb14f842a79fde60d3ce22480035
CRs-Fixed: 2495580
2019-08-05 10:55:58 -07:00
Rajeev Kumar
d9cede1908 qcacmn: Prevent runtime PM suspend for MGMT TX frames
Add a runtime PM wake lock for MGMT TX frames and prevent
runtime PM suspend if there are outstanding MGMT TX descriptors
in fw because fw may try to access host ddr when PCIe link is down
which can lead to system NOC errors.

Change-Id: I46b851b7babc8f0fe2c31f27892b0c7a3f255a17
CRs-Fixed: 2495612
2019-08-02 22:28:42 -07:00
Surya Prakash Raajen
75c5327b19 qcacmn: Reduce mgmt desc pool max size for lowmem
Reduce mgmt desc pool max size for lowmem

Change-Id: Idca644a14c656d04d34c031c4ca47d5d80b8b80e
CRs-Fixed: 2491773
2019-07-27 04:02:31 -07:00
sheenam monga
1b0ec2a8fe qcacmn: Add Support for ACTION_CATEGORY_FST
Currently, mgmt_txrx_get_action_frm_subtype does not handle
ACTION_CATEGORY_FST. In case action_category is
ACTION_CATEGORY_FST, mgmt_txrx_get_action_frm_subtype
returns MGMT_FRM_UNSPECIFIED due to default handling. Function
tgt_mgmt_txrx_rx_frame_handler returns QDF_STATUS_E_FAILURE
on receiving MGMT_FRM_UNSPECIFIED frame type and drops mgmt
frames.

Fix is to add support for ACTION_CATEGORY_FST in
mgmt_txrx_get_action_frm_subtype to avoid drop of FST mgmt
frames. Add new management frames
MGMT_ACTION_FST_SETUP_REQ, MGMT_ACTION_FST_SETUP_RSP,
MGMT_ACTION_FST_TEAR_DOWN, MGMT_ACTION_FST_ACK_REQ,
MGMT_ACTION_FST_ACK_RSP, MGMT_ACTION_FST_ON_CHANNEL_TUNNEL.
Add handling for ACTION_CATEGORY_FST in
mgmt_txrx_get_action_frm_subtype, Find fst frame subtype and
return fst frame subtype from mgmt_get_fst_action_subtype
instead of returning MGMT_FRM_UNSPECIFIED in case FST
action_category is received.

Change-Id: I67b7c14f03cab252b13b677a2c9f20a327be24bd
CRs-Fixed: 2495273
2019-07-25 20:12:10 -07:00
Abhishek Singh
6aa5f2907b qcacmn: Check for in_use flag before using the txrx desc pool
While accessing txrx desc pool, in_use flags is not used and thus
caller may end up using a txrx desc which is not in use. Also
all the params of txrx desc are not reinitialized once in_use flag
is set to false. This can lead invalid pointers used by caller.

So check for in_use flag before using the txrx desc pool, to avoid
use after in_use is set to false and reinitialized all params to
invalid values.

Also In wlan_mgmt_txrx_mgmt_frame_tx driver forcefully get the peer
ref count. It should use wlan_objmgr_peer_try_get_ref api to get
the peer ref, so that after logical delete the frames are not sent
for the peer.

Change-Id: Ie59e622c095750de8eabc49985b114ec6197be00
CRs-Fixed: 2459212
2019-05-29 11:08:15 -07:00
Tushnim Bhattacharyya
0055e67260 qcacmn: Remove logs from mgmt txrx functions
Remove the descriptor related frequent logs from mgmt txrx functions.

Change-Id: Iff372d4df9dc79285e87bf972a4c1baf5d74a87e
CRs-Fixed: 2432488
2019-04-18 02:33:33 -07:00
Srinivas Girigowda
2751b6d2b3 qcacmn: Consolidate multiple MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
Consolidate multiple (redundant) MAC_ADDR_LEN to QDF_MAC_ADDR_SIZE
CDP_MAC_ADDR_LEN
OL_TXRX_MAC_ADDR_LEN
DP_MAC_ADDR_LEN
HTT_MAC_ADDR_LEN
IEEE80211_ADDR_LEN
DEFRAG_IEEE80211_ADDR_LEN
ETHER_ADDR_LEN
HAL_MAC_ADDR_LEN
WLAN_MACADDR_LEN

CRs-Fixed: 2406591
Change-Id: I4a87f8ff556920c7b341bdbba99ec43c97b873f4
2019-03-28 16:50:32 -07:00
Madhvapathi Sriram
b73fc282d8 qcacmn: Remove error log for qdf_mem_malloc in umac files
qdf layer already has the error trace

Change-Id: I2ea22fe0e3e59b9d41ac21142615ffb96227abaf
CRs-Fixed: 2376418
2019-03-04 07:30:21 -08:00
gaurank kathpalia
c81b9a3b34 qcacmn: Filter out invalid BSSID from rx MGMT frame
Currently the driver accepts zero BSSID obtained from the
beacon/probe response and also allows to connect to them
by creating a peer, but since connection doesn't go
forward with the peer as BSSID is zero, the driver
deletes the peer, but since the BSSID is zero, the
host doesnt sends the peer delete to FW, which causes
a peer leak.

Fix is to filter out the beacons which has invalid BSSID,
and try to recreate the address from the addr2 which is
the FROM address in the MAC address. In case of AP the
BSSID and FROM address would be same, and hence BSSID
can be copied from the same.

Change-Id: I75842c2d80254aaffc31e689782be2eebc118466
CRs-Fixed: 2391346
2019-02-04 15:36:49 -08:00
Vivek
20209b5300 qcacmn: Move to next rx handler when nbuf clone fails
When calling registered mgmt rx handlers,
we iterate through all handlers,
and for each handler, clone the nbuf and if cloned successfully,
we call the corresponding handler.

In case of clone failure, we would simply continue, and not move to the
next rx handler, and would possibly attempt cloning for large number
of iterations. Instead, when clone fails,
we should move to the next rx handler

Change-Id: Ia752a2e7699f6fd92fe2a363a6ae19ca2e0cc5fe
CRs-Fixed: 2379751
2019-01-23 06:37:35 -08:00
Abhishek Singh
e88c0e8ffa qcacmn: Refactor the prints for rx management frames
Refactor the prints for rx management frames. Do not print beacon,
probe resp and probe req frames in txrx module.
Also remove the beacon print from wlan_cfg80211_inform_bss_frame.

Change-Id: I1dbfcec1614b9465d97c010fa4c386f3a1612f5f
CRs-Fixed: 2381796
2019-01-17 10:49:15 -08:00
Abhishek Singh
5f9e815870 qcacmn: Avoid looping twice to find peers for beacon frames
Driver first try to find peer for beacon frames with addr2,
and if no peer is found it loop through peer list 2nd time
for addr1. For beacon addr1 is broadcast address and thus
peer will never be found with broadcast address.

Thus use addr1 to find peer only if addr1 is not broadcast
address.

Change-Id: I7e5c221ec7f93f878981f4eafb69935aafd64174
CRs-Fixed: 2373793
2019-01-03 09:04:27 -08:00
Wu Gao
49bd1b5fa5 qcacmn: Check mgmt txrx desc element status before put to free list
To avoid double add to free list, check mgmt txrx desc element status
firstly.

Change-Id: Ib8f6f719016e19a76cc4fd1007800abf59ebf872
CRs-Fixed: 2348587
2018-12-25 05:21:07 -08:00
Yeshwanth Sriram Guntuka
c4a14ea149 qcacmn: Add host support for db2dbm RSSI changes
Add host support for db2dbm RSSI changes. Firmware
indicates this capability when underlying hardware
has RSSI reporting feature. Based on this capability
host will know if firmware sends SNR or RSSI. If no
capablity is present then host will convert SNR to
rssi using a fixed offset of -96. If capability is
present host will directly use the rssi as it is.

Change-Id: I9058f16c6280d466feb96cf88a8a0d8cd7b02032
CRs-Fixed: 2364025
2018-12-24 03:33:04 -08:00
gaurank kathpalia
0f9f019505 qcacmn: Fix memory allocation latency in beacon process
Currently if the number of APs in the STA environment
are many, then the STA will receive many beacons, whose
beacon process path can take long time, in the kernel
work queue, hence the other processes have to wait
for them to complete, and may get timeout, if the
the time to process the beaocns is larger than their
process timeout.

Fix is to :-
1. Add rate limit to failure conditions of memory
not allocated
2. Make memory allocation in path of beacon process
atomic.

Change-Id: I0b15fd4924bb7d696a33adeb1875f1f9c277db18
CRs-Fixed: 2360624
2018-12-07 13:04:33 -08:00
Vivek
068d14f8e1 qcacmn: Validate qdf_nbuf_clone return before calling mgmt rx cb
For more than one registered mgmt rx callbacks, we clone the
mgmt rx buf and call each rx handler. We need to check the return
type of qdf_nbuf_clone before we call the regsitered handlers.

Change-Id: Ic8513fc51954fb88c80ae6822e0fa45e34bcf12c
CRs-Fixed: 2322631
2018-10-04 03:37:06 -07:00
Amar Singhal
49ba607741 qcacmn: Rate limit the mgmt frame error messages
Management frame error messages can occur quite frequently.
Therefore rate limit them.

Change-Id: I9caa71031e41f3aca2d2bed787c4f5b72d516ded
CRs-Fixed: 2326294
2018-10-04 03:37:03 -07:00
Harprit Chhabada
ff17327ad5 qcacmn: Add bound check for desc_id
Add bound check for desc_id in tgt_mgmt_txrx_tx_completion_handler()
to check OOB issue.

Change-Id: Ib28852a1c1ccf06af14004bf4001ce0938391f3d
CRs-Fixed: 2318632
2018-10-01 18:38:25 -07:00
Harprit Chhabada
2a719dc230 qcacmn: Add bound check
Add bound check for desc_id in tgt_mgmt_txrx_get_vdev_id_from_desc_id
and tgt_mgmt_txrx_get_nbuf_from_desc_id

Change-Id: Ie27c473061fb68f1d3486cbfe95c015be77203f9
CRs-Fixed: 2304610
2018-09-13 13:20:49 -07:00
Sravan Kumar Kairam
516330bf2e qcacmn: Unmap nbuf of pending mgmt frames
As part of wlan_mgmt_txrx_pdev_close only nbuf is freed
in case of cleanup path due to SSR or drive unload and
dma unmap is not done.

In this change:
1) Register a callback to mgmt_txrx component tx ops which
   does dma unmap of nbuf as part of pdev close.
2) Revert change id I6a7f5efa665a1da009e594248e88002df35ae9ff
   as there are potential race conditions using the APIs added
   as part of the change.

Change-Id: Id65388a5f4fcb989659bb2088a5e67a4e4e3d265
CRs-Fixed: 2313073
2018-09-12 08:50:20 -07:00
Sravan Kumar Kairam
b7b7b36900 qcacmn: Add mgmt_txrx api to drain packets specific to peer
At peer deletion corresponding mgmt packets needs to be cleaned up.
So add mgmt_txrx api to drain all the mgmt packets specific to a peer.

Change-Id: I6a7f5efa665a1da009e594248e88002df35ae9ff
CRs-Fixed: 2299964
2018-09-05 22:15:10 -07:00
Nirav Shah
1b9674e21e qcacmn: umac: Add logging macros without function/line info
Add per module logging macros without function/line info
to avoid adding function/line info where it is not required.

Change-Id: I34ba6f6485f9b506264daf4e116052d2858bed40
CRs-Fixed: 2278876
2018-08-14 21:44:21 -07:00
Rajeev Kumar
8ae6415cba qcacmn: Fix excessive logging from mgmt txrx component
Change mgmt txrx component per rx frame logging to debug
log level to avoid spamming kernel log buffer.

Change-Id: Ib84c789edc8a45d508278728b0cc82f8382f0377
CRs-Fixed: 2282051
2018-07-20 16:24:05 -07:00
Nirav Shah
a175314c51 qcacmn: Map all module logs to per-level log APIs
Map all module level log APIs to per-level log APIs
to compile out specific log level if required.

Change-Id: I4072b6740cb43200fd95c40943b66e1d5f8f1847
CRs-Fixed: 2266719
2018-07-13 10:36:22 -07:00
Jeff Johnson
090ee9206c qcacmn: umac: Fix misspellings
Address the following issues in the umac folder:
CHECK: 'defintions' may be misspelled - perhaps 'definitions'?
CHECK: 'destory' may be misspelled - perhaps 'destroy'?
CHECK: 'faild' may be misspelled - perhaps 'failed'?
CHECK: 'initilization' may be misspelled - perhaps 'initialization'?
CHECK: 'managment' may be misspelled - perhaps 'management'?
CHECK: 'muticast' may be misspelled - perhaps 'multicast'?
CHECK: 'ouput' may be misspelled - perhaps 'output'?
CHECK: 'segement' may be misspelled - perhaps 'segment'?
CHECK: 'successfull' may be misspelled - perhaps 'successful'?
CHECK: 'untill' may be misspelled - perhaps 'until'?

Change-Id: If60c276c134ef10ce6be26cd5a4036d53d5724b6
CRs-Fixed: 2241586
2018-05-19 19:40:48 -07:00
Amir Patel
d338594cf9 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
Disha Das
9d600faa11 qcacmn: Check EXT_IV bit for PMF frames only
Non PMF frames are being dropped due to incorrect buffer
length check. Modifying the check only for PMF cases

Change-Id: Iead56b199de6c14b3a569a4f1a537553e9325bc8
2018-04-16 15:16:26 -07:00
Santosh Anbu
0a580a3840 qcacmn: Set mpdu data_ptr only for the right buffer length
Handle mpdu data pointer for PMF frames based on EXT IV bit only
if the buffer length requirement is met

Change-Id: I0243105846b1cffc43b87cdcb84c265b216e2e5a
CRs-Fixed: 2202912
2018-03-14 08:27:09 -07:00
Vinay Adella
af08a97d27 qcacmn: Add support for vdev level mgmt drain
Change the pdev mgmt drain to vdev mgmt drain.
The pdev drain function drains packets of all vdevs, which causes
an issue with backlog queues maintained for each vdev.
vdev level drain will help to support per-vdev queues that are
maintained out side the qcacmn module.

Change-Id: I78c58e8e12299eb7754f171f2c70291068871b03
CRs-Fixed: 2197254
2018-03-12 22:00:48 -07:00
Will Huang
3beed81ef5 qcacmn: Use WLAN_MGMT_NB_ID as dbgid when TX release peer reference
Peer reference is using dbgid WLAN_MGMT_NB_ID for TX and
WLAN_MGMT_SB_ID for RX, correct two functions related with TX with
dbgid WLAN_MGMT_NB_ID.

Change-Id: Icc15c06c00df0fb58c848a134e1b60c6c5e623fd
CRs-Fixed: 2196496
2018-02-28 00:31:32 -08:00
gaurank kathpalia
26f9833fb8 qcacmn: Send per chain rssi to upper layer
Add support to send the per chain rssi to upper layer
for each beacon and probe responses.

Change-Id: Ife6cb9e8e65591baf485c54a985f84d842400321
CRs-Fixed: 2177638
2018-02-27 01:57:52 -08:00
Disha Das
19fa32351f qcacmn: Set mpdu data ptr correctly
Handle mpdu data pointer for PMF frames based on EXT IV bit

Change-Id: I7c1b585a538402ae784985852c873537c0e4eb86
2018-02-27 00:29:33 -08:00
Vinay Adella
b99ecba783 qcacmn: Add support for more WNM subtype frames
Parse WNM action frames like TFS, FMS, TIM, WNM-SLEEP
so that they are not dropped as unspecified frame type.

CRs-Fixed: 2188942
Change-Id: Id3add53eb18b37a394d8387f7d32e9efd34671a9
2018-02-26 08:34:36 -08:00
Vivek
5b3912a049 qcacmn: Move mgmt descriptors per pdev for probe response throttling
In the current code, mgmt tx rx descriptors nubfs per pdev,
which are in use when driver is unloaded,
are tried to be freed in dispatcher_psoc_disable,
by iterating through the pdevs which ideally should not be available.

And in ideal conditions, there are no pdevs during psoc_disable,
there was no attempt to free the nbuf
of pdevs mgmt tx rx descriptors in use,
which could have resulted in leaks but no assert.

In some cases, by the time dispatcher_psoc_disable was called,
and pdev count was non zero, we were seeing some issue accessing
the pdev or pdev mgmt tx rx context and it was causing assert.

The mgmt tx rx descriptors nubfs
which are in use when the driver is unloaded,
should be freed in dispcatcher pdev close and
not in dispatcher psoc close.

Change-Id: Ia6ac0b2ceeb017221153dab92bf014481eca2a5b
CR's Fixed: 2187890
2018-02-22 07:26:01 -08:00
Vinay Adella
1de7baec7e qcacmn: Adding support to drain mgmt frames
FW recovery path needs this function as mgmt Tx
completions are not expected from the FW.

CRs-Fixed: 2178618
Change-Id: I7dddbff544dcce4dd9fe95ab79fb891bbd11b4ab
2018-02-20 08:00:50 -08:00
Srinivas Pitla
72bbf17531 qcacmn: Use correct ref id for mgmt transmit
Fix to correct ref id usage in transmit.

Change-Id: I85d5031e3ed14a137980a828f18512d91fde5548
CRs-Fixed: 2177109
2018-02-09 07:45:45 -08:00
Liangwei Dong
bc685e88f1 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
Kiran Venkatappa
83298473ca qcacmn: Change max mgmt descriptor pool size to 512 for AP
Increase descriptors to 512 for AP platforms which needs to support 16
vaps.

Change-Id: I102599803d151986e48f00643274399db34a594f
CRs-Fixed: 2170778
2018-02-06 09:43:48 -08:00
Subrat Mishra
bf12587bd1 qcacmn: Support for SWFDA Event & FD Frame tx
Add new WMI EVENT, SW FILS Discovery Alert Event, to get
firmware trigger to transmit FILS Discovery Frames.
Add WMI command to send FD frame buffer to firwmare.
Add WMI command to set FD period interval in mili seconds.

Change-Id: I8cb6279ec4431b9236bd32c548228a0dc6598664
CRs-Fixed: 2118098
2018-01-19 17:26:23 -08:00
Vivek
ccd320ac7d qcacmn: Change max mgmt descriptor pool size to 64
With no queueing support in the host driver for mgmt
frames and the target  not supporting more than 64 mgmt
frames at any given time, the max number of mgmt descriptor
pools should be changes to 64

Change-Id: Ic6bb0d6a01867ba7fb0197d4cd6e406cd74d39fc
CRs-Fixed: 2146177
2018-01-10 22:41:04 -08:00
Vivek
5747b78091 qcacmn: Move mgmt descriptors per pdev for probe response throttling
Mgmt tx rx descriptors are now used instead of WMI descriptors
for management Tx/Rx.
Since WMI descriptors were per radio to support probe response throttling
the mgmt descriptors should also be moved from per psoc to per pdev.

The reason for this is probe response throttling should happen per radio
and not per psoc since if the mgmt frames peding counter is
maintained per psoc, it could affect other radios of the same psoc also.

The maximum number of mgmt descriptors per psoc was 50.
This is also changed to 512 mgmt descriptors per pdev which is the
same as WMI descriptors per radio as used earlier to support
probe response throttling.

Change-Id: Ibb46082e0acf340800418a7e9689a29cd688bdab
CRs-Fixed: 2146177
2018-01-08 09:39:20 -08:00
Vignesh Viswanathan
8e21276038 qcacmn: Allow GAS public action frames to be received and forwarded to LIM
Add changes to MGMT TxRx service to allow GAS public action frames to
be forwarded to LIM for further processing.

Change-Id: Ie48e501a028c1b64b68debfc44757e2656048dcf
CRs-Fixed: 2161789
2018-01-04 03:39:00 -08:00
Himanshu Agarwal
2afd447999 qcacmn: Free netbuf and release peer ref at driver unload time
Free netbuf and release peer ref for tx frames for which tx completions
are not received from fw during driver unload time in
wlan_mgmt_txrx_psoc_close().

Change-Id: I8d5fb2e79f14a978473ab3754d9e495eb09eddaa
CRs-Fixed: 2122505
2017-10-26 01:40:13 -07:00
Santosh Anbu
1fae3c8f03 qcacmn: Remove qdf_nbuf_free for NULL buf
qdf_nbuf_free was invoked even if buf is NULL
Remove qdf_nbuf_free

Change-Id: Ibb77d073501b320d27ff5c42cc9d86e27863585d
CRs-Fixed: 2120169
2017-10-16 01:56:40 -07:00
Jeff Johnson
878533e29b 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