Commit graph

7056 Commits

Autor SHA1 Nachricht Datum
Sravan Kumar Kairam
87796c495a qcacmn: Clean up CONFIG_MCL from qdf_lock.c
Clean up CONFIG_MCL from qdf_lock.c file by replacing with
feature flag FEATURE_RUNTIME_PM for which included header
files are used.

Change-Id: I9afff730b1b96a75888ca48b33c0020667d651fc
CRs-Fixed: 2477462
2019-06-27 05:00:16 -07:00
Vevek Venkatesan
33ba728fae qcacmn: CONFIG_MCL cleanup in DP layer
CONFIG_MCL cleanup in DP layer.

Change-Id: Icc9947aac290496b3d1bb708639b392815b82070
CRs-Fixed: 2467193
2019-06-27 05:00:13 -07:00
Vivek
900c617e38 qcacmn: Remove CONFIG_WIN from QDF sources
The qdf nbuf cb has members defined as union
which would be used separately either for WIN or MCL.
There are separate header files defined for having
different accessor functions for WIN or MCL.

The inclusion of the header file is differentiated
based on CONFIG_WIN which should be removed.

Use a different macro instead of CONFIG_WIN.

Change-Id: I6709fde22a0458ec184b9a0cba832b848fd2a8fa
CRs-Fixed: 2472886
2019-06-27 03:24:17 -07:00
Vinay Adella
5c1b7881a1 qcacmn: Handle decrypt error packets for invalid peers
Packets from STAs that are not associated are sometimes indicated
as Decrypt error.
Process these packets by sending a unicast Deauth packet to them.
This is also required to trigger unicast Deauth, if the STA
ignores broadcast Deauth and later send packets to AP in Deauthed
state

Change-Id: I6ebf848d4b9409931ae1750b5ff0617839b04105
2019-06-27 00:04:32 -07:00
gaurank kathpalia
5121951db6 qcacmn: Fix the dfs apply rule logic to filter acs channel list
Currently the driver uses i both in outer and inner loop
which would corrupt the value of i and the loop would
never end.

Fix is to use another varibale j for the loop.

Change-Id: I6f64fb45d1007621b03fe93cd29da7d4c827a23f
CRs-Fixed: 2476402
2019-06-26 20:59:42 -07:00
Ashish Kumar Dhanotiya
5255c99b43 qcacmn: Complete stats request on receiving last event
When driver requests for stats to FW, FW sends response with
all the requested stats, in this case if the FW buffer gets
filled it sends the remaining stats in next event and FW keeps
sending the stats event until it sends all the requested stats.
FW sets is_last_event field in the response event if the event
is the last event for the requested stats.
Currently driver is parsing only first event and completing the
request from all these events and not checking the last event
bit when it requests for peer stats because of which some of the
stats are getting dropped.

To avoid above issue, add a logic to check the last event bit set
by FW and complete the request only if FW sets the last event bit
in the response event.

Change-Id: Ia3a2f2b4960579ac67bbf1354755af9c2098975a
CRs-Fixed: 2470910
2019-06-25 13:07:05 -07:00
Chaithanya Garrepalli
1a39da4d04 qcacmn: do not send AST update until peer map is received
For newly created AST entry do not send AST update until
we get the MAP event for create

Change-Id: I840ef62825d4537439a4020a8a5a5547b575a664
CRs-fixed: 2468833
2019-06-25 13:07:02 -07:00
gaurank kathpalia
09e867fb99 qcacmn: Allow simultaneous scans for Hostapd scan
Currently the drivers blocks every simultaneous scan
that comes to the driver, and returns BUSY.
here if the STA SCAN which is low priority after connection
comes, and at the same time ACS has completed and the hostapd
tries to do a HT scan, it would get error as BUSY, and it
will try to scan again and again until successful or the timeout
happens. This will in turn delay the hotspot bringup as start
ap does not come until the hostapd does a OBSS scan.

