Commit Graph

5865 Commits

Author SHA1 Message Date
Uraj Sasan
ff4f2d20fb qcacmn: Add Support for msdu retry stats
Requirement to provide various msdu retry stats to host:-
1. successfully transmitted msdus
2. Retried msdus
3. msdus retried for more than once
4. failed msdus

Change-Id: I4cd7dfceae16b4223df605fa174299858a8651c8
2018-10-30 03:43:20 -07:00
Will Huang
0f5ddf9578 qcacmn: Add bi-direction dma map flag to qdf_nbuf_cb
In case of 11w PMF tx frame, some target would dma write to this tx
buffer, it may cause smmu check fault.

Add a bi-direction map flag to mcl skb.cb[] for this special case.

Change-Id: I72a2c11abb9f3e7e8fb9c6f5290cd4f8d209b19a
CRs-Fixed: 2337204
2018-10-30 00:24:04 -07:00
Padma Raghunathan
aa83faab41 qcacmn: Lithium_DP: HAL support for qca6018
Interface files to access QCA6018 HAL registers

Change-Id: I5152d9fe0aae31609a82a32ee405e12a02a5aa25
CRs-Fixed: 2323724
2018-10-30 00:24:01 -07:00
Venkata Sharath Chandra Manchala
f167af18e5 qcacmn: Extend txrx_stats command to print wlan cfg
Add iwpriv <interface> txrx_stats 29 and
iwpriv <interface> txrx_stats 30 to print wlan_cfg
parameters for both soc and pdev.

Change-Id: I666fe4fa999e82e92ea2961ab662e3e629b58bc7
CRs-Fixed: 2331949
2018-10-29 20:10:23 -07:00
Pramod Simha
068e6b92df qcacmn: Fix mic header derivation for 4 addr format packets
Extract the QoS field for 4 address format packets from the correct offset.

Change-Id: Icae4750026c2834bc84eebccbe6fa835212ccb18
CRs-Fixed: 2257255
2018-10-29 16:47:10 -07:00
Priyadarshnee S
9a6dbbc0de qcacmn: Indicate the channel on which radar is detected
Consider an AP up in channel 100 in VHT80 mode. On injecting radar
in channel 104, the current implementation displays "Radar found on channel
100", which is the primary beaconning channel. The requirement is to
display radar found information on the exact subchannel of the VHT channel
where radar was detected (which is channel 104 in this example).
Hence, using the radar found frequency offset to display the exact freq
offset from the centre frequency where radar was detected. This display
is only valid for real HW pulses injection. For bangradar, the frequency
offset is not available and therefore exact subchannel cannot be
calculated.

CRs-Fixed: 2321778
Change-Id: I49cdcd4f13dc1fbf12bc4a33048c13bc8ea3973f
2018-10-29 16:47:08 -07:00
Sandeep Puligilla
0a4d67bf73 qcacmn: Add support to event WLAN_VDEV_SM_EV_ROAM
- Add supprot to event 'WLAN_VDEV_SM_EV_ROAM'.
- WLAN_VDEV_SM_EV_ROAM - roaming event to notify the vdev
manager about the firmware triggered roaming.

Change-Id: I249664e72ba5fe0e13ddc8e59533489c69963f5f
CRs-Fixed: 2337795
2018-10-29 15:19:22 -07:00
Bala Venkatesh
433e0e3710 qcacmn: Delete connection in progress tdls peers
TDLS peer has to be deleted before sending the TDLS disable command
to FW, otherwise FW may assert due to the invalid sequence of peer
delete and TDLS set state command.
So Delete TDLS peers for those the connection is in progress along with
the active TDLS peers before disabling the TDLS.

Change-Id: Ic52c44dea947095cfe5e4dfe36eec271b1f46867
CRs-Fixed: 2340759
2018-10-29 13:49:43 -07:00
Aditya Sathish
80bbaef931 qcacmn: Separate WLAN fastpath featured CE service APIs
Move WLAN fastpath featured CE service APIs to ce_service_legacy.c
since they are not used by any ce_service_srng.c APIs.

