提交图

7985 次代码提交

作者 SHA1 备注 提交日期
Rakesh Pillai
30294e2c79 qcacmn: Skip setting BA window size to 2 for NON BA case
As per the REO logic, if a packet is received with
SN <= current SN, then it will be treated as a 2K jump
error or OOR and the packet in consideration will be
dropped by REO. For NON-BA case this case will be
treated as 2k-jump error.

For the NON-BA case, the packets with SN <= current SN
should not be dropped.
The current REO configuration, sets the BA window size
to 2 for NON-BA case, which in turn enables 2k-jump
detection.

For configuring the REO to not drop packets with previous
SN, we need not set the BA window size to 2, thereby
disabling the 2k-jump check for NON-BA case.

A. SN = 1, 2, 3, 4, 2096, … 
   (good case, as long as the SN is within 2K range)
B. SN = 3, 5, 2
   (3, 5 are good packet, 2 is bad packet and will
   be dropped to ‘2K error’ with error code = 2K error.)
   (note that this is for non-BA session, for BA session,
    we detect SN as either
   2K error or OOR error based on SN and window size).
After this change, we will treat this as a good packet.

C. SN = 1, 1, 1, 1, with duplicate detect enabled – these are duplicate
                    packets and will be dropped to ‘DD queue’ with
                    error code = DD
(No change)

D. SN = 1, 1, 1, 1, with duplicate detect disabled – packets will be
                    dropped to ‘2K error’ with error code = 2K error.
After this change, we will treat this as a good packet.

Skip the setting of BA window size to 2 for aggregated
packets in NON BA case.

CRs-Fixed: 2580605
Change-Id: I19d5eced7c8730a9c3820fd6fc69923d2a98263a
2019-12-12 06:33:55 -08:00
Vignesh U
8fd74a017d qcacmn: Add a new DFS domain for Japan (MKKN)
Introduce a new DFS domain MKKN that supports new w53 Japan RADAR
pattern only.
Initialize a new empty RADAR table dfs_mkkn_radars for MKKN DFS domain.
Map The 5G regdamain MKK17 to the new DFS domain MKKN to make sure that
the new w53 Radar pulses should be detected only by JP country or
MKK17 5G regdomain.

Change-Id: Ib0f6a7e98353c9930e90703ead2342b932e491e3
CRs-Fixed: 2575347
2019-12-12 18:19:38 +05:30
Jinwei Chen
3172ed4419 qcacmn: degrade log level in monitor dst processing
Degrade log level from ERROR to INFO_HIGH to prevent excessive
logging into dmesg console.

Change-Id: Ic0ef72cf2564ed2354b3db4d6e09e7ac7c832560
CRs-Fixed: 2582400
2019-12-12 18:17:36 +05:30
phadiman
a73cc69157 qcacmn: Fix pool alloc issue in detach path
Memory is freed and allocated only during
wifi load and unload in case of WIN and not
during wifi up/down

Calling dp_tx_soc_detach unconditionally
was leading to memory free in wifi down
path and when wifi up was issued the
memory which was freed was never allocated

Call dp_tx_soc_detach conditonaly only for
MCL in dp_soc_cmn_cleanup and for WIN in
dp_soc_detach using dp_soc_reinit flag which 
is set for WIN during wifi unload

Change-Id: I9da34f7945d65a34e719c7db58da13e85ae3d228
2019-12-12 18:15:18 +05:30
Edayilliam Jayadev
b3a66311cc qcacmn: Add Agile channel width to SAMP message
Add a new member to SAMP structure describing the channel width of
Agile Spectral scan.

Change-Id: Ib27fe9ed63bf8f89c59762150fb58943e6bcf7ea
CRs-Fixed: 2582670
2019-12-12 18:14:27 +05:30
Ashish Kumar Dhanotiya
6078a89c07 qcacmn: Add support for oem data event
Currently use of comamnd QCA_NL80211_VENDOR_SUBCMD_OEM_DATA
is to pass data blobs from Application to FW but there is
no mechanism to send the data blobs from FW to Application.

To meet the above requirement update the usage of existing
OEM DATA command to use it as a vendor event as well to
send data blob from host to Application.