Fix is to skip the check of simultaneous scan for SAP, and make
the priority of scan request high for SAP scan.

Change-Id: I163dbb2fdca1245742cca049de47478117197412
CRs-Fixed: 2471897
2019-06-25 13:06:58 -07:00
Venkata Sharath Chandra Manchala
d8b05b54d7 qcacmn: Add support to log CE DST and STATUS ring events
1. Record hp/tp for ce dst and status ring to keep
   a track of the last reaped and posted buffers.
2. Add union ce_srng_desc to record ce srng descriptor
   information.

Change-Id: I6f4728893d629c60f676826bf806b725326fb83d
CRs-Fixed: 2465492
2019-06-25 13:06:54 -07:00
Venkata Sharath Chandra Manchala
ff4d3f79f1 qcacmn: Validate pktlog handle
Add a NULL check to validate pktlog handle
before dereferencing it.

Change-Id: I3ea56b60460c5c2cfae0fff97f0721068156cf4a
CRs-Fixed: 2468506
2019-06-25 13:06:51 -07:00
sheenam monga
0c6cd801dc qcacmn: Fix OOB in send_gtk_offload_cmd_tlv
In current design, Host driver copies kck and kek from pmo_gtk_req
to kck and kek of WMI_GTK_OFFLOAD_CMD_fixed_param. Host tries
to copy PMO_KCK_LEN i.e 32 bytes to an array of length 16 bytes
which can lead to OOB.

Fix is to copy only 16 bytes of kck and kek. Copy the bytes
from pmo_gtk_req same as the size of cmd->kck and cmd->kek i.e
destination array size to avoid OOB.

Change-Id: I999add18e18bedc9cfa1a0cfa5c0dad781e8e13f
CRs-Fixed: 2470368
2019-06-25 13:06:48 -07:00
Venkata Sharath Chandra Manchala
a6c047026d qcacmn: Add Null check to handle send_delba
Add a null check to avoid dereferencing send_delba
for QCA6390

Change-Id: If44b1ee4ed15918e27578f5bc98b0531d9b7cb29
CRs-Fixed: 2475880
2019-06-25 13:06:44 -07:00
Akshay Kosigi
af98d7cbbe qcacmn: CONFIG_WIN Macros to be moved out of HIF/HTC
Remove CONFIG_WIN from HIF and HTC module

Change-Id: If5001a16047f802b077e6cd9b211a912df5ca55e
CRs-Fixed: 2349905
2019-06-24 15:44:32 -07:00
Nirav Shah
03c409d4a2 qcacmn: Add error handling in case of hif_send_head failure
In case of SDIO/USB TX bundling if there is hif_send_head failure
packets are not added back to Endpoint tx queue and resulting in
packet drop.

Add packet back to tx queue if hif_send_head send failure
for bundled packet.

Change-Id: Id613a414f0caa71a33c79186ae726550cb710c4a
CRs-Fixed: 2468882
2019-06-24 14:26:27 -07:00
Naga
f69b80a563 qcacmn: Add support for target_if timer restart
Add support for target_if timer restart when
vdev mgmt ops request is queued though the intended
response corresponding to request is not yet received.

Change-Id: I08e474ac66a0c399a93ffbc4a24aab78084072d2
CRs-Fixed: 2463180
2019-06-21 13:40:24 -07:00
Saket Jha
78976eaa91 qcacmn: Release lock in dp_reset_monitor_mode
Release mon_lock in dp_reset_monitor_mode function before returning
if status is not successful.

Change-Id: I321cd55225ed3cc5e5b4a752fb10604d05fb9a56
CRs-Fixed: 2462725
2019-06-21 13:40:21 -07:00
Sourav Mohapatra
9301751243 qcacmn: Do not assert for ref leak if SSR/PDR is ongoing
The driver uses a timer to check if there is a potential ref leak by
inducing assert if a given module does not release ref even when the
object is in L-state. But in case there is SSR/PDR, it might take more
time to clean up/release the refs. In this case, no assert should be
triggered.

