Commit Graph

4160 Commits

Author SHA1 Message Date
Srinivas Pitla
c664572a93 qcacmn: Add target_if support to WMI
Include service ready structure definition

Change-Id: I0294b99c6836fc96b0e211c855e851c8926d4823
CRs-Fixed: 2177109
2018-02-03 15:10:55 -08:00
Srinivas Pitla
c4bdc7a1df qcacmn: Add target_if changes to QDF
1) Remove redundant members
2) Change the target_if debug level to info

Change-Id: I49d5e3f2af61a87097145e9214d84882ffd439ee
CRs-Fixed: 2177109
2018-02-03 15:10:53 -08:00
Srinivas Pitla
d8781f1693 qcacmn: Define psoc/pdev target_if structures
Define psoc/pdev target_if structure and implement
alloc/free of these structures

Change-Id: Ie741d0de77c48caa843d4f2b33220a987366ba9b
CRs-Fixed: 2177109
2018-02-03 15:10:51 -08:00
Srinivas Pitla
1ddc439f46 qcacmn: Add wait_timeout API in qdf
Introduces QDF API for wait_queue_timeout() to allow
driver to use. This API helps to wait for the event for
configured time

Change-Id: I9640368120fd09b19f64f028f1eb3aab46b7c97a
CRs-Fixed: 2177109
2018-02-03 15:10:48 -08:00
Vignesh Viswanathan
089564f11d qcacmn: Add sanity check for WMA NDP extract TLV functions
In extract_ndp_confirm_tlv & extract_ndp_ind_tlv, ndp_cfg len &
num_ndp_app_info is from fw. If they are greater than the actual
length of buffer sent in FW, OOB access and info leak would occur.

Add sanity checks for ndp_cfg_len and num_npd_app_info with the
actual length of the buffer from TLV header in functions
extract_ndp_confirm_tlv & extract_ndp_ind_tlv to prevent OOB access.

Change-Id: I9ecf55a3606036d3e1f0916c948c4360475965fa
CRs-Fixed: 2176968
2018-02-03 07:42:18 -08:00
Shiva Krishna Pittala
e37387598e qcacmn: Fix the coding convention issues in Spectral simulation
Current target_if Spectral simulation layer code is not following
coding convention rules in some places.

Change-Id: I0bf0f0514b65e17ddce9fb803c647448ee4b5b3a
CRs-Fixed: 2151555
2018-02-02 14:48:12 -08:00
Shiva Krishna Pittala
318d20fc69 qcacmn: Fix the coding convention issues in Spectral target_if layer
Current target_if spectral layer code is not following coding
convention rules in some places.

Change-Id: I1c0e78c6cdbe97db657c341d74582567a29a86b0
CRs-Fixed: 2151555
2018-02-02 14:48:09 -08:00
Shiva Krishna Pittala
6273adc01a qcacmn: Fix the coding convention issues in Spectral dispatcher
Current Spectral dispatcher code is not following coding convention
rules in some places.

Change-Id: I0370ca91c8b5ac3a31ae07d6be7d18a3290790f8
CRs-Fixed: 2151554
2018-02-02 14:48:06 -08:00
Shiva Krishna Pittala
f57c0b6262 qcacmn: Fix the coding convention issues in Spectral core
Current Spectral core functionality is not following coding
convention rules in some places.

Change-Id: I2109e510351d254652cbab16f09e52ec463abebb
CRs-Fixed: 2151550
2018-02-02 14:48:03 -08:00
Dustin Brown
57a7ff2f9b qcacmn: Remove QDF_MAC_ADDRESS_STR
QDF_MAC_ADDRESS_STR has been replaced by QDF_MAC_ADDR_STR. Remove
QDF_MAC_ADDRESS_STR.

Change-Id: I810d56ef62009375422a69b66d75b4d03ddaee0f
CRs-Fixed: 2176528
2018-02-02 09:31:03 -08:00
Zhu Jianmin
181ebf835c qcacmn: Avoid memory corruption when calling cb to release cmd memory
When serialization puts the command in active queue & activates
the command, it gives the callback to command owner as part of
the activation procedure. If this activation callback fails then
serialization suppose to give a callback to the owner to release
the memory.
There are some instances observed in legacy platforms where owner
releases the memory itself as part of activation callback failure
first and gets serialization callback as well to release the same
memory. These scenario creates "double free" or "memory
corruption" phenomena.
In order to avoid this scenario, add a sanity check to make sure
command still present in active queue and memory is not released
by command owner before calling callback to release the memory.

