Commit Graph

7797 次程式碼提交

作者 SHA1 備註 提交日期
Karunakar Dasineni
6342933715 qcacmn: Support SW retries in Tx capture
Changes to include SW retries in Tx capture.

Change-Id: I2bee277107356a6dca6f8a6cc52cded73aca6c7a
2019-11-27 09:15:45 -08:00
Karunakar Dasineni
8e25a3077a qcacmn: Add qdf API to find last set bit
Add qdf wrapper for Linux fls() to find last set bit.

Change-Id: I089fee397d619515c768521bda1f4d4c35526fe0
2019-11-27 09:15:30 -08:00
Karunakar Dasineni
91da9dce36 qcacmn: QDF API for skb_copy_expand
Add QDF wrappers for skb_copy_expand

Change-Id: I401241259c87a067ed4773bee9fdfc7ee3cdcc23
2019-11-27 09:15:15 -08:00
Priyadarshnee S
8e626ee720 qcacmn: Fix memory corruption in DFS Random Channel Selection
With the introduction of 6GHZ and replacement of IEEE channel numbers
by frequency in DFS, "leakage_adjusted_lst" is now a pointer of type
uint16_t. Change the allocation size to take care of size of the new type.

CRS-Fixed: 2569329
Change-Id: I595bc77970a2758fd6ca66e53de6c0dbfe8843bc
2019-11-27 07:05:44 -08:00
Shashikala Prabhu
ae9e6c3f4e qcacmn: Add per chain NF variable to chan info event structure
Add per_chain_noise_floor variable to wmi_host_chan_info_event structure.

Change-Id: Iea594078aaa6d011f288bc970efcc143d6e99626
CRs-Fixed: 2561975
2019-11-27 07:05:27 -08:00
Chaithanya Garrepalli
b7796edd5b Revert "qcacmn: corrected the print statement"
This reverts commit I37a7c98eef6a8ad0b27541584927505ffc447cb2.

Reverting because below change address the compilation error
I4bb7bb14a2e521645be6e2677a44a78fa79fcb0b

Change-Id: Ib38276ab9974cf22486631f10ec345a629637b82
2019-11-27 07:05:15 -08:00
Uraj Sasan
4e893b176b qcacmn: Support WIN WLAN Single module
QCA_SINGLE_WIFI_3_0 directive is used to build
single wifi module, it is disabled by default.
This is intended for used in whunt case,the default
driver still uses separate spectral modules.

Change-Id: I6d0d66ade3784f7f4c0a3f322db2e79cbc246d56
2019-11-26 23:19:53 -08:00
Pragaspathi Thilagaraj
120b2490ec qcacmn: Add support for RSNX IE
SAE key derivation requires use of a secret element, PWE. This
element is deterministically discovered by repeatedly hashing
the password with some additional information until the
resulting hash is the abscissa of a point on the elliptic curve
(for ECC) or by exponentiating the hash digest to a constant to
produce an element (for FFC). This "hunting-and-pecking" loop
method is prone to side channel attacks.

To avoid this, a direct hashing to element technique in SAE is
introduced in IEEE P802.11-REVmd/D3.0. Support new RSNX IEEE
as part of the hash to element PWE derivation. The user space
sends the RSNX IE in the connect request.

Add support for new RSNX IE with element ID 244.

Change-Id: I61a40ff14e15612735c3f3750e2c47d764feeb62
CRs-Fixed: 2569600
2019-11-26 07:10:53 -08:00
Sourav Mohapatra
328db7c79c qcacmn: Add support to send/receive ani level command
Currently the driver doesnot support the sending and receiving of the
ani level from the firmware.

Add WMI and driver framework support to fetch the ani level.

Change-Id: Ib8271a2b7f62bafb22429113fbfb405cc81379ed
CRs-Fixed: 2554677
2019-11-26 05:31:17 -08:00
Alan Chen
337cb1cb88 qcacmn: Create set_desc_flags() to set desc->flags conditionally
Kernel 5.2 onward has removed the flags variable from the shash_desc
struct. Create a new function set_desc_flags() to set the desc->flags
variable conditionally for kernel versions older than 5.2.

