Commit Graph

9534 Commits

Author SHA1 Message Date
Harsh Kumar Bijlani
0ee6465661 qcacmn: Add check for mem debug disabled in qdf_frag_debug_update_addr
Check for is_initial_mem_debug_disabled is missing in API
qdf_frag_debug_update_addr API. Add check for is_initial_mem_debug_disabled
so as to return without proceeding further when
is_initial_mem_debug_disabled is set to true.

Change-Id: Ie6251e70d2c01302121ff1c63ecf438f626de706
CRs-Fixed: 2780110
2020-09-18 15:17:29 -07:00
Harsh Kumar Bijlani
1f7706356f qcacmn: Update global frag counter and frag debug nodes refcount
The current logic for decrementing the global frag counter and
refcount for the frag debug nodes does not take into consideration
the no. of users of nbuf.

Decrement global frag counter and frag debug nodes refcount only
when no. of users of nbuf is 1.

Change-Id: I5b88691f7e3e9b7e29e19479c3a3c12e70c0f311
CRs-Fixed: 2776170
2020-09-18 15:17:26 -07:00
gaurank kathpalia
4af3739c3d qcacmn: Add connect path logic after serialization
Add connect logic after serialization in connection manager.

Change-Id: I6aabc956d4ade20379aec000f566ccbfcfdcfd23
CRs-Fixed: 2776348
2020-09-18 15:17:23 -07:00
Abhishek Singh
b494f209e8 qcacmn: Fix connection manager osif context initialization
Rename connection manager osif context and move the init and deinit
to osif from umac.

Change-Id: Id320e1b0e9bf53f1a2aa4a5bc536d6dec7f63bf2
CRs-Fixed: 2779890
2020-09-18 15:17:19 -07:00
Shivani Soni
f1392936e6 qcacmn: Reserve 128 bytes headroom in monitor status buffer
Reserve 128 bytes headroom for monitor status buffer
to accomadate feature specific radiotap header or any other info
in the headroom.

CRs-Fixed: 2775118
Change-Id: I2b1aba26e565b58c48a2e24ad17965aacd6b4526
2020-09-18 10:38:14 -07:00
Edayilliam Jayadev
8c77df3b7a qcacmn: Fix synchronisation between process context and tasklet
Spectral parameter state information is accessed in both
process context and tasklet context. Currently
qdf_spin_lock/qdf_spin_unlock is used to protect these data structures.
This can lead to deadlock in the scenario where the process holding the
lock gets preempted by the tasklet. To avoid this use
qdf_spin_lock_bh/qdf_spin_unlock_bh.

CRs-Fixed: 2776902
Change-Id: I6d188e55d5066241b5f38a655f4a587c9edb0b8b
2020-09-18 10:38:10 -07:00
Vijay Krishnan
30d4093334 qcacmn: Remove dfs_mlme_mark_dfs_for_freq function
The function dfs_mlme_mark_dfs_for_freq was introduced as a counterpart of
dfs_mlme_mark_dfs but both implement same functionality. In order to remove
redundancy, remove dfs_mlme_mark_dfs_for_freq. Replace the references to
dfs_mlme_mark_dfs_for_freq with dfs_mlme_mark_dfs.

CRs-Fixed: 2738831
Change-Id: I567861e4491802d73549670dfd30113b1a773d07
2020-09-18 07:30:08 -07:00
Pooventhiran G
df0c00317b qcacmn: QCA vendor command to update SSID
Add a QCA vendor subcommand QCA_NL80211_VENDOR_SUBCMD_UPDATE_SSID
to update the new SSID in hostapd. NL80211_ATTR_SSID is used to
encapsulate the new SSID.

Change-Id: I0c6e00afefa8cf00ceb58b4cdf72958f2ece8307
CRs-fixed: 2774888
2020-09-17 21:09:14 -07:00
Debasis Das
82de94ec39 qcacmn: Free cloned nbufs in error condition
While sending me packets, if failure is encountered
either while preparing tx desc or while enqueuing
to h/w,the cloned nbuf's must be freed.The unmap
must be done only if the failure is encountered
for all the me buffers.