Change-Id: I7bb51025c477e8e2428479e41baed274ee4f7cae
CRs-Fixed: 2324003
2018-10-29 03:11:50 -07:00
Priyadarshnee S
d3c3cb004b qcacmn: Reset Radar Log Counter on "wifi" command
Currently radar event log is cleared only during dfs_detach which happens
during wifi unload. On issuing "wifi or  wifi down" command, the logs are
not cleared. During Spoof Radar Detection, the log counter values are
spuriuos due to accumulation of phyerror events. This accumulation of
events is either due to false radar detection or logs of the previous wifi
cycle. Hence resetting the dfs radar log counters in the below cases:
1) During vap delete
2) During CC/ Regdomain change.
3) After false radar detect.

CRs-Fixed: 2244562
Change-Id: I74745f61c634bab7f9c1a78ef8dea8da2ab1a997
2018-10-27 16:56:54 -07:00
Yeshwanth Sriram Guntuka
294ce1121a qcacmn: SSID with zero or space should be NULL ssid
Last frame received in scan before the connect is
beacon with NULL ssid with non zero length and ssid
is sent as NULL to supplicant after association. This
will result in supplicant to trigger disconnect
casuing delay in reconnection.

Fix is to consider ssid with zeros or spaces as null
ssid.

Change-Id: If96776ae85926948d714e975c3e9b4011e8a20b3
CRs-Fixed: 2330485
2018-10-27 00:11:44 -07:00
Qiwei Cai
9ae046ae22 qcacmn: Fix OOB access in WMI_SAR_GET_LIMITS_EVENTID
This change is to fix the regression issue caused by CR 2316935 which
dropped the change of CR 2307276 in the refactoring.

Update handling of WMI_SAR_GET_LIMITS_EVENTID for a possible OOB that
can occur if param_buf->fixed_param.num_limit_rows is greater than
actual TLV length of param_buf->sar_get_limits array.

Change-Id: Id633296d39bcaf4d1588963368630e69ff790ea4
CRs-fixed: 2339015
2018-10-26 18:21:10 -07:00
Pavankumar Nandeshwar
3b67366fd2 qcacmn: For ast_entry of type DA use bss_peer
1. While saving ast_entry of type DA, use bss_peer.
2. Display the correct peer_mac_addr in ast_entry of type DA

Change-Id: Ic6150d6e3fc0b1c1274844ea6685df6b66afd811
CRs-Fixed: 2332417
2018-10-26 18:21:08 -07:00
Venkata Sharath Chandra Manchala
8747958dff qcacmn: Enable Monitor Mode for QCA6390
Support Monitor Mode for QCA6390 as RXDMA1 block is
now removed.
1. Monitor buffers are now received on rxdma_err_dst_ring
2. RXDMA1 monitor status ring is moved to RXDMA0 monitor
   status ring
3. Msdu link descriptors are now returned to WBM descriptor
   release ring.
4. Reap the Monitor buffers and return it to SW Refill ring.
5. Use the same rx descriptor pool for regular and monitor data.

Change-Id: If41e5d13f942da2b97e5aab72b88ae344925ba67
CRs-Fixed: 2297300
2018-10-26 10:39:37 -07:00
Liangwei Dong
cc8676b6a8 qcacmn: Action frame random mac addr tx support
1. Send add random mac addr rx filter WMI command
to target
2. Add/Del the active random mac addr entry
3. Clear random mac addr from target if not active

Change-Id: I9dcbdc20b76d9865da7a8db6ee013bf5e44e4407
CRs-Fixed: 2322097
2018-10-26 10:39:34 -07:00
Visudha Sathurappan
e159d1434f qcacmn: Move WIN DA files in UMAC to DA directory
* DA only WIN files are moved to a DA specific directory
   and are conditionally compiled.
 * DA:- Direct Attach.