Change-Id: I2c9b9b00147beff8600fbc9149594c11bb403a66
CRs-Fixed: 2559017
2019-11-26 05:31:02 -08:00
Alan Chen
2a25844f08 qcacmn: Add conditional macro for tracing threads
Kernel 5.2 has removed the stack_trace struct and replaced
print_stack_trace() and save_stack_trace_tsk() with stack_trace_print()
and stack_trace_save_tsk() respectively. Add a conditional preprocessor
directive to use save_trace_print() and stack_trace_save_tsk() and call
them with the appropriate updated parameters.

Change-Id: I99643e1b93251de7453f511d13f5a4a39c56f99c
CRs-Fixed: 2559033
2019-11-26 05:30:56 -08:00
Surya Prakash Raajen
507b75ac5c qcacmn: Fix replenish size for monitor buffers during attach
Head_pointer == Tail_pointer is treated as ring empty and
Tail_pointer + 1 == head_pointer is treated as ring full,
hence replenish count should be num_entries-1 to avoid
buffer ring treated as empty or full.

Change-Id: I157834a86380bcd2f03679510357ad3ca5550374
CRs-Fixed: 2569491
2019-11-26 04:03:33 -08:00
nobelj
1063ea0420 qcacmn: Fix nss, ru size and initialize ofdma info valid bit for UL OFDMA
add 1 to nss value received from software response reference pointer.
ofdma_info_valid bit need to set zero.
populate ru_size from software response reference pointer.

Change-Id: Iea2019211902a468d8fd180423b3dedb4c04ce41
2019-11-26 02:16:36 -08:00
Alok Kumar
4c23054e43 qcacmn: Add support for DataStall Events
Register and de-register DataStall callback which posts
DataStall Events.

Change-Id: I078e34b0d476c350f175b797fd54a79789ca56f5
CRs-Fixed: 2561193
2019-11-26 02:16:17 -08:00
Edayilliam Jayadev
52c9b9fe51 qcacmn: Hard code properties of Spectral parameters
Till a FW advertisement which specifies the properties of
Spectral parameters is in place hard code these values
in driver.

CRs-Fixed: 2569385
Change-Id: I02c042946ff30771df6a66f49004c01aa5d53ac0
2019-11-26 02:15:52 -08:00
syed touqeer pasha
15f8f4c23f qcacmn: Qcn9000 packet tlv field access
Qcn9000 functions to access fields in per packet tlv.

Change-Id: I4751514c6f6d288354e3f220017cc27b6a4f393e
CRs-fixed: 2552619
2019-11-26 02:15:35 -08:00
Nandha Kishore Easwaran
bcf953583a qcacmn: Use multi window write and read for pine
Write into hal register using three floating windows instead of one.
This change is done to avoid frequent window changes for writing into
DP and CE registers. Instead 3 windows are used. One window is statically
mapped to CE block and another window is mapped statically to DP block.
Due to this design there is no need to change the window register to
write into these blocks and write can be done on corresponding window
with single iowrite32. Similar loginc is used for ioread32.

Also modified the hp_addr and tp_addr in initialisation stage so that
hal_write will not have multiple if checks.

Change-Id: Ibb99ec4da7f63323082e46a28afbe90e1f555545
CRs-fixed: 2507441
2019-11-26 02:15:26 -08:00
Venkata Sharath Chandra Manchala
2b0d3f38d5 qcacmn: Support force wake request
1. Add hif_force_wake_request API to wake the
mhi and umac before reading/writing the memory region
greater than BAR+4K.
2. Add hif_force_wake_release API to release the
PCIE_PCIE_LOCAL_REG_PCIE_SOC_WAKE_PCIE_LOCAL_REG so the
umac can power collapse again at a later point of time.
3. Add pci stats to dump the force wake status.

Change-Id: Ic6d5463ea0cdb28d9144be61da55e43033b53298
CRs-Fixed: 2478052
2019-11-26 02:15:13 -08:00
Wu Gao
a32b831887 qcacmn: Not register spectral to dbr when load wlan
When loading wlan host, memory alloc takes too long when registering
spectral to direct buffer rx component and affect wmi ready event
handling. So avoid to register spectral to dbr when loading wlan.