Change-Id: I08dbae1fa1820b4fb31119f65e939aead829321b
2020-09-17 21:09:10 -07:00
Debasis Das
c1184913b7 qcacmn: Ensure nbuf count is less than no of segs
While preparing raw packets for transmission, the count
of nbuf belonging to one mpdu must be less than the
number of segments.This makes sure the frags array inside
seg_info does not go out of bounds.

Change-Id: I7fffba7f64da274aa73c558cfc63d90f4419a04d
2020-09-17 21:09:07 -07:00
Nirav Shah
a24f3db18e qcacmn: Increase CE2 host ring size to 512 for QCN7605
Increase CE2 host ring size to 512 for QCN7605 to avoid
ring full condition in FW in debug build.

Change-Id: I900611487696e3e83cd7adc72f10cd2cdcb15ead
CRs-Fixed: 2778941
2020-09-17 18:34:16 -07:00
Yu Wang
899debe4d7 qcacmn: add crypto api to free keys for vdev
Add api 'wlan_crypto_free_vdev_key' to free keys
for specified vdev.

CRs-Fixed: 2765406
Change-Id: I44b09ac30e16aca2aec8a0763b7848bfe779a345
2020-09-17 18:34:13 -07:00
Hariharan Basuthkar
547c60d7d7 qcacmn: Change return type to QDF_STATUS
wmi_unified_register_event has a return type of QDF_STATUS.
Handle the same return type in the following callers:

1. target_if_dfs_reg_ocac_event
2. target_if_dfs_reg_offload_events
3. target_if_reg_phyerr_events_dfs2

Change-Id: I622f6f6c4ff3b428a6407b6526e823083cc1fd8a
CRs-Fixed: 2767507
2020-09-17 18:34:10 -07:00
Ankit Kumar
8528f1fc76 qcacmn: Add feature debug print for RX_MON_MEM_FRAG
Added debug print for RX_MON_MEM_FRAG feature enable
disable log.

Change-Id: Iaa8712755bd1f9a686ec32e2e22ffc1f41da48a6
2020-09-17 13:01:54 -07:00
Srinivas Girigowda
cdf81dddd3 qcacmn: Replace WMI_LOGD() with wmi_debug()
Replace WMI_LOGD() with wmi_debug().

Change-Id: I9c69cabfd84882fa1daff6e219de5f2643e7d214
CRs-Fixed: 2774563
2020-09-17 10:18:55 -07:00
Srinivas Girigowda
8c756066a7 qcacmn: Replace WMI_LOGE() with wmi_err()
Replace WMI_LOGE() with wmi_err().

Change-Id: I4c2e2c278101224a967080c073c46004ea60f5af
CRs-Fixed: 2774563
2020-09-17 10:18:52 -07:00
Srinivas Girigowda
e6d0bc490d qcacmn: Replace WMI_LOGI() with wmi_* appropriate log level
Replace WMI_LOGI() with wmi_* appropriate log level.

Change-Id: I7b0c32a2aefc5eb300348edbc6a60e7ad0401439
CRs-Fixed: 2774563
2020-09-17 10:18:48 -07:00
Srinivas Girigowda
a5aa1420d2 qcacmn: Replace WMI_LOGW() with wmi_* appropriate log level
Replace WMI_LOGW() with  with wmi_* appropriate log level.

Change-Id: Idfc41fed4f31fb197ca8f46d3ed3a4af21f2fdae
CRs-Fixed: 2774563
2020-09-17 10:18:45 -07:00
Srinivas Girigowda
29eadb8bc6 qcacmn: Replace WMI_LOGP() with wmi_* appropriate log level
Replace WMI_LOGP() with wmi_alert() or with appropriate log level.

CRs-Fixed: 2774563
Change-Id: I53ad75f3b645306551250f7f400f8802692a01a3
2020-09-17 10:18:41 -07:00
Manikanta Pubbisetty
905d9e33fb qcacmn: add INI to place FST in CMEM
In addition to firmware capability, add INI param to decide FST
placement in CMEM.

