Commit Graph

463 Commits

Author SHA1 Message Date
Himanshu Batra
453eea49a9 qcacmn: Replace void * wmi_hdl with abstract type (4/10)
Replace void * wmi handle with abstract type handles
provided by wmi component.

Change-Id: I4bb0f9fd921bf53d38dfb257818fee48c4516cd8
CRs-Fixed: 2475457
2019-07-18 03:45:58 -07:00
Himanshu Batra
6abe4bebd6 qcacmn: Replace void * wmi_hdl with abstract type (3/10)
Replace void * wmi handle with abstract type handles
provided by wmi component.

Change-Id: I04cd3ce5b4f36f7073d4644e2fd0d52da41e1af3
CRs-Fixed: 2475447
2019-07-18 01:07:26 -07:00
Himanshu Batra
29bc991911 qcacmn: Replace void * wmi_hdl with abstract type (2/10)
Replace void * wmi handle with abstract type handles
provided by wmi component.

Change-Id: Id12d6446aed8fd389b8677f08765bb31cabf2fb0
CRs-Fixed: 2475444
2019-07-18 01:07:23 -07:00
Abhiram Jogadenu
1c2b583ee2 qcacmn: Componentize and enable conv WIFI POS
Componentize and enable converged WIFI POS

Change-Id: I8e3f745dbb087818c9d411c7a00e1cdb2907d4d3
2019-07-16 17:15:24 -07:00
Basamma Yakkanahalli
dcfa1c7012 qcacmn: FFT bin size WAR to support 4 bytes for QCA6018
Spectral scan for QCA6018 failed due decoding the FFT bin in 2 bytes.

HWS team confirmed that for QCA6018, the FFT bin is in 4 bytes
representation.
Fixing this by modify the fftbin size WAR for QCA6018 to decode
4 bytes FFT bins.

Change-Id: I60e07370f7191544269d52640ae072f2a41f3833
CRs-Fixed: 2487055
2019-07-11 04:53:48 -07:00
Abhiram Jogadenu
94748b3c46 qcacmn: Extract OEM response params
Add API to extract OEM response parameters from corresponding
WMI event.

Change-Id: I9a45bdac4a9091bf21ad8b9877e485baad4a75db
CRs-Fixed: 2467938
2019-07-11 02:10:41 -07:00
Paul Zhang
5e9e4549d9 qcacmn: Add OEM DATA vendor command support
This command is used to send OEM data binary blobs
from application/service to firmware.

Change-Id: Id806638bf8c53c65b32177969d965290da5701b9
CRs-Fixed: 2477337
2019-07-11 00:52:13 -07:00
Naga
52beb2c087 qcacmn: Add target_if/mlme support for vdev delete all peer
Add target_if/mlme support for vdev delete all
peer request which will replace individual peer
delete of peers under a vdev during vdev down.

Change-Id: Ic9aadefefe26bcdcd38bb5a28be712e3c5e2963a
CRs-Fixed: 2456858
2019-07-05 10:26:40 -07:00
Akshay Kosigi
c36e354311 qcacmn: Fix for removal of void pointer usage
Add changes to remove usage of void pointer for wmi_handle
Instead use an opaque pointer(set 2)

Change-Id: I06a89adaf15c6b398dbc901518aa83927b7ca16a
CRs-Fixed: 2479298
2019-07-02 09:47:56 -07:00
Akshay Kosigi
f0c668f54a qcacmn: Fix for removal of void pointer usage
Add changes to remove usage of void pointer for wmi_handle
Instead use an opaque pointer(wmi_handle_t)

Change-Id: I7c6dce564f34352c75e0b9d0c90591de625f1959
CRs-Fixed: 2479299
2019-07-02 02:40:11 -07:00
Shashikala Prabhu
84f2effd3f qcacmn: Fix target assert caused due to DBS band limitation WAR
In some boards, FW can send preferred HW mode as DBS and num HW modes as 2.
In this scenario, with I65ab1b803f652cf6b636cd885c6c0afd2251b0ce change we
observed a target  assert.

To fix the assert, apply the DBS mode phy0 band limitation WAR only if FW
sends preferred mode as DBS and DBS_SBS.

Change-Id: If71d143b4b6a60df7499c0f7b9da00ebf73f2b4e
CRs-Fixed: 2465391
2019-06-30 23:47:18 -07:00
Gyanranjan Hazarika
91005b0b3f qcacmn: Add WAR for DBS mode phy0 band limitation
The limitation of having a single BDF for both DBS (2 radio)
and DBS_SBS (3 radio) capable board is leading to FW sending
 per-phy band-to-mac mapping as regulatory capability
as part of service_ext_ready. The boards which have the capability
of switching between DBS and DBS_SBS modes through init-time
(INI) file configuration are limited to 5G upper bound only
even in DBS mode becasue of the above constraint.