Change-Id: If48aab2cf424c41af1427f350734690918291d69
CRs-Fixed: 2558477
2019-11-25 16:15:44 -08:00
Alan Chen
4f3f01b122 qcacmn: Replace skb_frag_struct pointer with skb_frag_t
skb_frag_t typedef was modified in kernel version 5.4. Change code to
use the typedef rather than the underlying type so that the same code
will be built on both 5.4 and pre-5.4 kernels.

Change-Id: Id491ab5edf0dec7cd09426d6c6b0a607ff66b66f
CRs-Fixed: 2559037
2019-11-25 16:15:31 -08:00
Arun Kumar Khandavalli
f1c4834611 qcacmn: Define unknown vdev mlme type subtype
If any of the driver unknown mode is passed to the utility api's
return the unknown vdev mlme type/subtype.

Change-Id: I8be1c9f31fb3a8a355185e14ef6869da84cf863f
CRs-Fixed: 2564964
2019-11-25 13:44:10 -08:00
bings
9e8041d13c qcacmn: Ignore pre pri check for staggered pulses
There may be 3 different kinds of pris in staggered pulses. If one
of them is selected as reference pri, the other two pris fail the
pre pri check, then *prev_good_timestamp can't be updated at this
time. Even the next search pri has correct pri, it can't pass the
check of dfs_check_pulses_for_delta_variance because of previous
good timestamp.

Ignore pre pri check for staggered pulses, update *prev_good_timestamp
correctly.

Change-Id: I5ce95c6c1f899f29e6b4d0d83e8171d22c31fc5c
CRs-Fixed: 2556581
2019-11-25 13:43:58 -08:00
hqu
71bd0b5f06 qcacmn: Convert SME code legacy channel ID usage
Add op_freq for structure host_log_ibss_pkt_type and
host_event_wlan_connection_stats.

Change-Id: Ic676ac586220489301258f3027527e2df75ba3e1
CRs-Fixed: 2554199
2019-11-25 13:43:45 -08:00
Amar Singhal
7defbc9a07 qcacmn: Call channel change callback in regulatory_pdev_open
During pdev create callback, pdev reference cannot be taken. Hence,
channel change callbacks cannot be called during pdev create. So
call the callbacks during regulatory_pdev_open. Also dont check
if regulatory_pdev_open fails.

Change-Id: I9d444f952418be983e4ac2182581d03bba02b198
CRs-Fixed: 2572487
2019-11-25 02:34:04 -08:00
Sandeep Puligilla
e903f492d1 qcacmn: Update scan copy data API for RNR IE
Update Scan copy ie data API for RNRIE and MUEDCA IE

Change-Id: I1aa1acc3f921c10af2b2de0926f69542402da285
CRs-Fixed: 2566644
2019-11-24 22:35:51 -08:00
Sandeep Puligilla
d763fee333 qcacmn: Add support for 6GHz scan priority algorithm
Add support for 6Ghz scan channel list priority algorithm.

Change-Id: I63b0ddf384c4bd62a6a25feb7dfe4f80b5f85fbe
CRs-Fixed: 2564949
2019-11-24 22:35:35 -08:00
Alan Chen
76036f10e7 qcacmn: Add conditional macro for arch_counter_get_cntvct()
Kernel 5.2 onwards calls __arch_counter_get_cntvct() instead of
arch_counter_get_cntvct(). Add conditional preprocessor directive to
use the appropriate function call for the correct kernel version.

Change-Id: I86041fdfd36f0c4522397f632910cdaa26780035
CRs-Fixed: 2558917
2019-11-24 22:35:21 -08:00
Alan Chen
1e9c5f488d qcacmn: Replace get_monotonic_boottime() with ktime_get_boottime()
get_monotonic_boottime() and similar functions have been replaced with
ktime_get_boottime() in newer driver versions. Change the calls to
get_monotonic_boottime() in the qdf wrapper to ktime_get_boottime().

Change-Id: I066ffbbcb3a51f8a080fd445397be028ee73ab2e
CRs-Fixed: 2558910
2019-11-24 22:35:16 -08:00
Rakesh Pillai
eee5d783b7 qcacmn: Skip enable/disable autonomy in SSR case
In case of SSR, the host driver is not supposed to
access any of the UMAC registers. The disable or
enable of autonomy during SSR can cause an invalid
access to the REO registers.