Change-Id: Idf704d2e4c9cebf3b02d6cc41d7f9908200af70c
2018-10-26 10:39:31 -07:00
Sandhya Mahadevan
e650d1d287 qcacmn: Suppress NBUF alloc fail prints
NBUF alloc fail prints are flooding the console,
which is not allowing watchdog resetting to occur

ratelimit is added to reduce the print statements
flooding the console.

Change-Id: Ib6531070c8b80d64ffea62209912e5166e0414c1
2018-10-25 12:33:07 -07:00
Dustin Brown
aaa97751a6 qcacmn: Add excessive logging detection
One of the most common stability issues encountered by the stability
team is watchdog bite due to excessive logging. Add a feature to track
logging to dmesg using a tumbling window and counter, and panic if the
configured maximum number of logs for that window is exceeded.

Change-Id: If83c6dfccb9d191b02a3a7166b065c0a0704f969
CRs-Fixed: 2338385
2018-10-25 12:33:04 -07:00
syed touqeer pasha
0050ec95b3 qcacmn: Add support for Secondary HMWDS ast entry in NSS
Add NSS Wi-Fi Offload support for Secondary HMWDS ast entry.

Change-Id: I3429356e1e20aecdbb7af5b29770c41026f3bd46
CRs-Fixed: 2332290
2018-10-25 05:32:18 -07:00
Venkateswara Swamy Bandaru
9578c2adec qcacmn: Fix napi bucket calulation issue
In case of fast patch CE_state->receive_count can go beyond
HIF_NAPI_MAX_RECEIVES as batch processing is happening. This
is causing bucket calculation working. In this case setting
receive_count to HIF_NAPI_MAX_RECEIVES as a fix.

Change-Id: I3179b6f9f893342ead68e46dc4b75fd55e6c7839
CRs-Fixed: 2331579
2018-10-25 05:32:15 -07:00
Ashish Kumar Dhanotiya
2fcd71bff6 qcacmn: Overwrite center frequency segment_1 to 0
Currently center_freq_seg1 value is not getting reset for
non 160, 80+80 width and 2.4 GHz channel which are stored in
sap context, in case of SSR on SAP restart, this old value
can be used which might be some junk value and can lead to
stop bss as a result of invalid values.

To resolve this issue reset the center_freq_seg1 to 0 for
non 160, 80+80 width and 2.4 GHz.

Change-Id: Ie4bffb1c2424024fab32d30d7d790f99d54ad58c
CRs-Fixed: 2326392
2018-10-25 04:12:25 -07:00
Ruchi, Agrawal
4c5ade6388 qcacmn: add stats for invalid peer
invalid peer stats in rx when m_copy is enabled,
adding stats for invalid peer at pdev level

Change-Id: I394cfad0642eeb66062d8ab79858a8d7720d8c9f
CRs-Fixed: 2309099
2018-10-25 02:56:14 -07:00
Manjunathappa Prakash
ed42ca3f2d qcacmn: DPT: special packets NULL nbuf argument
For special packets DP tracing enable_check is called with
NULL nbuf, it returned false, preventing special packets from
logging. So ignore NULL nbuf and return true to enable DPT
logging.

Change-Id: Ieccc9e77195f5c8ff590c6964972705c362c16ba
CRs-Fixed: 2335301
2018-10-25 01:38:03 -07:00
Harprit Chhabada
38d7f92a30 qcacmn: Fix null pointer dereference, wlan_cp_stats_psoc_obj_create_handler
In wlan_cp_stats_psoc_obj_create_handler() multiple error paths
lead to label wlan_cp_stats_psoc_obj_create_handler_return.

In the label, posc_cs is not null checked before passing to the
csc->cp_stats_psoc_obj_deinit() causing NULL pointer dereference.