Change-Id: I8df98f850f4dd56f55dba43c5364a52c425ba9ed
CRs-Fixed: 2573468
2019-12-11 16:12:28 -08:00
Hariharan Basuthkar
45ac9f5bf7 qcacmn: Remove unused API in the regulatory component
Remove the unused API wlan_reg_get_5g_bonded_channel_and_state in the
regulatory component

Change-Id: I45c9b083dfb6faf6c97293d54200ed4f15a7d289
CRs-Fixed: 2574154
2019-12-11 06:28:48 -08:00
Linux Build Service Account
42992cd389 Merge "qcacmn: populate qos_null in rx state" 2019-12-11 03:52:31 -08:00
Linux Build Service Account
5dcd71e7eb Merge "qcacmn: Add support for WMI_ROAM_STATS_EVENTID event" 2019-12-11 03:52:31 -08:00
Linux Build Service Account
c75fdb7ba2 Merge "qcacmn: Decoupling changes for stats, wds, raw and pflow ops" 2019-12-11 03:52:31 -08:00
Ruben Columbus
fadeef890b qcacmn: populate qos_null in rx state
sw_frame_group_id decides process for frame. USER_STATS tlv case uses
sw_frame_group_id to add qos_null frame control to rx_status.

Change-Id: Ia3da8dbe4fc4c2d0f21fa8864e6b4e87170ba8f6
2019-12-11 00:19:50 -08:00
Pragaspathi Thilagaraj
ab6b497e6d qcacmn: Add support for WMI_ROAM_STATS_EVENTID event
After every roam happens or when neighbor report is sent by the
firmware, it sends the WMI_ROAM_STATS_EVENTID to host.

Add support to handle WMI_ROAM_STATS_EVENTID event from target
after every roam.

Change-Id: I4474135ac64ebfb17109d503fbd1c3d637457a73
CRs-Fixed: 2576258
2019-12-10 19:40:49 -08:00
Pavankumar Nandeshwar
e54c584723 qcacmn: Decoupling changes for stats, wds, raw and pflow ops
Change cdp_host_stats_ops, cdp_wds_ops, cdp_raw_ops
and cdp_pflow_ops APIs to replace pdev, vdev and peer
dp handles with pdev_id, vdev_id and peer mac address
along with dp soc handle.

Change-Id: Ia956882535cc04e57a006905d46ccfe9d95bb731
2019-12-10 19:40:36 -08:00
Jeffin Mammen
084f936b71 qcacmn: Correct message in backpressure event
Correct the debug message to print the appropriate
ring id when backpressure events are reported

Change-Id: I4cb2af9c802469ecd0c38bdd3789439048de876f
CRs-Fixed: 2556208
2019-12-10 04:21:43 -08:00
Abhinav Kumar
04b61d6e39 qcacmn: Get the valid vdev in get_vdev_by_macaddr_from_pdev
In wlan_objmgr_get_vdev_by_macaddr_from_pdev driver checks the
first vdev matching the mac address and try to get ref and return
NULL if it fails.

In case if a vdev is logically deleted but not physically deleted
(some ref are pending) and a new vdev is added with same mac address
at the tail of the vdev list, the
wlan_objmgr_get_vdev_by_macaddr_from_pdev always return NULL cheking
for the logically deleted vdev, even when a valid vdev is present
after the logically deleted vdev.

Thus continue to next vdev if try get ref fails for the vdev.

Change-Id: Icd67ce8830460fca7bb4c19e81b2e9f764fb5dba
CRs-Fixed: 2580697
2019-12-10 00:51:59 -08:00
Abhinav Kumar
4c3c73a375 qcacmn: Remove unused serialization API
Remove unused serialization API
wlan_serialization_get_active_list_count.

Change-Id: I80c1cd5693fb3dda91ffd7de01c1df244e648135
CRs-Fixed: 2580681
2019-12-10 00:51:51 -08:00
Shashikala Prabhu
1e7bd262fd qcacmn: Add restricted 80+80 MHz bit in soc caps
Restricted 80+80 MHz  capability is reported by FW in service bitmap.
Based on this support set soc's extcap feature bit.