Change-Id: Ide341e3288aadd7d6e4441a5768118cd1439d38d
CRs-Fixed: 2161678
2018-02-02 07:46:06 -08:00
Om Prakash Tripathi
f534bf9363 qcacmn: notify scan complete after comamd complete
Do command complete before invoking scan event handlers.
Its required as few scan event handlers check if scan is
active on underlying pdev which returns true as command
complete is not done yet.

Change-Id: Ia415b55e9c9a1cea71faa160c6b52c88dc8329a9
CRs-Fixed: 2180033
2018-02-02 07:46:03 -08:00
Kris Muthusamy
7b5130c6ce qcacmn: Fix host panic due to missing WMI service handles
WMI service handle is not attached for all Pdev with recent
WMI changes. Fix host panic due to missing WMI service handles
for all Pdev.

Change-Id: Ic6107120ea4a49e49b86ebbfe385e440de3f49a9
2018-02-02 07:46:00 -08:00
Manjunathappa Prakash
f9efb3d998 qcacmn: Check for TSO packet in release_skb
For TSO packets we get Tx completion for each segment,
whereas nbuf tracking code has only one entry. So remove
nbuf tracking record entry when nbuf->users is 1.

Change-Id: I7f66eb91d802c909ee0c9a0243be6415c82c211e
CRs-Fixed: 2179883
2018-02-02 05:45:49 -08:00
Manjunathappa Prakash
fa60a1a00b qcacmn: radiotap: Move HE flags to bit 23
Change HE flags in it_present from 22 to 23.
This expects corresponding change in wireshark also decode correctly.

Change-Id: I2fcbabd7156e8f836440c170e711b6f7f8f4f262
CRs-Fixed: 2177255
2018-02-02 05:45:47 -08:00
bings
276c0f1969 qcacmn: Use new APIs to get and set DFS Non-Occupancy-List(NOL)
Current driver is using pld_wlan_set_dfs_nol() and pld_wlan_get_dfs_nol()
directly through eSAP_DFS_NOL_SET and eSAP_DFS_NOL_GET case statements
respectively within HDD module. These methods are obsoleted as per
new driver design.

Use DFS component's utils_dfs_init_nol() and utils_dfs_save_nol() APIs
instead to get and set DFS NOL respectively.

Change-Id: I63e8adac3f99c2052c26e6b01d19071f098e0a4f
CRs-Fixed: 2178580
2018-02-02 05:45:45 -08:00
Paul Zhang
36b80ed9bf qcacmn: use driver database for reg no-offload
For reg no-offload case, it needs to call the
reg_program_chan_list() function directory to apply
the right channel info.

Change-Id: Ieb7acf9f96973a6e56146e2763f455ef92838c4a
CRs-Fixed: 2174286
2018-02-02 01:53:59 -08:00
Shashikala Prabhu
8136b58f56 qcacmn: Fix radar detection failure for DA and PO
DFS capability was not set properly for Partial-offload(PO) and
Direct-Attach(DA) radio. Thus radar detection failed.

Change-Id: I5493d7195a57f160792a411653c05bbf220d3561
CRs-Fixed: 2160418
2018-02-01 04:16:49 -08:00
bings
aa1810a8fb qcacmn: Fix nol timer memory leak
DFS nol timer need cleanup when rmmod driver, otherwise there is
memory leak.

Change-Id: I4f4c91f7fb515133edd4cb852b3760819a390505
CRs-Fixed: 2173788
2018-02-01 02:20:57 -08:00
bings
5fc318cedb qcacmn: Do not switch channel in DFS testing mode
If gDisableDFSChSwitch is configured as 1, channel should not be
changed even radar is found.

Set usenol as 0 when gDisableDFSChSwitch is configured as 1.

Change-Id: I05c4afea3eb9af9c541b2324a2d50ea59c05f7d7
CRs-Fixed: 2168792
2018-01-31 21:49:35 -08:00
Dustin Brown
7229739ec7 qcacmn: Add objmgr lifecycle logs
Knowing the current and historical state of high level abstractions in
the driver is critical to successful debugging of issues. To assist
these efforts, add info-level logs for the following object manager
psoc/pdev/vdev/peer lifecycle events.

	* create
	* logical destroy
	* physical destroy