Avoid the REO registers access during SSR case.

CRs-Fixed: 2563761
Change-Id: I7e260c2894d8254eafba7038bc2677b52b6eba85
2019-11-22 04:13:00 -08:00
Jinwei Chen
490e7fd6b4 qcacmn: fix dp_vdev use after free caused by racing condition
crash scenario:
a. dp_peer_unref_delete remove peer from vdev->peer_list.
b. dp_vdev_detach_wifi3 skip setting vdev->delete.pending as
   vdev->peer_list is empty, dp_vdev is freed.
c. dp_peer_unref_delete still try to access dp_vdev after first
   peer_ref_mutex released, invalid accessing happened.

solution:
a. Get vdev member like vdev->delete.pending flag within
   first peer_ref_mutex in dp_peer_unref_delete to avoid vdev freed.
b. Separate dp_reset_and_release_peer_mem function into two function
   dp_vdev_reset_peer/dp_peer_release_mem, dp__vdev_reset_peer
   will be invoked within first peer_ref_mutex. after first
   peer_ref_mutex is released, invoke dp_peer_release_mem since dp_soc
   ->cdp_soc.ol_ops->peer_unref_delete should be outside of
   peer_ref_mutex in case deadlock issue reported from WIN.

Change-Id: I90f3b139030c5ce399d85723ae4f67ce0faf4b28
CRs-Fixed: 2568256
2019-11-22 00:27:54 -08:00
Amir Patel
a1a4fe1417 qcacmn: Update avg_rssi with per_pkt_rssi + per_bw_offset
Currently for averaging rssi we do not add per_bw_offset to SNR,
add per_bw_offset value to SNR to compute avg_rssi

Change-Id: I451f90e5794235c7466f3c4f1850df246e719d0a
2019-11-21 09:13:45 -08:00
Amir Patel
fea17f4d75 qcacmn: Free status buffer queue at proper place
Currently after disabling mcopy mode, remaining status
buffers are not freed, free status buffers at proper place

Change-Id: I4a04a7ab58771ce1dd21f3ee08b42589f312eb76
2019-11-21 07:49:03 -08:00
Vevek Venkatesan
2cc8c5d14d qcacmn: cdp: Converge cdp_ipa_ops
Currently cdp ops are given pdev/vdev/peer
handle as its arguments, which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles if it has been deleted in parallel.

Hence as a part of cdp convergence, pass only
the pdev_id or vdev_id or peer mac address,
which will be used to get the respective handles,
and hence avoiding the unwanted access of the
handles if it has been deleted.

- ipa_get_resource
- ipa_set_doorbell_paddr
- ipa_set_active
- ipa_register_op_cb
- ipa_get_stat
- ipa_tx_data_frame
- ipa_uc_get_share_stats
- ipa_uc_set_quota
- ipa_enable_autonomy
- ipa_disable_autonomy
- ipa_setup
- ipa_enable_pipes
- ipa_disable_pipes
- ipa_rx_intrabss_fwd

Change-Id: Ieb7e48d11a69a1e4a92a7114042b1db72d5f4b65
CRs-Fixed: 2540862
2019-11-21 06:13:07 -08:00
Rakesh Pillai
1d4d12e0e9 qcacmn: cdp: Convergence of cdp_bus_ops
Currently the cdp apis are given pdev/vdev/peer
handle as its arguments, which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles, if it has been deleted in parallel.

Hence as a part of cdp convergence, pass only
the pdev/vdev id or peer mac address, which will be
used to get the respective handles, and hence
avoiding the unwanted access of the handles, if
it has been deleted.

Converged bus_ops
- bus_suspend
- bus_resume

CRs-Fixed: 2539826
Change-Id: Id4d6ba16beae89f4052e72024ef8ce891ea33715
2019-11-21 06:12:58 -08:00
Vevek Venkatesan
dc1517ec8c qcacmn: cdp: Converge cdp_pmf_ops
Currently the cdp apis are given vdev/peer
handle as its arguments, which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles if it has been deleted in parallel.

Hence as a part of cdp convergence, pass only
the vdev_id or peer mac address, which will be
used to get the respective handles, and hence
avoiding the unwanted access of the handles if
it has been deleted.

- get_pn_info