Please note, wmi_service_bw_165mhz_support will be renamed as
wmi_service_restricted_80p80_support once the FW changes are available.

Change-Id: I88f89eecd916c40ea8669c792dde3a335e4bac56
CRs-Fixed: 2579543
2019-12-10 00:51:42 -08:00
Alok Kumar
628c21c08e qcacmn: Add INI parameters for packet capture mode support
Add INI parameters for packet capture mode
pktcap_mode_enable - control to enable or disable support for
packet capture mode.
pktcapture_mode - control to set value for packet capture mode

Change-Id: Id0ffe4cf19db6ec5823a37083d9d8ee1cfe53e77
CRs-Fixed: 2528427
2019-12-10 00:51:28 -08:00
Priyadarshnee S
fe5117b731 qcacmn: Map JAPAN15 to MKK17_MKKC
Map JAPAN15 to MKK17_MKKC to be in consistent with FW mapping.

CRs-Fixed: 2578832
Change-Id: I74c38333bd3c31990647329a909c04c848b14a51
2019-12-10 00:51:13 -08:00
Gerrit - the friendly Code Review server
a44bac6776 Merge changes into wlan-cmn.driver.lnx.2.0 2019-12-10 00:09:05 -08:00
Alok Kumar
a316b315d8 qcacmn: Protect pktlog under mutex to avoid possible race conditions
Protect pktlog funcitonality under given mutex to avoid possible
race condition between pktlog_release/pktlog_open and pktlogmod_exit.
Also call pktlogmod_exit before calling wdi_event_detach to avoid
accessing freed memory in pktlog release.

Change-Id: I5ca4b304d0f4dc1af289daa167958d5b773d9a6e
CRs-Fixed: 2578623
2019-12-09 23:04:45 -08:00
Sandeep Puligilla
19ba060714 qcacmn: Enhance scan debug log
Enhance scan debug log to capture
dwell time for different bands and
capture more information from scan
request.

Change-Id: Ib7af7c1841d0276da884eb30a2c2cf0aaedf4407
CRs-Fixed: 2575569
2019-12-09 23:04:31 -08:00
Hariharan Basuthkar
379ebfe4e3 qcacmn: Use channel frequency instead of channel number
1) Add the API wlan_reg_get_5g_bonded_channel_and_state_for_freq
   that returns  the state for a 5G or 6G channel frequency,
   based on the channel width and and state of the bonded channels.

2) In the API target_if_calculate_center_freq, remove the instances
of IEEE channel number, and provide regulatory support, with the
channel frequency based structure - bonded_channel_freq and the API -
wlan_reg_get_5g_bonded_channel_and_state_for_freq.

3) Remove the usage of band_info and replace it with reg_wifi_band within
the target_if of the spectral module.

Change-Id: If5108b55097208d33fafb48968ea8b6dc83011fa
CRs-Fixed: 2571906
2019-12-09 20:38:52 -08:00
Tiger Yu
1e974a9312 qcacmn: Reset ba_status to inactive irrespective of tid update status
Reset ba_status to inactive irrespective of tid update status to make
sure the ba_status reset successfully.

And also use pe_err_rl instead of pe_err to avoid excessive logging.

Change-Id: Ifc6adc166b5093742b34dd7d74924f9d54146ea4
CRs-Fixed: 2577663
2019-12-09 20:38:41 -08:00
Vignesh Mohan
2220048ec2 qcacmn: enable the NOL channels in regulatory after NOL reset
Before mode switch command is sent to firmware, the NOL channels are
reset. But the regulatory channel structure for these corresponding
channels are still disabled. After mode switch response, when
the new umac channel list is built, these channels are still marked
as disabled in regulatory, which results in the umac channel list
not having these channels at all.

Re-enable the NOL channels in the regulatory channel list after
NOL reset.

Change-Id: Ifad8ec7a5be53e061045c068f9a6bfc313d4985c
CRs-Fixed: 2580403
2019-12-09 18:58:06 -08:00
Pooventhiran G
9a1b59247c qcacmn: Reset keys to zero after use
In functions that use key values, reset the local variables (key) to
zero after use to avoid security vulnerability.