Add a check in wlan_objmgr_iterate_log_del_obj_handler before calling
the assert API.

Change-Id: Ifb7568e11bff2b9fc610633af730461e33dc5539
CRs-Fixed: 2468301
2019-06-21 10:20:32 -07:00
Krishna Rao
ee93de85f3 qcacmn: Add enum for baseline radio channel width
Add enum for baseline radio level channel width. This is required for
some low level use cases which need the original width configured into
the radio when channel is configured, rather than per-VDEV protocol
level width which might vary.

Change-Id: I8215003774bc46403a038011e7581517d25b94f9
CRs-Fixed: 2474794
2019-06-21 08:12:07 -07:00
Saket Jha
c73413881e qcacmn: Correct input type for qdf_mem_zero
In dp_ipa_setup function, the function qdf_mem_zero is called
and should receive a pointer instead of address to a pointer for tx
and rx when they are called. These pointers are also initialized to
NULL when declared locally.

Change-Id: Iec9c76c63cc2ec00bdfb54497cca2f22fabff045
CRs-Fixed: 2469428
2019-06-21 08:12:04 -07:00
Ajit Pal Singh
a1378a3d27 qcacmn: usb: Add support for QCN7605 v2
Add device IDs for QCN7605v2 USB variant.

Change-Id: I5d9d2731068c0d31b78197f3732fb253bf440ea2
CRs-Fixed: 2474407
2019-06-21 08:12:01 -07:00
Saket Jha
43a7ab4549 qcacmn: check if peer pointer is NULL
In dp_rx_process function, check if peer pointer is NULL
before using as argument when calling dp_rx_deliver_to_stack.

Change-Id: I6584c79047a809f28e65faad47d1c7220e7057bb
CRs-Fixed: 2470345
2019-06-21 05:47:59 -07:00
Ashish Kumar Dhanotiya
709f9fb68f qcacmn: Update feature flag for qdf_trace macros
Currently qdf_print, qdf_alert, qdf_err, qdf_warn,
qdf_info, qdf_debug, qdf_nofl_print, qdf_nofl_alert,
qdf_nofl_err, qdf_nofl_warn, qdf_nofl_info, qdf_nofl_debug
macros are defined under CONFIG_MCL feature flag since
these trace prints are supposed to be used only for QDF
module with module ID as QDF_MODULE_ID_QDF, WIN is using
these definitions with module ID as QDF_MODULE_ID_ANY and
these are separated with feature flag CONFIG_MCL.
As a part of cleanup activity of CONFIG_MCL feature flag
move these WIN specific trace definitions under WIN
specific feature flag QDF_TRACE_PRINT_ENABLE.

Change-Id: I838f76f2e3f4c2dd28f0463fa6c9d981304b136e
CRs-Fixed: 2472021
2019-06-21 05:47:56 -07:00
Ashish Kumar Dhanotiya
b452a6844c qcacmn: Move NBUFF related declarations under correct feature flag
Currently NBUFF related parameters are declared under CONFIG_MCL
feature flag and are getting used under
FEATURE_NBUFF_REPLENISH_TIMER feature flag.

As part of CONFIG_MCL cleanup, move NBUFF related parameters
under correct feature flag FEATURE_NBUFF_REPLENISH_TIMER.

Change-Id: I438f7dbc0c67343c94ad78ea4df4cfb1fd2f051b
CRs-Fixed: 2472011
2019-06-21 04:27:20 -07:00
Vevek Venkatesan
de31ff656d qcacmn: add feature flags to featurize DP operations
Add feature flags DP_FLOW_CTL for DP flowctl ops,
DP_PEER_SUPPORT_OPS to support peer handling in DP,
DP_POWER_SAVE for power saving ops in DP, DP_CON_MON DP_MOB_DEFS
DP_INVALID_PEER_ASSERT DP_PRINT_NO_CONSOLE and DP_INTR_POLL_BOTH.