Change-Id: Icc5fdfa49e35665b59efce3fc1f1855d84c16140
CRs-Fixed: 2778898
2020-09-17 10:18:38 -07:00
Manikanta Pubbisetty
b36165ae23 qcacmn: export CMEM FST firmware capability to DP
Firmware advertizes its support to place FST in CMEM,
export this capability to DP.

Change-Id: I265246bcfd38a36e34c4ede66e117a92bb185032
CRs-Fixed: 2772238
2020-09-17 10:18:34 -07:00
Manikanta Pubbisetty
9c25cded62 qcacmn: add WMI service flag to place FST in CMEM
Firmware advertizes the capability to allocate CMEM memory for
FST via a WMI service flag; adding the support for the same.

Change-Id: Ic33bf0584f5ce4880fdfe5abe8fd4cf2a653a06e
CRs-Fixed: 2771256
2020-09-17 10:18:30 -07:00
Manikanta Pubbisetty
3433cf4974 qcacmn: add HAL APIs to configure FSE in CMEM
Adding HAL APIs for adding and reading flow search entries(FSEs)
in CMEM.

Change-Id: If8282c8be38a85e2344bb55ffa4e63a7577daa20
CRs-Fixed: 2771198
2020-09-17 10:18:26 -07:00
Manikanta Pubbisetty
1a4e3a96c7 qcacmn: add APIs to access CMEM
Adding write/read APIs for accessing the CMEM.

Currently in QCA6750, UMAC and CE windows are statically mapped,
a new static window for CMEM is added for CMEM transactions.

Change-Id: Ie10b33a6f468c6e4db314ea85856414962ef29e3
CRs-Fixed: 2771193
2020-09-17 10:18:23 -07:00
Manikanta Pubbisetty
2db8a92735 qcacmn: add FSE CMEM HTT response
CMEM FSE details like offset into CMEM where flow search table(FST)
is allocated and the size of the FST will be sent by the firmware
in response to FSE setup message. Adding the logic to parse the
response message and update the CMEM parameters in the SW FST.

Change-Id: Id1dd4b59be02c175da3fc6fcb5ed56e6f491133a
CRs-Fixed: 2771187
2020-09-17 10:18:19 -07:00
Manikanta Pubbisetty
059a6df613 qcacmn: add data structures to place FST in CMEM
Adding data structures required to place FST in CMEM.
CMEM is an on-chip memory in QCA6750.

Change-Id: I39d47d6f0514941497d41301643344ee3b2dad30
CRs-Fixed: 2771186
2020-09-17 10:18:16 -07:00
Yeshwanth Sriram Guntuka
fcdcc1005f qcacmn: Do not set pkt len to HTT_MAX_MSG_SIZE in PPDU ind handling
Skbs allocated for CE1 ring are of size 2048 bytes. On
receiving PPDU stats HTT message, skb is pulled for 8
bytes corresponding to the HTC header length. As part of
dp_ppdu_stats_ind_handler, skb len is set to HTT_MAX_MSG_SIZE.
In the case where skb allocation is exactly of 2048 bytes,
including HTC header length, the aforementioned set_len
causes the skb to be expanded due to lack of tailroom.
This causes the skb data pointer to be changed which results
in invalid memory access.

Fix is to remove the qdf_nbuf_set_pktlen as skb len is
appropriately set by HTC layer.

Change-Id: Ied68c30456dc0e263ccfd03102962233a0e43d9f
CRs-Fixed: 2777516
2020-09-17 00:21:57 -07:00
Amruta Kulkarni
c8c0eee515 qcacmn: Fix compilation errors in IF mgr
- Fix compilation errors seen after correcting Kbuild typo.
- Add debug logs in Interface mgr api's.
- Update disconnect functions to have correctly typed parameters.