Change-Id: I105b1abf7c707102ef99bbe4fa213708039d933e
CRs-fixed: 2581402
2019-12-09 18:57:51 -08:00
Alok Kumar
3d15ae8780 qcacmn: Define CDP Ops for packet capture mode
Define CDP Ops for packet capture mode

Change-Id: If08191f47060210f4340940d01be8eb2cf8cc426
CRs-Fixed: 2528432
2019-12-09 17:29:15 -08:00
Srinivas Pitla
8e869fff23 qcacmn: Define Peer free notification framework
Define framework to notify registered callbacks on peer freed.
Interested modules can register their callbacks with object manager.

Change-Id: I9ab0e45f7841b1609b9ada3b50335299b462b630
CRs-Fixed: 2578099
2019-12-09 17:29:02 -08:00
Venkata Sharath Chandra Manchala
55299c2b91 qcacmn: Increase reo timer threshold max value
Reo timer threshold is set to 512us as a default so
increase the maximum value of timer threshold to 512us
to avoid out of bound value.

Change-Id: I291e80e5930b2d3537cbbc9716b323aeb6be89c3
CRs-Fixed: 2571639
2019-12-09 15:59:10 -08:00
Rajeev Kumar
ff153cc83d qcacmn: Add kernel version check for set_wake_up_idle
set_wake_up_idle together with PF_WAKE_UP_IDLE is removed from
kernel 5.4 and hence kernel version check to avoid compilation
issues with 5.4 kernel.

Change-Id: If44e275eed1d639d90fc7fb4c93a5a2386ffba15
CRs-Fixed: 2580955
2019-12-09 15:58:54 -08:00
Abhijit Pradhan
a305445a5f qcacmn: Control the size of the freq and chan_num (QDF)
Depending on the requirement, a bigger size or a smaller size for
the frequency variable can be chosen. The advantages of each size
are described below:

Advantage of a bigger size:
When two technologies (e.g. 802.11AX and 802.11AD) are controlled
by the same driver software, the frequency range may be very large
and a bigger size (e.g. 32bit integer) is more appropriate.

Advantage of a smaller size:
When the frequency range is not very large, a smaller size
(e.g. 16bit integer) can be used. It saves a large amount of space
especially when many large arrays containing elements of this
type/size are defined in the driver.

Change-Id: I6c8fb2a4dc117e2535ef96009362923557cee398
CRs-Fixed: 2570456
2019-12-09 05:20:43 -08:00
Pragaspathi Thilagaraj
4715adc0f1 qcacmn: Fix zero size malloc when memory debug is disabled
In SLUB disabled builds, the qdf_mem_malloc calls the
qdf_mem_malloc_fl function which doesn't
validate if the size provided is 0 and returns the value
ZERO_SIZE_PTR(((void *)16)) for the pointer. When this pointer
is dereferenced, it causes invalid address dereference.

Validate if the size parameter provided to qdf_mem_malloc is
0 or greater than QDF_MEM_MAX_MALLOC. Return failure if the
validation fails.

Change-Id: I8fc6bc796847e9dd3dfd5186b0386d323560d0cf
CRs-Fixed: 2571505
2019-12-09 05:20:25 -08:00
Jinwei Chen
9012d61d31 qcacmn: fix invalid accessing to rx_desc_status pool
crash scenario:
a. pktlog is enabled, the timer mon_reap_timer is active,
   reap mon_status_ring hal desc periodically.
b. rx_desc status pool is freed in dp_rx_pdev_mon_detach() when do
   dp_pdev_deinit() while the mon_reap_timer is still active until
   dp_rxdma_ring_cleanup() free it.
c. during the timeslot between dp_rx_pdev_mon_detach() and
   dp_rxdma_ring_cleanup(), if some hal desc is pending to be
   processed on mon_status_ring, invalid accessing to rx_desc_status
   pool happened.

solution:
  if pktlog is enabled, stop mon_reap_timer ahead of
dp_rx_pdev_mon_detach() in dp_pktlogmod_exit().