Change-Id: Idbb5350e85cb1b452e076a6fece31f83dcc7aafc
CRs-Fixed: 2179681
2018-01-31 19:41:11 -08:00
Abhishek Singh
c05285da8a qcacmn: Fix RSSI for the beacon received in adjacent channnel
Due to Rx sensitivity issue, sometime beacons are seen on adjacent
channel so workaround in software is needed. If DS params or HT
info are present driver can get proper channel info from these IEs
and set channel_mismatch so that the older RSSI values are used in
new entry.

For the cases where DS params and HT info is not present, driver
needs to check below conditions to get proper channel and set
channel_mismatch so that the older RSSI values are used in
new entry:
   -- The old entry channel and new entry channel are not same
   -- RSSI is less than -80, this indicate that the signal has
       leaked in adjacent channel

Change-Id: Ie9dc26f938b58b0c5d071ce4f2ba02b8e7fd4f60
CRs-Fixed: 2180012
2018-01-31 02:05:55 -08:00
Paul Zhang
48884688c3 qcacmn: Add api to get the current country code
Add new api to provide the current country code
is using.

Change-Id: I84682e132fd1e150d7c4f86b04bbfc8c45e2d841
CRs-Fixed: 2175022
2018-01-30 23:55:23 -08:00
Aniruddha Paul
80f52e70ca qcacmn: Add API to return the msdu link descriptor for NSS offload
Add API to return the msdu link descriptor from obtained from NSS back to
host link descriptor pool.

CRs-Fixed: 2178692

Change-Id: Ib4f967ea887e013d6461ba760a45dbda6fd92baa
2018-01-30 23:55:22 -08:00
Aniruddha Paul
91dfd50160 qcacmn: Add API to change Rx Fragment DST ring
Add API to change the Rx Fragment DST ring based on the SoC NSS
config
CRs-Fixed: 2175933

Change-Id: I2e3f0b82d301538f54d9790d55eeccdd0f6fa154
2018-01-30 23:55:20 -08:00
bings
6c40b760d5 qcacmn: set center freq segment0 for channel params in 2g HT20 mode
In the routine sap_ch_params_to_bonding_channels, the channels is set
invalid value 0 if center freq segment0 for channel params is 0.

ch_params->center_freq_seg0 should be set for 2g HT20 mode.

Change-Id: I063f1341da5a4934c97dec4bcda9367101de7cc5
CRs-Fixed: 2179368
2018-01-30 21:29:00 -08:00
bings
b004c6d432 qcacmn: Refine DFS object allocation for MCL
Currently DFS object can only be allocated if radio supports 5G.

Rome supports 5G and saves its wireless_mode in hal_reg_cap of
psoc->service_param because Rome FW does not support wmi event
wmi_service_ready_ext_event_id.

Check wireless_modes based on different DFS_SUPPORT.

Change-Id: I0120dde4fcf47bd71f6da512fae64dd62f5f46c8
CRs-Fixed: 2179925
2018-01-30 17:43:32 -08:00
Akshay Kosigi
9e7f12f7da qcacmn: Fix Scatter-Gather and TSO
Fix SG and TSO for ftp data transfer

Change-Id: Ide7eec987436beea08711f31362c1fa61f5bf8c3
CRs-fixed: 2159610
2018-01-30 15:26:48 -08:00
Zhang Qian
3679492629 qcacmn: Add UT framework for OCB module
Add a faked WMI layer for OCB unit test on platform does not
support OCB feature.

CRs-Fixed: 2177563
Change-Id: I35b272faa21f3b225eb036c06a15b06ab4b389ae
2018-01-30 13:40:39 -08:00
Prathyusha Guduri
be41d97175 qcacmn: add dp_tx_send_exception
dp_tx_send_exception is an exception path that transmits frames
through FW by setting DP_TX_DESC_FLAG_TO_FW

Change-Id: Id6abfcd2bf060c4fe3aaca91634f3be501530a7e
CRs-Fixed: 2176814
2018-01-30 13:40:37 -08:00
Naveen Rawat
6f7ddcadb4 qcacmn: Avoid null pointer dereference and un-initialized data access
Fix possible null pointer dereference and un-initialized vairable access
in scan component.

Change-Id: Ide1adf2f53712fa987fdda8170eee4e95bff0036
CRs-Fixed: 2169517
2018-01-30 13:40:35 -08:00
bings
e05bc00ff3 qcacmn: Disable radar for current channel before selecting new channel
In current implementation, after radar detection, a new channel is selected
and then radar is disabled on the new channel. The new channel may be a DFS
channel and radar will be disabled on the new channel.