This WAR overwrites, in psoc-reg_cap, phy0 low or phy0 high frequency
depending on whether it is mapped to upper or lower 5G band by FW/hal-phy.

Change-Id: I65ab1b803f652cf6b636cd885c6c0afd2251b0ce
CRs-Fixed: 2465391
2019-06-30 23:47:15 -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
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
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
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
Edayilliam Jayadev
7c72252ec8 qcacmn: Free outstanding skbs on Spectral detach
While detach if there are any outstanding skbs free them.

CRs-Fixed: 2470780
Change-Id: Ic9ee568a1af96b2535cc2a30747ac8e5190e1be6
2019-06-14 12:58:27 -07:00
Aditya Sathish
ce928dcd67 qcacmn: Add support for chan RF info from service_ready_ext event
Channel RF info contains metrics that signify the throughput
availability of all the supported channels. This information
is sent in as discrete TLVs (per channel) as part of the WMI
extended service ready event.

Each TLV contains the frequency, bandwidth represented and
the actual channel metric.

Add support to read the above-mentioned TLVs from the extended
service ready event

Change-Id: If947e179c1ca41466997cc48840a8d36b6236780
CRs-Fixed: 2441921
2019-06-03 02:27:10 -07:00
Subrat Mishra
13d57c69d2 qcacmn: Configure TWT pdev count dynamically
Configure TWT pdev count based on number of active radios.

Change-Id: I8b297c2f2398774a57932bd1fafc83aba2f891d2
CRs-Fixed: 2449799
2019-05-27 04:23:36 -07:00
Edayilliam Jayadev
64e320b697 qcacmn: Bound check while setting Spectral params
Do bounds check for some Spectral params and throw an
error in case of any out of bound inputs.

CRs-Fixed: 2449740 2449704
Change-Id: Ibc3159267076fa355ab3e50f2d8b0b1524ae444c
2019-05-21 16:45:23 -07:00
Akshay Kosigi
2a2a8afda4 qcacmn: Add change to restart target if timer
Add code to restart timer for a new vdev command being sent to FW,
while we are awaiting for a response from FW for a previous command.

Change-Id: I1847968831cca6b0ee1e49d32b83196061341702
CRs-Fixed: 2450682
2019-05-16 14:46:39 -07:00
Pragaspathi Thilagaraj
a7c83f7401 qcacmn: Fix possible OOB in target_if_direct_buf_rx_rsp_event_handler
The function target_if_direct_buf_rx_rsp_event_handler() handles
the WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID event from target.
This function calls extract_dbr_buf_release_fixed_tlv() to copy
the module id, pdev id number of buffer release entry and number
of meta data release entries. The value of module id is used to
index the array dbr_mod_param to get the value of mod_param.
So if the module id value greater than dbr_pdev_obj->num_modules
could result in possible OOB.

Validate mod_id received in the fixed param of the event
WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID against
dbr_pdev_obj->num_modules.

Change-Id: I1c2c0a2a9c98d8b787496aba7a7c4f8fd781de16
CRs-Fixed: 2428798
2019-05-16 12:43:19 -07:00
Naga
f1313ba77e qcacmn: Add change to avoid sending wmi cmd
Add change to avoid send wmi command in case
of vdev start, multi vdev restart, stop and delete
when vdev_mlme object is NULL.

Change-Id: Iaa3d3f56fb9caf37b933f029c57311edef0281b4
CRs-Fixed: 2443599
2019-05-15 05:47:17 -07:00
Akshay Kosigi
4a994eff88 qcacmn: Add change to send target if response to HOST
Add code to enable sending target_if vdev response to host,
if FW fails to send response within expiry time.
Move timer free functionality to vdev destroy path so as
to make the system not to go into deadlock

Change-Id: I72bdecf2502a755ffc09414f8b72d230bf9c559f
Crs-Fixed: 2449238
2019-05-14 23:57:56 -07:00
Naga
35fa197776 qcacmn: Add change to remove setting txbf
Add change to remove setting txbf irrespective
of opmode before sending vdev up cmd

Change-Id: Ic5b604fb34456203f1afda759ab81595ef1ccd04
CRs-Fixed: 2446756
2019-05-08 04:47:12 -07:00
Basamma Yakkanahalli
b85768e4e5 qcacmn: Remove HK header dependencies for ipq6018 compilation
Add target specific HW header for ipq6018 compilation.
Remove the 8074 header dependencies for 6018 compilation.

Change-Id: I8e45e3e039a4596c6722538405dcd381918fa6b1
2019-05-02 01:25:01 -07:00
Edayilliam Jayadev
8a0228a1f3 qcacmn: Make sig/tag mismatch Spectral logs rate limited
Rate limit sig/tag mismatch related Spectral logs
so that it doesn't effect the stability of the system.