Change-Id: I82a48cee7d2734a96960aeedff42fc4cdf94bf9c
CRs-Fixed: 2336830
2018-10-25 01:38:00 -07:00
Liangwei Dong
77d877285a qcacmn: Get peer with ref count
wlan_vdev_get_bsspeer doesn't hold ref
count on peer.
Use wlan_objmgr_get_peer to get peer
to avoid peer free race condition.

Change-Id: I04bfcf8ca20fa49d81a9e59aafc31caab98374a1
CRs-Fixed: 2337868
2018-10-24 23:00:24 -07:00
Pragaspathi Thilagaraj
f4547d9764 qcacmn: Fix possible OOB read in extract_chainmask_tables_tlv
When WMI_SERVICE_READY_EXT_EVENT is received from firmware, the
function extract_chainmask_tables_tlv is called to update the
soc caps and other capabilities to the host. hw_caps is
extracted directly from the param_buf value received from the
firmware and hw_caps->num_chainmask_tables is used to traverse
through the chainmask table and update the values to it from the
param_buf->mac_phy_chainmask_caps. hw_caps->num_chainmask_tables
is validated against PSOC_MAX_CHAINMASK_TABLES but not against
param_buf->num_mac_phy_chainmask_combo. This can cause potential
out of bound read in extract_chainmask_tables_tlv.

Validate the value of the hw_caps->num_chainmask_tables received
from the firmware against param_buf->num_mac_phy_chainmask_combo
before updating chainmask_table.

Change-Id: Ibf438760a9219f4ff82d29b42aa30f4dcf626364
CRs-Fixed: 2336842
2018-10-24 23:00:20 -07:00
Liangwei Dong
d25d11780f qcacmn: Add chan change HW mode change
Add policy_mgr_get_current_pref_hw_mode_dual_dbs
API for dual dbs HW. In Dual DBS mode HW, it
decides the actual DBS mode when DBS required.

Change-Id: Ic45b09fa49e1ff923f1a2dad50a3ce7e4007a3fd
CRs-Fixed: 2338105
2018-10-24 23:00:17 -07:00
Bala Venkatesh
3b427de23b qcacmn: Take vdev ref before posting the tdls mgmt tx command
Before posting the TDLS_CMD_TX_ACTION to scheduler thread take the
vdev ref with module id TDLS and release the ref as part of
freeing this command.

Change-Id: Id05962a1c9fc415199f347c5d85d1e0670dc247c
CRs-Fixed: 2338113
2018-10-24 16:25:28 -07:00
Liangwei Dong
4bf807e8f4 qcacmn: Add DBS to DBS switch for vdev Down
Add DBS to DBS switch in opportunistic timer
handler when vdev prioritization enabled.

Change-Id: I902316d7f64427bcadf1131cc0b822d23fc172fa
CRs-Fixed: 2338092
2018-10-24 14:40:12 -07:00
Naga
478d035baa qcacmn: Enhance cp stats component
Add new fields tx_tooshort, tx and rx discard
control plane stats at vdev level

CRs-Fixed: 2327398
Change-Id: I9f3ae1f4d043319fec8f08752d9112ab5e9f6ef9
2018-10-24 09:53:55 -07:00
Edayilliam Jayadev
7dacaff96d qcacmn: fftbin size WAR for HK V2
For HK V2 each fft bin is 2 bytes due to
some HW limitations. To fix this modify the
fftbin size WAR to convert 2 byte fft bins to 1 byte
and forward to applications via SAMP message.

CRs-Fixed: 2319415
Change-Id: I6c27d6804ddaf91ed9e6695e0b21a81115744fff
2018-10-24 08:17:42 -07:00
Vivek
287fb84e2c qcacmn: Remove unwanted debug logs in serialization
With the enhancements to the serialization component
many debug prints were additionally added.

The new debug prints were adding up to the text size
of the serialization object files.
Removed few unwanted prints in the new serialization code.