Change-Id: I91b16a88a5e4390587925d6eb2840b3ec1ec2187
CRs-Fixed: 2579817
2019-12-09 01:31:20 -08:00
Jianmin Zhu
6aded3fc94 qcacmn: Redefine channel frequency MACRO as public
Move MACRO definition of TWOG_CHAN_6_IN_MHZ out of
ifdef CONFIG_CHAN_FREQ_API, move to public header file,
then other components can use it.

Change-Id: Ieb4b2b167c664246d39949ad4f8d53eda6b9d7de
CRs-Fixed: 2580207
2019-12-08 22:58:02 -08:00
Abhishek Ambure
fac1d4e171 qcacmn: Allow zero channels list to send to fw for RSO
Host send number of channels = 0 and channel list type =
WMI_CHANNEL_LIST_STATIC in RSO command to firmware to clear static
channel list for ROAM SCAN in firmware.

Hence, at WMI layer check for chan_count is removed and channel list
type mapping is done irrespective of chan_count.

Change-Id: Ia3dded0d58e32570d3dd5f7193410909ecef0cc4
CRs-Fixed: 2579748
2019-12-07 04:22:20 -08:00
Mohit Khanna
918456b6c3 qcacmn: Use HAL_RX_BUF_RBM_SW3_RBM for defrag pkts
Currently defragmented packets use HAL_RX_BUF_RBM_SW1_RBM as the RBM
value for the defragmented packets which are re-injected into REO.
Thus, if REO encounters any error while handling these packets, they
would end up in WBM2SW1 ring (via WBM), which is managed by the FW. The
FW will eventually recycle these buffers back to RXDMA via its refill
process. As a part of defragmentation, host does a 802.11 -> 802.3
header conversion. This is resulting in an address which is not 4
byte aligned. Hence, when RXDMA tries to use these addresses (after FW
recycles them), it may lead to issues.

Change the RBM value of the defragmented buffers which are
re-injected. Now, if REO ends up throwing an error for these
packets, they wll end up in WBM2SW3, which is managed by the host.
The host can then drop these packets and replenish RXDMA with 4 byte
aligned buffers (via FW).

Change-Id: I9d9c25385978d5be855699feb28d292c6f3fffdd
CRs-Fixed: 2572483
2019-12-07 04:22:09 -08:00
Disha Das
bcb1f1738f qcacmn: Replace return value 0 with QDF_STATUS_SUCCESS
Replace return value 0 with QDF_STATUS_SUCCESS as
per coding standards.

Change-Id: I27104d4a9eed29a7008b8970cf78c2ecd097b996
2019-12-06 08:41:10 -08:00
Nirav Shah
eb26831637 qcacmn: Update tx/rx bundle statistics for USB interface
Update tx/rx bundle statistics for USB interface.

Change-Id: Ia7951f9feb88ca28e055d9f32f0dfee65c7f0bf9
CRs-Fixed: 2571550
2019-12-06 08:40:56 -08:00
Disha Das
c076051dff qcacmn: Add GET PN WMI to obtain PN number
Add GET PN WMI to obtain the PN number for
a non-bss peer.

Change-Id: I8c999b3518b53e971d8207e74ce5e3a2f7d48aa8
2019-12-06 05:57:58 -08:00
Jinwei Chen
fbd48efe1c qcacmn: fix dp vdev use after free for monitor mode
Crash scenario:
a. monitor mode dp_vdev is freed in dp_vdev_detach_wifi3 without
   checking whether any dp_peer is associated.
b. monitor mode self dp_peer do peer clean up when HTT peer
   unmap MSG received, invalid accessing to dp_vdev as it has been
   freed in step (a).

Check if there is dp_peer associated for monitor mode dp_vdev,
skip dp_vdev free, when all dp_peer is freed, dp_delete_pending_vdev
will free dp_vdev.

Change-Id: Iea4b0efc6e7bbd4109d9cd0b109dfddf727a9fff
CRs-Fixed: 2576604
2019-12-06 01:52:39 -08:00
Shashikala Prabhu
52ee85cf6f qcacmn: Add support to choose 160MHz random channel for Pine
Pine supports restricted 80+80 MHz only on cfreq=5690 and cfreq=5775. If AP
detects RADAR in this channel, it chooses new 80+80 MHz random channel
which is not supported by Pine because, notion of 80+80 is not present in
current channel in regulatory component. Hence, as a temporary fix we
change the invalid 80+80 MHz channel to 160 MHz or lower.