Change-Id: Iea5b32c374da6eef2aa804483388072c297b5eff
CRs-Fixed: 2774517
2020-09-16 21:04:56 -07:00
Sandeep Puligilla
d57e7836dc qcacmn: Initialize the interface module
Initialize the interface module.

Change-Id: Ia62d17c7f92f001f00ee5cff7cf0a6d1dc4f08ce
CRs-Fixed: 2776686
2020-09-16 21:04:52 -07:00
Yu Wang
6f01abdb21 qcacmn: initialize coex psoc obj when psoc is created
In current code, coex psoc obj is initialized in psoc open, the
configurations will be cleared in psoc close/open during
idle shutdown/restart.
To keep the configurations during the entire lifecycle of psoc,
initialize coex psoc obj when psoc is created.

CRs-Fixed: 2714050
Change-Id: I3cda4c7fd1c0ac482d44a9e80df342a8255fca9d
2020-09-16 13:40:25 -07:00
Jayachandran Sreekumaran
e238ccb793 qcacmn: Add config option to set rts/cts rate
Add config option to set rts/cts rate.

Change-Id: Ifaaca2f60c90508ebbc88e096c6c1ce0b80bb7de
CRs-Fixed: 2771302
2020-09-16 13:40:22 -07:00
Ankit Kumar
bdddeb7c22 qcacmn: Add frame vdev id check in tx
Drop frame if it is not for the vap, to which
client is connected.
Enable this check only for ap.

Change-Id: I33d7eb79267490bdb8697e4e45f789e9f6279f0e
CRs-Fixed: 2756304
2020-09-16 09:30:33 -07:00
Jayachandran Sreekumaran
c886b4c527 qcacmn: Maintain peer object refernce during frame delay
Maintain the peer object reference while delaying the processing
of peer frames.

Change-Id: Ia3df18f1281403c6ed36bfbc307b6928d3db9040
CRs-Fixed: 2769113
2020-09-16 07:11:14 -07:00
Jayachandran Sreekumaran
107f53c315 qcacmn: iot_sim frame drop support for disassoc and deauth
Add iot_sim frame drop support disassoc and deauth frames.

Change-Id: I26fb606d49a05754f1175c36b8fb14d1003c75f0
CRs-Fixed: 2765421
2020-09-16 04:51:58 -07:00
Debasis Das
26833e494d qcacmn: Unmap previously mapped frags in case of failure
While creating sg frames,if map fails for a fragment,
the previously mapped fragments must be unmapped.
Also, the nbuf mapping should happen for headlength.

Change-Id: I218efa60be7100a661da7bc3783fa25e5203a273
2020-09-16 04:51:55 -07:00
Abhinav Kumar
a253ce3577 qcacmn: Remove unused roam ini gRoamBeaconRssiWeight
Currently, gRoamBeaconRssiWeight is not used in HOST or
FW.

Remove logic to pass value of INI gRoamBeaconRssiWeight
to FW.

Change-Id: Ifa1472ef413d20d0e54649bc24dd6c8d6aac4bc7
CRs-Fixed: 2770278
2020-09-16 04:51:51 -07:00
Nisha Menon
095453ad08 qcacmn: Increase num of entries in CE2 dest and status rings
Increase the num of entries in host side from 32 to 64
so FW can post more descriptors to host src ring
without hitting ring full condition. This is to avoid
back pressure issues in FW. The memory increase is
by 32*4K allocations.
This change is applicable to all HSP targets.

Change-Id: Ia973e13b9d9b2b682957ae19fc3f23dd49bef401
CRs-Fixed: 2761953
2020-09-16 02:33:21 -07:00
Chaithanya Garrepalli
be355211df qcacmn: initialize dp peer state lock before ast add
As DP peer state lock is used in add_ast API initialize
it before calling this API

Change-Id: I212449f6bd25b05241c35678f2d77f779f4fab4e
2020-09-16 02:33:17 -07:00
Mohit Khanna
8e57f126b5 qcacmn: Use zero timeout in non interrupt mode during force wake
Currently we use a single timeout value of FORCE_WAKE_DELAY_TIMEOUT_MS
during hif_force_wake_request. A 50ms value is not enough in some cases
to bring MHI to M0 from M2/M3_fast states. This can result in a write
failure.