Change-Id: I01dafadf6578c0b5f36ab3ef56624912fb66b100
CRs-Fixed: 2467170
2019-06-21 03:09:23 -07:00
Edayilliam Jayadev
cd6f190963 qcacmn: Make RX path changes for Agile Spectral
Change Spectral report processing logic to handle
Agile Spectral reports. 160 MHz state machine is not
affected by Agile Spectral reports.

CRs-Fixed: 2458359
Change-Id: Iead6427f57edddd61f7d64a961cc6d936d54ab9e
2019-06-21 03:09:19 -07:00
Ashok Kumar
cff882eb52 qcacmn: Add support for FT SUITEB
Added support for FT suiteB

Change-Id: I54e89afaecbe0ecabb028de6963b55441b5a369e
CRs-Fixed: 2468754
2019-06-20 23:29:41 -07:00
Linux Build Service Account
f4cce15368 Merge "qcacmn: Reduce log level for stats message" 2019-06-20 20:35:06 -07:00
Tushnim Bhattacharyya
3f953f7193 qcacmn: Reduce log level for stats message
Reduce log level in tgt_mc_cp_stats_process_stats_event,
tgt_mc_cp_stats_update_peer_adv_stats &
tgt_mc_cp_stats_extract_peer_stats from error to debug because
a stats event can be received unsolicited.

Change-Id: I5ad216034eefd8197f80c2a50e8ae0833b149d06
CRs-Fixed: 2471465
2019-06-20 20:15:24 -07:00
Venkata Sharath Chandra Manchala
cb6d0c0741 qcacmn: Create a wlan configuration table for ring types
1. Add config table to accommodate per ring type
   configuration to have a finer control over the
   ring.
2. Provide struct wlan_srng_cfg interface to add
   more parameters to control the ring.
3. Add interrupt threshold configuration parameters
   to wlan_srng_cfg structure.
4. Add WLAN_CFG_INT_TIMER_THRESHOLD_WBM_RELEASE_RING
   and WLAN_CFG_INT_TIMER_THRESHOLD_REO_RING to have
   different timer values for REO and WBM ring.

Change-Id: Ied50e3241ab2cc181ca4ed7f126959cd5d9d2de5
CRs-Fixed: 2455297
2019-06-20 18:36:24 -07:00
Linux Build Service Account
716533f3f8 Merge "qcacmn: Remove CONFIG_WIN flag for VoW stats" 2019-06-20 18:05:39 -07:00
Gerrit - the friendly Code Review server
0a89605c2c Merge changes into wlan-cmn.driver.lnx.2.0 2019-06-20 17:37:14 -07:00
Mainak Sen
95101bb281 qcacmn: Remove CONFIG_WIN flag for VoW stats
Use V3_STATS_ENABLED flag instead of CONFIG_WIN

Change-Id: I1559d67f005c4cba2472970ea3bd49826c16a047
2019-06-20 14:45:24 -07:00
Pragaspathi Thilagaraj
e42985f86e qcacmn: Fix possible OOB in send_roam_scan_offload_mode_cmd_tlv
In send_roam_scan_offload_mode_cmd_tlv, psk_msk from incoming
roam request buffer is copied to destination roam_offload_11i->pmk.
The psk_msk is of size 48 bytes, while destination pmk is of 32
bytes. This could result in OOB.

Copy only 32 bytes for 11i pmk as 802.1x doesn't have PMK size
greater than 32. In future, if Suite-B roaming support is
required, interface changes are need to add new parameter to
copy the remaining 16 bytes.

Change-Id: I303fc15fc0f0169a049d0542674bd7add3cbb1a1
CRs-Fixed: 2470353
2019-06-20 12:00:03 -07:00
Akshay Kosigi
dc8e095f30 qcacmn: Fix for removal of common_wmi_handle
Add changes to remove usage of common_wmi_handle
Instead use wmi_unified_t as opaque pointer