Radar disable should be called for the current channel and not on the new
channel. Therefore, disable the radar first and then select the new
channel.

Change-Id: Ied57f8910b30ee2181406e26ace1e7a44ff691b4
CRs-Fixed: 2172007
2018-01-30 09:25:51 -08:00
bings
c83573954f qcacmn: Extend radar event structure for ETSI chirp radar detection
The pulse_delta_peak of chirp radar is not zero, which is one more radar
detection rule for ETSI chirp. Driver need delta peak related information
from FW for ETSI chirp radar detection.

Two more fields pulse_delta_peak and pulse_delta_diff are added in
wmi_dfs_radar_event_fixed_param.

Change-Id: Ief8dbea1c1336f45a24195853d5e1356bf3cad27
CRs-Fixed: 2179933
2018-01-30 09:25:49 -08:00
Subhranil Choudhury
eea6738ef9 qcacmn: Move peer activity marking to a common place
Move the peer Rx activity to PPDU_stats_handler
which is common for both NSS offload and Host datapath modes.

Change-Id: I06c3dd14d117cc291e3b19076ddfc7f3be00e602
CRs-Fixed: 2176385
2018-01-30 05:39:07 -08:00
Pranita Solanke
a5a3ae721e qcacmn: Add support for Tx and RX Broadcast Packets
Add counters to display the broadcast packets on Tx and Rx side

Change-Id: I85bea07b83d34dc15b185297e7ec63208d8ab8e8
2018-01-30 05:39:04 -08:00
Zhang Qian
2e1a7bc65a qcacmn: Add wmi APIs to extract OCB events data
Add APIs to extract data from wmi event buffer for tlv interface.

CRs-Fixed: 2177557
Change-Id: I538c0a9ed4a1d8a4bd8845ab337b16370737ce44
2018-01-29 23:40:45 -08:00
bings
88486ab463 qcacmn: Fix delta peak number counting for DFS
Every time when dfs_count_the_other_delay_elements is called,
delta_peak_match_count is set to 1, which is not correct.

delta_peak_match_count should be initialized once like numpulses
in dfs_bin_pri_check.

Change-Id: I9cf432cbe7b0ddb42a0c33adcbef07d0c48f42f8
CRs-Fixed: 2165538
2018-01-29 21:37:41 -08:00
Zhu Jianmin
cb80e2f5d2 qcacmn: Fix scan node use after free issue
For each scan node in db, real delete should be called only once.
If 2 threads are trying to delete a note, only one thread should
mark it delete and decrement the ref count and the other thread
should return. or use after free happens as some other thread is
still using it.

Change-Id: I8cfaea73f28f31406816c9fb38f6b65f6b50428d
CRs-Fixed: 2169890
2018-01-29 15:43:06 -08:00
wadesong
4b3f37d7dc qcacmn: Stop touching HTC packet after it sent to CE
When HTC packet is sent to CE for physical tx, the tx compl
interrupt can get triggered very quickly, resulting the
HTC buffer being freed at a very early time. Any memory
access into the same HTC buffer after HTC tx compl returns
will be a use-after-free case.

Relocate all HTC packet touching code to places before
it gets populated to CE for tx.

Change-Id: I8bcac16566156104063013c7eb17b2f0debd32e6
CRs-Fixed: 2178880
2018-01-29 05:25:29 -08:00
Jiachao Wu
69a4679e57 qcacmn: Check NULL pointer before use it
Check NULL pointer before use it.

Change-Id: Id5b5d3ac38bffdbfee4463e93e3a586e9da1fac2
CRs-Fixed: 2177902
2018-01-29 02:17:49 -08:00
hqu
124b766d2e qcacmn: Use no_of_open_sessions to check multiple beaconing sessions
When start sap+sap with acs concurrently, the first sap usually
choose dfs channel, the second sap will be failed to start.
when check multiple beaconing sessions it only checks in_use sap for
pm_conc_connection_lis which means bss started sap while it has no
started sap at that time, so the second sap can't follow the first sap's
dfs channel and start failed according to current code flow.

Fix is to use no_of_open_sessions to check multiple beaconing sessions.

CRs-Fixed: 2170567
Change-Id: Iada737dffcd826aaff3873b81355018d53485948
2018-01-29 02:17:47 -08:00
Pamidipati, Vijay
aeff44499d qcacmn: Fix double memfree issue in MCAST2UCAST
Fix the condition check for return value in DP transmit path
for MCAST2UCAST