Change-Id: I749607236a1dd7b9c7aa93ff889b65adcbb4191c
CRs-Fixed: 2570057
2019-12-06 01:52:32 -08:00
Yeshwanth Sriram Guntuka
65d547730f qcacmn: Cleanup local peer id from DP APIs
Local peer_id is being cleaned up across DP, HDD and PS/WMA.
So, any references to local peer_id/sta_id will be replaced
by peer mac address and all interactions between the layers
will be based on peer mac address.

Cleanup local peer id usage from DP APIs.

Change-Id: I930e1c6a09092a373c093239632d6f310fee18e2
CRs-Fixed: 2529041
2019-12-06 01:52:16 -08:00
Yeshwanth Sriram Guntuka
92aa901f84 qcacmn: Cleanup unused DP APIs [PEER_ID_PHASE2]
Local peer_id is being cleaned up across DP, HDD and PS/WMA.
So, any references to local peer_id/sta_id will be replaced
by peer mac address and all interactions between the layers
will be based on peer mac address.

Cleanup unusued DP APIs which are based on local peer_id.

Change-Id: Idd95bc640ca7e36a427be7202935034d4ed58979
CRs-Fixed: 2529026
2019-12-06 01:52:01 -08:00
Akshay Kosigi
71d3820a97 qcacmn: Move vdev_mlme timers to psoc_mlme
Add code to change the vdev_mlme timers to psoc_mlme timers
and also change code to send vdev_delete to FW while physical
destruction of vdev obj.

Change-Id: Ie041182155c75d0cc3825dc97b26abc6be38d76c
CRs-Fixed: 2563931
2019-12-05 11:50:53 +05:30
Arun Kumar Khandavalli
536903de91 qcacmn: Dont use vdev object in vdev delete response
As part of the new changes, vdev mlme object will be freed before
the vdev delete response is received from the firmware. Hence do
not use the vdev_mlme object in the vdev delete response handler.

Change-Id: I6b2db32ac0ef415bf1b879b2cd222de67d9a69b7
CRs-Fixed: 2563404
2019-12-05 10:47:43 +05:30
Arun Kumar Khandavalli
eaac8c195b qcacmn: Move wakelock to psoc level
Wakelock is system level lock not required to be taken
for every vdev, Hence move the wakelock to the psoc
hierarchy.

Change-Id: I525baf5f4b5dcadb493d84900dbd0a2e7c6407f6
CRs-Fixed: 2563406
2019-12-05 10:46:33 +05:30
Arun Kumar Khandavalli
614d1e4476 qcacmn: create the vdev response timers in psoc_mlme
Move the vdev response timer from the vdev object manager structure
to the psoc mlme structure.

Change-Id: Ieb87ac6549aa23e0beb61441fea459d3db78c2f3
CRs-Fixed: 2563410
2019-12-05 10:45:08 +05:30
Kiran Kumar Lokere
b49c9b7a2b qcacmn: WMI support for restricted 80p80 BW support
Add support to populate WMI service for restricted 80p80
bandwidth support.

Change-Id: I4c65573e3f6836119e70c7c2e3fc10a2e08b10a6
CRs-Fixed: 2574951
2019-12-04 14:41:08 -08:00
Pavankumar Nandeshwar
4c7b81b540 qcacmn: removal of cp handles and changes for ol_if_ops
Remove pdev and vdev control path handles from data path.
Instead send pdev_id and vdev_id along with opaque soc
handle in ol_if_ops.

Change-Id: I6ee083f07e464f283da0d70ada70a4e10e18e1b2
2019-12-04 07:45:10 -08:00
Pavankumar Nandeshwar
7c7089627e qcacmn: tgt_if changes for removal of ctrl_path handles
Remove the ctrl_path handles from tgt_if module

Change-Id: I32242dc9e66a377bb04bd537999eb86aad375ca7
2019-12-04 07:44:51 -08:00