Change-Id: I85ae8581ce8e4f7fd02fb753e3f482f8a6edebac
2019-06-20 12:00:00 -07:00
gaurank kathpalia
59b6bee259 qcacmn: Allow DBS scan if enabled in ini
Currently the driver checks that DBS for connection
is allowed or not, and on that basis rejects the scan,
but it may happen that FW supports DBS, and DBS for
scan is enabled in the ini, but the DBS for connection
is disabled.
In that case the diver opts for non-dbs scan.

Fix is to allow DBS scan in case of DBS scan enabled in ini.

Change-Id: I080ba4e581a7f77e84a4364237621429bcf91710
CRs-Fixed: 2474580
2019-06-20 11:59:57 -07:00
Vevek Venkatesan
02c9164668 qcacmn: featurize PKTLOG send cmd under feature flag in WMI layer
Featurize PKTLOG cmd handle under feature flag FEATURE_PKTLOG
as part of CONFIG_MCL cleanup.

Change-Id: Iae8c7e7caad001d7d37a8e17c1eb892f96009066
CRs-Fixed: 2467198
2019-06-20 08:45:46 -07:00
Vevek Venkatesan
735d9fedfc qcacmn: CONFIG_MCL cleanup in HAL layer
CONFIG_MCL cleanup in cmn driver HAL layer.

Change-Id: I1fa4657a8ffa87d571157e635ecedf8e8af0bf07
CRs-Fixed: 2467203
2019-06-20 08:45:43 -07:00
Ashish Kumar Dhanotiya
bf9d06fab1 qcacmn: Use vzalloc instead of vmalloc
Currently driver is using vmalloc to allocate the memory
inside dbglog_block_read api and this buffer is copied to
userspace buffer which may lead to use of uninitialized
buffer.

To avoid above issue use vzalloc to allocated the buffer
which initializes the memory to zero.

Change-Id: Iebc530b000c908231ef8718e79054801d294dd8f
CRs-Fixed: 2470385
2019-06-19 10:33:09 -07:00
Jinwei Chen
e1ffcf089e qcacmn: fix monitor packets radiotap channel incorrect issue
The channel number is always 0 from HAL RX PPDU TLV, then monitor
mode frames radiotap channel frequency is always 2407, get the
correct channel number that we saved when set monitor channel.

Change-Id: Ib927fe9aca3a4c1f98845fe37c9b1d37d1d6cf5a
CRs-Fixed: 2471161
2019-06-19 10:33:06 -07:00
Ashish Kumar Dhanotiya
4600ab56ad qcacmn: Remove multiple definitions of __qdf_nbuf_free api
There are multiple definitions of __qdf_nbuf_free api based
on CONFIG_MCL feature flag.
As a part of cleanup activity remove multiple definitions
of __qdf_nbuf_free api.

Change-Id: Ib7fce54353561a45a4662c05d56d3af187a269e1
CRs-Fixed: 2472016
2019-06-19 00:42:45 -07:00
hangtian
04f0ad4935 qcacmn: Set stop_th and start_th for QCA_LL_PDEV_TX_FLOW_CONTROL
Use same stop_th and start_th as QCA_LL_TX_FLOW_CONTROL_V2 for
QCA_LL_PDEV_TX_FLOW_CONTROL which allows pausing/unpausing
netif queues to avoid frame drop in driver.

Change-Id: Ifa649e31a41d1bf89eadc8cc7e9520f0e27b9fe4
CRs-Fixed: 2466999
2019-06-18 22:27:45 -07:00
Ashish Kumar Dhanotiya
f8ddbe1707 qcacmn: Remove unused QDF_DEFAULT_TRACE_LEVEL macro
QDF_DEFAULT_TRACE_LEVEL macro is not getting used in case of
MCL, as part of cleanup of CONFIG_MCL macro dependency,
move this macro definition to correct WIN specific
feature flag.