CRs-Fixed: 2433581
Change-Id: I860089419836f1a6203abe0be5df62eab9dd546b
2019-04-27 14:38:45 -07:00
Padma Raghunathan
93549e15a1 qcacmn: Framework to use pdev_id to lmac_id mapping from FW
FW assigns the pdev_id to lmac_id mapping for each platform(HK, CYP, etc).
This information is passed on to host via WMI_MAC_PHY_CAPABILITIES tlv.

Instead of hard-coding the mapping again in host, use the info sent by FW.

Change-Id: I01ad81e97a1b4aa1f0fea3951f6e8285a0f0c039
2019-04-25 06:02:23 -07:00
Rakesh Pillai
9498cd70f4 qcacmn: Serialize dp reorder queue setup wmi command
Refactor the code to move the serialization of
rx reorder queue setup wmi command to target-if
layer.

CRs-Fixed: 2431099
Change-Id: I6b383f5e875fec55c3586dfee576894f6eb35f73
2019-04-23 16:18:54 -07:00
Basamma Yakkanahalli
6d4e001c2e qcacmn: Remove skipping 160 80_80 check for qca6018 target
qca6018 support max 80MHz.
Skipping the check to return success for 160 and 80_80.
So, these values can be updated from fw capabilities.

Change-Id: I3c846a343b74251521b978c4569204ad2f4aadcc
2019-04-22 18:21:17 -07:00
Arun Kumar Khandavalli
65b02b4a8e qcacmn: Update wmi ready to false when the legacy cb returns error
Presently even when the ready event legacy callback fails in
creation of the pdev, the error is not propagated correctly. This
can result in accessing the invalid memory.

Check the legacy cb return status and update wmi ready status to
false in case pdev creation fails.

Change-Id: Ia4f94154357debedc94b4b20e789bff80a4047f7
CRs-Fixed: 2426611
2019-04-21 23:43:52 -07:00
Harprit Chhabada
8f06c8286f qcacmn: Move the level of some cp stats from kernel to driver
Move some stats from tgt_mc_cp_stats_extract_vdev_summary_stats
and  target_if_cp_stats_extract_vdev_chain_rssi_stats, from kernel
to driver

Change-Id: I3475421828b51a229af4ac3ff6087d7ebb311c33
CRs-Fixed: 2430565
2019-04-11 01:14:25 -07:00
Akshay Kosigi
3d91d4d32c qcacmn: Add mgmt tx rate code to send to FW
Add a new mgmt tx rate code id to send mgmt rate code to fw

Change-Id: If294982bae5c273c085d1b9bf46f3ad53db60b93
CRs-Fixed: 2428713
2019-04-08 17:43:46 -07:00
Akshay Kosigi
8ca3339524 qcacmn: Add beacon tx rate code to send to FW
Add a new beacon tx rate code id to send rate code to fw instead of
sending beacon tx rate

Change-Id: I8cfe6024b9adf4b25c8686e837c94b86dddceab5
CRs-Fixed: 2428706
2019-04-08 17:43:42 -07:00
Ashish Kumar Dhanotiya
5e3af684b5 qcacmn: Add support to cache peer capability info
Currently capability information and RX multicast broadcast
packet count of the connected peer is not getting
cached.
Add support to cache the capability info from assoc request and
RX multicast broadcast packets from FW.

Change-Id: I105e055b1e440852e8e6b508c25e45f79db2d062
CRs-Fixed: 2409521
2019-04-08 10:50:14 -07:00
Akshay Kosigi
aeaa258b54 qcacmn: Change to remove WMI dependency from mlme component
Replace WMI references in mlme component with wlan_mlme macros.

Change-Id: I7fcd241581972674e19e088c44409d7a5f6ebf58
CRs-Fixed: 2414375
2019-04-06 11:36:09 -07:00
Rhythm Patwa
49064081e8 qcacmn: Modify the description for peer assoc and service ready param
Modify the comment to avoid the use of restricted words in the
wmi_unified_param and service_ready_param

Change-Id: I50f474bdeed6cfdfd05f0c4bff5bb0c0ed56127f
CRs-fixed: 2427333
2019-04-05 18:45:47 -07:00
Akshay Kosigi
09b50e625d qcacmn: Add psoc id value to debug prints vdev mlme timer APIs
Add psoc id value for the debug prints of, error handling vdev mlme timer
APIs