Change-Id: I410938ed4c3878baa725b6fe3a785cbb99d5fdf4
CRs-Fixed: 2540837
2019-11-21 06:12:48 -08:00
Rakesh Pillai
d295d1e81d qcacmn: cdp: Convergence of cdp_misc_ops
Currently the cdp apis are given pdev/vdev/peer
handle as its arguments, which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles, if it has been deleted in parallel.

Hence as a part of cdp convergence, pass only
the pdev/vdev id or peer mac address, which will be
used to get the respective handles, and hence
avoiding the unwanted access of the handles, if
it has been deleted.

Converged misc_ops
- tx_non_std
- get_opmode
- get_tx_ack_stats
- set_ibss_vdev_heart_beat_timer
- hl_tdls_flag_reset
- set_wisa_mode
- txrx_post_data_stall_event
- update_mac_id
- pkt_log_init
- pkt_log_con_service
- get_num_rx_contexts
- set_wmm_param
- flush_rx_frames
- bad_peer_txctl_set_setting
- bad_peer_txctl_update_threshold
- txrx_data_stall_cb_register
- txrx_data_stall_cb_deregister
- vdev_set_driver_del_ack_enable
- get_intra_bss_fwd_pkts_count
- mark_first_wakeup_packet
- register_pktdump_cb
- unregister_pktdump_cb
- pdev_reset_driver_del_ack
- runtime_suspend
- runtime_resume

CRs-Fixed: 2539811
Change-Id: I3080df033d6411d7078a322224b914bda2fddc0e
2019-11-21 06:12:31 -08:00
tinlin
aae613c904 qcacmn: Convert legacy channel usage
Modify the following API's code and parameters to make
sure it is using frequency instead of channel:

	csr_update_scan_entry_associnfo

Change-Id: Id289c2bd2e2cdf3f6a5e16028bbafb3df4049dac
CRs-Fixed: 2563874
2019-11-21 00:45:37 -08:00
Edayilliam Jayadev
f3cc90e236 qcacmn: Check aSpectral capability for current chainmask
Reject Agile Spectral scan request if the current chainmask
doesn't have Agile capability.

CRs-Fixed: 2565027
Change-Id: I0ac79f9846ef015ec16500ae29528c8e5d03da3e
2019-11-20 10:44:54 -08:00
Chaithanya Garrepalli
60a154f99e qcacmn: corrected the print statement
Corrected print statement to dump AST entries

Change-Id: I37a7c98eef6a8ad0b27541584927505ffc447cb2
2019-11-20 05:51:46 -08:00
Amar Singhal
8e992e56f0 qcacmn: Add check for regulatory channel list
Regulatory module calls registered callbacks when channel list is changed.
But channel list may not have been received when path for callbacks is
reached. So keep a track if channel list has been received. If not, do
not call the callbacks.

Change-Id: I2e1a6e442b0d5c79e786806e00b1c50c9491dae0
CRs-Fixed: 2563759
2019-11-19 22:33:26 -08:00
Sravan Goud
3af8bd05e8 qcacmn: Increase the napi scale for slub debug builds
UMAC reo full condition is seen in slub debug builds in case of
DL throughput traffic. This is due to host process only 64 packets
per NAPI schedule in case of slub debug builds where in case of
perf builds budget is of scale 4 times. Also the time between two
napi schedules is in order of milliseconds which accounts for the
delay of host reo ring processing. So increase the napi budget
scale to 3 times which make sures host process enough packets per
napi schedule.

Change-Id: I3e134f31277a72056f3d7d5433ed1adeefa433fa
CRs-Fixed: 2563595
2019-11-19 16:55:09 -08:00
Christopher Chopp
643f7eca34 qcacmn: Add Debug Print for 160MHz TX/RX MCS NSS Check
This print is a debug measure that addresses an issue where the
HE MCS NSS Map is set to an invalid value. Although rate checks
exist already which take corrective action, this proactive print
adds information useful for addressing corner cases should
they appear.

CRs-Fixed: 2554277
Change-Id: I8e770639472409d96654dc8652ea8c9d210c4965
2019-11-19 14:44:54 -08:00
Vivek
f011832a65 qcacmn: Update blocking command flags atomically
When moving a blocking command from pending to active queue,
we release the lock and call the activation cb.
After the activation cb returns, we update the blocking cmd
waiting flag based on the active cmd node's "is_blocking" param.