Change-Id: I366228618fe07f7637ff3bae96abab27b3b04b87
CRs-Fixed: 2333170
2018-10-24 04:49:45 -07:00
Sathyanarayanan Esakkiappan
4af5584f53 qcacmn: Appropriate WDS and MEC entry has been made
Ageout MEC entry after two minutes of inactivity and changes
included to modify existing WDS entry of a peer to MEC on promption

Change-Id: I0ad89671a053250413cbadad2d495f5abff89ac2
CRs-Fixed: 2316368
2018-10-24 03:17:11 -07:00
Dustin Brown
edd12697e4 qcacmn: Return success when debugfs is disabled
Currently, the QDF debugfs feature returns a no-support error code for
the init call when the feature is compiled out. Instead, return success
to avoid wlan load failure on some configurations and to make error
checking by the caller more straight forward under all configurations.

The deinit call also has the same problem, but none of the callers pay
attention to the return status. Additionally, the deinit function
returns success unconditionally when the feature is compiled in.
Rather than changing the return status to success when the feature is
compiled out, change the return type of the deinit function to void.

Change-Id: Iac3a47505142e149f70c67c5ba6cf0b2428d9488
CRs-Fixed: 2336872
2018-10-23 12:06:25 -07:00
Jianmin Zhu
df8bb93d25 qcacmn: Restore target country code during SSR
During SSR, target country code is reset to default, may not same as
current country code, need restore it.

Change-Id: Ib8f51755f442d73ad6e11bbfb18fb22a60f724ba
CRs-Fixed: 2318283
2018-10-23 08:11:56 -07:00
Min Liu
e6403310ab qcacmn: remove time-consuming debug log
print format "pS" in module will call module_address_lookup in
kernel, which will disable preempt. This could result in some
performance issues, like block rt task vsync_retire_work and
then cause janks.

Change-Id: Ic334490b607d2fcee9eede2a0175c0f92cfc7ffd
CRs-Fixed: 2304391
2018-10-23 08:11:53 -07:00
Pranita Solanke
b3cc9b7ec8 qcacmn: Fix ppdu type mapping to the string
Rx ppdu_type_str displays incorrect ppdu type in
data_txstats output. Change ppdu_type bit length from 2 to 5
to support all types.

Change-Id: I5441140b0d90896c296c8f61d5863e711da95149
CRs-Fixed: 2330614
2018-10-23 05:42:33 -07:00
Pranita Solanke
0588114986 qcacmn: Maintain SG/TSO desc_cnt at pdev stats
Maintain SG/TSO desc_cnt at pdev stats instead of ingress
stats to support legacy stats and change the fw_rem counter
to cdp_pkt_info to have packets and bytes information
for legacy platforms as part of convergence effort.

Change-Id: Ib908e8d1c1d78d191418d3884f41f981ba002b54
2018-10-23 04:19:38 -07:00
Dundi Raviteja
ddf4501aba qcacmn: Use qdf_snprintf in mlme_vdev_sm_create() API
Use qdf_snprintf instead of snprintf in mlme_vdev_sm_create() API

Change-Id: Ie6bb710bfb3baeaab33fdfc386ead57284bc9f08
CRs-Fixed: 2324849
2018-10-23 02:46:00 -07:00
chenguo
e4faf863c5 qcacmn: Code refine for duplicated spin unlock function
There are several duplicated spin unlock function calling in the
AC based TX flow control path. Remove this redundant codes.

CRs-Fixed: 2329973
Change-Id: I483bf97612b8e56f745360a3e84fbdff8c357ea9
2018-10-23 02:45:57 -07:00
Harprit Chhabada
d063d7486c qcacmn: Fix OOB in extract_service_ready_ext_tlv()
num_chainmask_tables used as a for loop variable in
extract_service_ready_ext_tlv(), is never bound check
and may lead to OOB.