Change-Id: I81220838ce1c867afdab6447a30d7d7076f0c094
CRs-Fixed: 2164244
2018-01-27 09:21:41 -08:00
bings
9c524f5fc4 qcacmn: Restore WMI_DFS_RADAR_EVENTID for Rome FW
Currently WMI handler for WMI_PHYERR_EVENTID is used to handle DFS and
spectral scan phy errors; but Rome FW still uses WMI_PHYERR_EVENTID
and WMI_DFS_RADAR_EVENTID and does not have spectral scan phy errors.

Restore WMI_PHYERR_EVENTID and WMI_DFS_RADAR_EVENTID as Rome FW
requirement.

Change-Id: I16761f6da947619a5969ac8dcd09498d508ad715
CRs-Fixed: 2160954
2018-01-27 00:10:32 -08:00
bings
602a3588a9 qcacmn: Restore WMI_DFS_RADAR_EVENTID for Rome FW
Currently WMI handler for WMI_PHYERR_EVENTID is used to handle DFS and
spectral scan phy errors, but Rome FW still uses WMI_PHYERR_EVENTID
and WMI_DFS_RADAR_EVENTID and does not have spectral scan phy errors.

Restore WMI_PHYERR_EVENTID and WMI_DFS_RADAR_EVENTID as Rome FW
requirement.

Change-Id: I1bb4d6dcafc831f8ea45f0fa1646db47f291fabe
CRs-Fixed: 2160372
2018-01-27 00:10:30 -08:00
bings
ca90616ffa qcacmn: Restore WMI_DFS_RADAR_EVENTID for Rome FW
Currently WMI handler for WMI_PHYERR_EVENTID is used to handle DFS and
spectral scan phy errors; but Rome FW still uses WMI_PHYERR_EVENTID
and WMI_DFS_RADAR_EVENTID and does not have spectral scan phy errors.

Restore WMI_PHYERR_EVENTID and WMI_DFS_RADAR_EVENTID as Rome FW
requirement.

Change-Id: I23ca4ff6c9be0ba6a0f21f0e0ef9161b1942f629
CRs-Fixed: 2160431
2018-01-27 00:10:28 -08:00
bings
0344d1c399 qcacmn: Restore WMI_DFS_RADAR_EVENTID for Rome FW
Currently WMI handler for WMI_PHYERR_EVENTID is used to handle DFS and
spectral scan phy errors; but Rome FW still uses WMI_PHYERR_EVENTID
and WMI_DFS_RADAR_EVENTID and does not have spectral scan phy errors.

Restore WMI_PHYERR_EVENTID and WMI_DFS_RADAR_EVENTID as Rome FW
requirement.

Change-Id: I7a5c4f723bedfdeb477ac36ac1290809ca06fb13
CRs-Fixed: 2160418
2018-01-27 00:10:26 -08:00
Venkateswara Swamy Bandaru
faf9682f94 qcacmn: Add WMI Support for 11ax FW Scheduler API and Stats Per Peer
Add WMI support for enabling/disabling the FW scheduler APIs and stats
per peer for MU and OFDMA

Change-Id: I185ca6ff5b564fc9b83007fd4e37da82b5c9976e
CRs-Fixed: 2169179
2018-01-26 23:26:17 -08:00
nobelj
a78f35577e qcacmn: Add support for sending bigger chunk CTL table bin file
removing Length check temporarily
as existing length check is not applicable for HK.
In HK, CTL bin file size for 5G is 26556 bytes and
for 2G is 5852 bytes. 1.7K is the maximum payload size supported by TLV.
To support, we add header info: seq, endflag, total_len
before each chunks. Total bin files are transferred
as multiple chunks with header info on the top.

Change-Id: I7aedf85d6ee66a99cb4b6dca464dbe02caec371b
2018-01-26 19:25:40 -08:00
Kabilan Kannan
24895ade0c qcacmn: Increase the HTC control msg timeout
Firmware needs 6 seconds timeout for HTC control
messages.
Increase the HTC control message timeout to 6
seconds

Change-Id: I79a843afe028098a9cb7e98c274b54132357c76b
CRs-Fixed: 2170953
2018-01-26 17:21:04 -08:00
Venkateswara Swamy Bandaru
b2864fabe4 Revert "qcacmn: Mesh throughput enhancements"
This reverts commit I89ff27994477a5637979a9cd6a397286144b2535.

Change-Id: I7421f3572c46ed27a2d96724b2bbbe40c0704e5f
CRs-Fixed: 2177160
2018-01-26 09:20:39 -08:00