If the activation cb is also resulting in removing the command,
then after the cb returns, the active cmd node is returned to the
free pool and our check fails, and we miss to update the blocking
cmd waiting flag, resulting in no further commands moving to the
active queue.

The update to the blocking command should be done atomically,
immediately after it moves to active queue and before releasing
the lock for the activation callback.

Change-Id: Idedccb16ce68bb2166fb3970cd231fe738ec6af2
CRs-Fixed: 2554767
2019-11-19 13:05:08 -08:00
Tushnim Bhattacharyya
3077301bb2 qcacmn: Replace channel ID with channel frequency
Replace channel ID with channel frequency in
wlan_cfg80211_is_chan_ok_for_dnbs.

Change-Id: I0e275da65258f87abfc36d6c9148f9f4437a4389
CRs-Fixed: 2552022
2019-11-18 21:24:51 -08:00
Jinwei Chen
08de3a02e5 qcacmn: add debugging code to detect duplicated hash_node
One hash_node is still left in hash bucket list while the memory
has been freed by normal operation, suspect that maybe two same
hash_node is existed in hash bucket list before, add debugging code
to detect this problem earlier.

Change-Id: I1497ae29c0e09e35dc140c7c37e228e02eb000e4
CRs-Fixed: 2562952
2019-11-18 20:00:15 -08:00
Ashish Kumar Dhanotiya
b5cc4988ce qcacmn: Update regdb based on database version 30
Update regdb with QCA regulatory database version 30 with following
changes:

1. Change APL11 and APL19 RD defs to FCC Radar Patterns.
2. Change 2g reg domain for Argentina to ETSIC
3. Change 5g reg domain for Argentina to APL16 for WIN and
APL17 for MCL and DSRC.
4. Change 2g reg domain for Indonesia to ETSID
5. Change APL2 power to 20.
6. Change Radar detection pattern for APL11 to FCC
7. Change CTL for APL14 to MKK
8. Change Radar detection pattern for APL19 to FCC
9. Add new reg domain APL24
10. Change ETSID power to 20.
11. Add full reg domain APL2_ETSID
12. Add full reg domain APL16_ETSIC
13. Add full reg domain APL17_ETSIC
14. Add full reg domain APL24_ETSIC

Change-Id: I8ce9696caefee89a9ab5606667c1619634e248c5
CRs-Fixed: 2548580
2019-11-18 16:05:37 -08:00
Gurumoorthi Gnanasambandhan
f336902021 qcacmn: Rewrite util_gen_new_bssid functionality
qdf_do_div is not helping  for modulo operation and always returns 0 in
32 bit image resulting in same base BSSID is always returned for all
the VAP's.With 64 bit image no issues are seen.

Change-Id: I50e500f57713ce080447b9a5cb1e615018222adb
CRs-Fixed: 2565183
2019-11-18 14:09:18 -08:00
Venkata Sharath Chandra Manchala
74a2f413df qcacmn: Increase the force wake timeout
Increase the force wake timeout to 100ms for
debug builds as mhi requires 100ms to
wake up.

Change-Id: Ida0b1287a86a5a97fd2d9c80fee4e677eea86cbe
CRs-Fixed: 2552815
2019-11-18 10:33:26 -08:00
Rakesh Pillai
3f13c071b9 qcacmn: Fix compilation errors in DP_PRINT
Fix compilation error in DP_PRINT which is
seen when compiled for lithium datapath.

CRs-Fixed: 2567068
Change-Id: I4bb7bb14a2e521645be6e2677a44a78fa79fcb0b
2019-11-18 10:33:17 -08:00
Jianmin Zhu
69560e37c6 qcacmn: Replace chan list with freq list in struct scan_filter
To support 6G, replace chan id with frequency.
Replace channel_list and pcl_channel_list with
chan_freq_list and pcl_freq_list in struct scan_filter.
Change API scm_get_pcl_weight_of_channel to use freq.

Change-Id: I6e880986fb2dcb1fa7aa4f40d2e3f849e7e3af64
CRs-Fixed: 2561234
2019-11-18 10:33:09 -08:00