Change-Id: Ib0fdde8386fc372abee44934e10e9f54b0fe25b8
CRS-Fixed: 2330943
2018-10-23 02:45:54 -07:00
Linux Build Service Account
ea8c5466eb Merge "qcacmn: Add original vdev info for NSS update API" 2018-10-22 22:03:17 -07:00
Linux Build Service Account
7c359416c0 Merge "qcacmn: Fix OOB read in init_deinit_handle_host_mem_req()" 2018-10-22 22:03:16 -07:00
Chaithanya Garrepalli
1312706807 qcacmn: use ADDR_X search for PSTA vaps in HKv2
In QWRAP mode for hawkeye v2 use DA based search
for PSTA vap

Change-Id: Icbf9f5c226ae62caefb722a7c8b735fb472d6003
CRs-Fixed: 2331853
2018-10-22 15:06:47 -07:00
Bala Venkatesh
de41e8ac29 qcacmn: Delete all peers in TDLS component
In case of heartbeat failure or deauth from AP,
From lim Del sta requests are sent to FW and with response
required false, Since del sta response is not received
TDLS component is not notified to reset the local
tdls component structures and also upper layers are
notified of this peer deletion.

Change-Id: Ica0b150df7646af60868b2806432795896c75bcd
CRs-Fixed: 2324559
2018-10-22 07:00:14 -07:00
Vivek
595e6ee390 qcacmn: Additional flag to mark cmds both for activation and cancel
Adding additional flag for commands which has been marked
for activation and for which cancel has been received.

After the commands marked for activation and also marked for cancel
really gets active, we remove the command from the active queue.

Change-Id: I5eb42459e216ad8cbcee15ce9a7572dec7f776a2
CRs-Fixed: 2326639
2018-10-22 07:00:11 -07:00
Chaithanya Garrepalli
291dfa0043 qcacmn: flushing reo command list before freeing pdev
In dp_soc_dettach flush the reo command list before freeing
pdev to avoid use after free of pdev memory in reo command
callbacks

Change-Id: I2644b259ed9b10dee9b11007ed9064dd7d2399a9
2018-10-22 03:52:24 -07:00
Aditya Sathish
dff202269a qcacmn: Provide WMI support for AP channel switching enhancements
Provide WMI support for AP channel switching enhancements.

As part of FR50393, AP is provided with the ability to notify
capable connected peers to follow it to the new channel bandwidth.

This change provides WMI support for sending required parameters to
the firmware to update the peer list internally with the MAC address
of the capable peer along with it's new channel width.

Change-Id: I0696efd2b1c883d15de23364677050618f114743
CRs-Fixed: 2316625
2018-10-22 03:52:21 -07:00
Abhijit Pradhan
1221f59a66 qcacmn: Fix dfs null pointer dereference issue
When a DFS pulse is being processed, a channel change change can happen.
And the channel change initializes the radar filters which means
it frees and allocates the DFS filtering data structures.
This may result in memory violation (NULL Pointer dereference).

To avoid the memory violation lock the filter initialization and
DFS pulse processing.

Change-Id: I37c80d409433a9f97bd1f5e78b2b1e780b130290
CRs-Fixed: 2317455
2018-10-21 23:14:26 -07:00
Shashikala Prabhu
80d0451982 qcacmn: Add API to clear CAC started channel
Add API to clear CAC started channel in the DFS component.
Also, when AP detects the RADAR in DFS channel and restarts the AP vap in
NON-DFS channel, call MLME state machine to clear the DFS_WAIT flag and
move the state to RUN. Since MLME state machine is per vap, move the
NON-DFS check in dfs_clear_cac_started_chan() to MLME and call
dfs_mlme_proc_cac() per  vap.

Change-Id: I67033aa6ea819b6ed5d39a3911191d2051f731fc
Acked-by: Shashikala Prabhu <pshashik@codeaurora.org>
CRs-Fixed: 2324561
2018-10-21 23:14:24 -07:00