In certain cases, when not in an interrupt context, it should be okay
to wait slightly longer for MHI to transition into M0.
Hence, pass 0 as the timeout value to pld_force_wake_request_sync.
This API calls CNSS API which uses a blocking call -  mhi_device_get_sync,
to transition MHI to M0, when a value of zero is passed.

Change-Id: I738bf9c4a9a83c943186445cba0174df18a45c74
CRs-Fixed: 2766674
2020-09-16 02:33:14 -07:00
Kani M
bc64bbccf3 qcacmn: Error handling in Crypto API
Incorporate cleanup in the error handling for
Crypto API.

Change-Id: I223d8149eada20b7bf5b2c92d485a26b88d1a00e
2020-09-15 23:03:54 -07:00
Gerrit - the friendly Code Review server
2b0ec006bd Merge changes into wlan-cmn.driver.lnx.2.0 2020-09-15 22:08:44 -07:00
gaurank kathpalia
4609c06b56 qcacmn: Handle serialization activation and hw mode change resp
Handle the serialization activation callback for connect and
disconnect and hw mode change resp for connect.

Change-Id: I553a650ea04daa5aa22ee43376b9359aed58c59f
CRs-Fixed: 2776022
2020-09-15 18:25:02 -07:00
aloksing
f1ebce2cec qcacmn: Change return type to QDF_STATUS
wmi_unified_register_event return QDF_STATUS

Change-Id: Ie65a3707aa24213daf97c2bf36310d6471b31733
2020-09-15 18:24:59 -07:00
Alok Singh
60e5004ace qcacmn: Change return type to QDF_STATUS
wmi_unified_register_event return QDF_STATUS
Handle same return type in caller function

CRs-Fixed: 2764185
Change-Id: I29fd5e645c7b43c74e28494c83a6f7d460165e2e
2020-09-15 18:24:56 -07:00
Alok Singh
8ae5bcc124 qcacmn: Change return type to QDF_STATUS
wmi_unified_register_event return QDF_STATUS
Handle same return type in caller function

CRs-Fixed: 2764185
Change-Id: If77efc6a5b451bf2cf4acb59d5a2126ce486f02f
2020-09-15 18:24:52 -07:00
Alok Singh
45298ac99f qcacmn: Change return type to QDF_STATUS
wmi_unified_register_event return QDF_STATUS
Handle same return type in caller function

CRs-Fixed: 2764185
Change-Id: Ia6d1781f2bf1eea85d4af357e37a00b1f78e264e
2020-09-15 18:24:49 -07:00
Alok Singh
68874e3c6b qcacmn: Change return type to QDF_STATUS
wmi_unified_register_event return QDF_STATUS
Handle same return type in caller function

CRs-Fixed: 2764185
Change-Id: I18c687ad0564ec70e28cf1f33f26501dda6ee5c5
2020-09-15 18:24:45 -07:00
Alok Singh
54aae4d5e6 qcacmn: Change return type to QDF_STATUS
wmi_unified_register_event return QDF_STATUS
Handle same return type in caller function

CRs-Fixed: 2764185
Change-Id: I1dc098793e1df658666343d4293fe3f1c02daf34
2020-09-15 18:24:42 -07:00
Alok Singh
43932952ca qcacmn: Change return type to QDF_STATUS
wmi_unified_register_event return QDF_STATUS
Handle same return type in caller function

CRs-Fixed: 2764185
Change-Id: Icfa7946a447f3cfe8c6ce933a618e8dbb67bd6a0
2020-09-15 18:24:39 -07:00
Alok Sing
40502e26b4 qcacmn: Change return type to QDF_STATUS
wmi_unified_register_event return QDF_STATUS
Handle same return type in caller function

CRs-Fixed: 2764185
Change-Id: I87b1e6ee5e06e4e6af81395d977595335fe0bc5c
2020-09-15 18:24:35 -07:00