Change-Id: I75cbfd856308f0027ecb805a41c15966528f314e
CRs-Fixed: 2468286
2019-06-18 22:27:42 -07:00
Vivek
030ffadb08 qcacmn: Free srng buffer only when allocation is successful
In srng setup, we set srng alloc size, and allocate memory
for srng buffers.
Even if allocation fails, srng alloc size is set,
which is done even before the allocation is attempted.

In srng clean up path, we attempt to free the memory,
since srng alloc size is set,
but for which allocation had failed,

Instead, when freeing srng buffers, check if we have
a valid address also for srng buffer and then free,
instead of checking srng alloc size only.

Change-Id: I1f2de526e27b7b8d97535bf4c2235c82ffd3ce5f
CRs-Fixed: 2452219
2019-06-18 12:25:57 -07:00
Varun Reddy Yeturu
f31e44d8dc qcacmn: Fix memory allocation failure for nbuf pointers
Fix memory allocation failure for nbuf pointers array in
dp_pdev_rx_buffers_attach(), by allocating a single page
of memory for the pointers and re-using them by iterating
in a loop until the total required nbuf's are traversed,
instead of allocating a huge contiguous memory for pointers
to store the address locations of all the nbuf's.

Change-Id: I47ca8f94405e44d6bdbc43129012df1b65b14ba6
CRs-Fixed: 2464598
2019-06-18 12:25:53 -07:00
Tallapragada Kalyan
ae7baa998f qcacmn: disable cached descriptor support if NSS is enabled
disable cached descriptor support if NSS is enabled

Change-Id: If0eee42dc07947944e39ef6d98de271ce79419ac
2019-06-17 18:24:34 -07:00
tinlin
6aa719f513 qcacmn: Correct state in reg_populate_band_channels
Regulatory channel state is mistaken as chan_flags.
Set regulatory channel state to CHANNEL_STATE_DISABLE.

Change-Id: I72dd40bb3a7690e0156f72008ad29d209e93ce29
CRs-Fixed: 2461403
2019-06-17 13:00:57 -07:00
Jeff Johnson
23e26381c0 qcacmn: Rename OSIF logging macros
The current OSIF logging macros use a "cfg80211" prefix. This is
confusing because that prefix should only be used by the Linux
cfg80211 module. To avoid confusion rename the macros to use an
"osif" prefix.

Change-Id: Id3273498f623d04beec879aa9d77c1d33986357a
CRs-Fixed: 2469485
2019-06-17 13:00:54 -07:00
sheenam monga
d897403241 qcacmn: Fix null scan object dereference in ucfg
Currently, ucfg_scan_register_pno_cb and ucfg_scan_get_scan_id
do not do null validation for scan object which can lead to null
pointer dereference. wlan_psoc_get_scan_obj_fl returns null in case
of invalid component id or null psoc and that null scan object is
dereferenced due to missing null validation.

Add null pointer check for scan object in ucfg_scan_register_pno_cb
and ucfg_scan_get_scan_id. Return zero scan id from ucfg_scan_get_scan_id
in case of null scan object.

Change-Id: I1aa1bdee001cace34e22ca11014455a0c7bcc462
CRs-Fixed: 2468518
2019-06-17 13:00:51 -07:00
sandeep puligilla
370e41c760 qcacmn: Create vdev rsp wakelock api in target if
Currently, wakelock apis are in wma. Create vdev resp wakelock apis
in target_if. Plan is to remove it latter from wma.

Change-Id: Ib410ee2404751544db2f291b466ff0d6ff248e8f
CRs-Fixed: 2441245
2019-06-17 11:45:04 -07:00
Rakesh Pillai
2529ae1c8a qcacmn: Add event history logs for datapath
Add support to log the important events in
datapath, which will help in debugging the
datapath issues.

IRQ handler, Napi poll and srng access start/end
are the events which are currently logged.

CRs-Fixed: 2457854
Change-Id: Iba105b0e79443b670a01a929f999f94e00ea92f2
2019-06-17 10:23:01 -07:00