Change-Id: I7d225114e91ff4b6f898450ca3ef7d2e21be631a
CRs-Fixed: 2427905
2019-04-05 18:45:44 -07:00
Priyadarshnee S
457b26718a qcacmn: Correct issues in DFS Full Offload featurization
Change I498ac1f8cd1d6423032d7b3b8c233656c5f0bf22 ("qcacmn: Have separate
macros for DA/PO/FO to reduce the code size") introduced featurization of
the DFS logic. Two functions, target_if_dfs_reg_offload_events() and
dfs_fill_emulate_bang_radar_test(), were not correctly featurized,
resulting in compilation failures when WLAN_DFS_FULL_OFFLOAD is not
enabled. To prevent these failures properly featurize the functions.

CRs-Fixed: 2366596
Change-Id: I4bcecf95d92cb3ebe2ff893c17755385dda11429
2019-04-05 18:45:40 -07:00
Naga
df242752b2 qcacmn: Add TxBF caps in target_if/mlme
Add change to frame TxBF caps from vht_info
in target_if and send to FW

CRs-Fixed: 2412867
Change-Id: Ibc26b96cad2a5e72eb293f5a5d6847f19122ea0f
2019-04-03 15:45:05 -07:00
Abhiram Jogadenu
d2077da875 qcacmn: Add direct rx buffer changes for CFR requirements
CFR requires to configure the number of DBRs that can be packed
in a single DBR event. Currently, this is fixed value.
Make this configurable at the time of registration.

CRs-Fixed: 2415489
Change-Id: Ifcd606641f986a5345f8ccb361c3f45db07fdc37
2019-04-02 15:16:01 -07:00
Edayilliam Jayadev
79a5edccee qcacmn: dont send Spectral stop WMI if Spectral scan is not in progress
Before sending Spectral stop WMI to FW check whether Spectral
scan is in progress. When all vdevs are in down state host driver
will send a stop Spectral scan command to FW. In that scenario there
is a possibility that stop Spectral scan WMI message may go to FW
even though Spectral scan is not active. To prevent this we add a check
in stop Spectral scan routine to send WMI message only if
scan is in progress.

CRs-Fixed: 2424020
Change-Id: I2119935759c40f62df75574b6a29174973f2703f
2019-03-30 08:07:23 -07:00
Jeff Johnson
eee26f7b76 qcacmn: target_if: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within target_if replace any such comparisons with
logical operations performed on the pointer itself.

Change-Id: I436bb3ec12d331df2260507b6a9afbab84a8a54f
CRs-Fixed: 2418256
2019-03-29 00:48:05 -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
Rhythm Patwa
e409a8fd44 qcacmn: Add peer assoc and service ready param for hecap_info_internal
'hecap_info_internal' has been added to indicate support for 11ax
proprietary PHY features: 400ns SGI support in 1X/2X LTF and 2X LTF
support in 160/80+80MHz modes. Added the corresponding peer assoc
and service ready parameter.

Change-Id: I34ead9278d8d84ecbc5525867f1584f8c8a4d7b8
CRs-fixed: 2414163
2019-03-26 01:24:49 -07:00
Akshay Kosigi
ce1e21c209 qcacmn: Add change to send listen interval value to FW
Add code to support host sending listen interval value to FW

Change-Id: Ibd0134f5045ab289065214e6485f2dd261abf4a3
CRs-Fixed: 2419185
2019-03-20 22:10:40 -07:00
Edayilliam Jayadev
2675a77901 qcacmn: change few Spectral logs to info
Change the levels of few spectral logs to
INFO so that it won't result in flood of
prints.

CRs-Fixed: 2418342 2418856
Change-Id: Id6a8eed0d5f01f7f44f3caef326b18dc5abcd959
2019-03-20 22:10:17 -07:00
Akshay Kosigi
c5d48d06c6 qcacmn: Add code to send correct AMDPU command to FW
Change to send correct WMI command for AMPDU configurations.

Change-Id: Ic139bd088996389227e4493e053436b0d4f38586
CRs-Fixed: 2415352
2019-03-19 02:24:52 -07:00
Sourav Mohapatra
d768fd9e1e qcacmn: Extract and populate peer_extd2 stats from fw
Presently, the driver doesnot extract the peer extended2 stats
(rx_bytes, rx_count, fcs_err) that are received from firmware.

Provide the support to extract and populate the peer extended stats2 at
the driver level.

Change-Id: If1f1bb1ef2d1202581744dd509d0da1da718d8c1
CRs-Fixed: 2397638
2019-03-18 09:53:02 -07:00
Shaakir Mohamed
14ac61de4d qcacmn: Add target interface support for Agile DFS feature
Add target interface support for Agile DFS feature. This includes:
	1)target interface to send agile dfs request command
	2)target interace to send  off-channel cac abort command

Change-Id: Ica0cecd08dc1cd90fe71a618afe749b50dc1cb6d
CRs-Fixed: 2385536
2019-03-14 14:28:26 -07:00