Commit graph

6,766 commits

Author SHA1 Message Date
Kai Chen
52ef33fca3 qcacmn: Support enhanced Rx capture
Support Rx capture mode to deliver first 128 bytes of
each MSDU, along with some meta data.

Change-Id: I1ffa8b1a029d46f68aa78520bacc019de8af7a82
2019-04-19 04:08:56 -07:00
Pragaspathi Thilagaraj
7cc507f412 qcacmn: Add WMI support for new roaming parameters
The below ini values are added to enhance roaming in firmware:
1. "minimum_btm_candidate_score"
2. "roam_scan_inactivity_time"
3. "roam_inactive_data_packet_count"
4. "roam_scan_period_after_inactivity"
5. "btm_roam_score_delta"
6. "idle_roam_score_delta"
7. "btm_roam_trigger_min_rssi"
8. "idle_roam_trigger_min_rssi"

The values of "roam_scan_inactivity_time" ,
"roam_inactive_data_packet_count" and
"roam_scan_period_after_inactivity" will be sent over the
WMI_ROAM_SCAN_PERIOD wmi command.
"minimum_btm_candidate_score" value will be sent in the
WMI_ROAM_BTM_CONFIG_CMDID command.
The values of "btm_roam_score_delta", "idle_roam_score_delta"
"btm_roam_trigger_min_rssi" and "idle_roam_trigger_min_rssi"
will be sent over the WMI_AP_PROFILE command in new tlv.

Add WMI support to send the introduced ini values to
firmware.

Change-Id: I117ed7490d14730423654513f416115822230486
CRs-Fixed: 2435676
2019-04-19 04:08:53 -07:00
Venkata Sharath Chandra Manchala
457bee21b3 qcacmn: Handle ring processing appropriately
1. Currently, mapping multiple rings to same interrupt
   context is misleading as we cannot identify the
   interrupt source. Assign umac reo and wbm release ring
   processing under different interrupt masks.
2. Map error rings processing under one interrupt context
   as they are not frequent.

Change-Id: Ia2c4de29b99d1e25af7e2ce3068132f5995a9a95
CRs-Fixed: 2434741
2019-04-19 04:08:49 -07:00
Rajeev Kumar Sirasanagandla
6dd26922bd qcacmn: Add API to get FCC constraint info
Add API to get FCC constraint info from regulatory pdev private object.

Change-Id: I038f7e35c15d36213d898f349b6c521b2a2360f2
CRs-Fixed: 2431414
2019-04-19 01:57:10 -07:00
Akshay Kosigi
e761764291 qcacmn: Add correct vdev id while sending vdev param to FW
Add vdev id into vdev_set_param structure for sending
        WLAN_MLME_CFG_MIN_IDLE_INACTIVE_TIME
        WLAN_MLME_CFG_MAX_IDLE_INACTIVE_TIME
        WLAN_MLME_CFG_MAX_UNRESPONSIVE_INACTIVE_TIME
timeout values to FW during vdev create complete

Change-Id: I891a683ee270f057a9d02c47019e2297c43596f5
CRs-Fixed: 2419117
2019-04-19 01:57:05 -07:00
Bala Venkatesh
d0838f8a9c qcacmn: Restrict dwell time only if SAP/GO is connected
Currently, in case of SAP/GO present active dwell time of scan req
on STA iface is restricted. This can result in less scan time but
STA can miss some AP's. So, decrease dwell time only if some client
is connected to SAP or GO.

Change-Id: I46fb76792941b7c79f541b8b358d02bb944f0086
CRs-Fixed: 2436910
2019-04-19 01:57:01 -07:00
Abhishek Singh
a7bfb9b1b4 qcacmn: Remove repetitive logs for mem alloc failure in scan
Qdf alloc api print the log in case of alloc failure and thus
the caller doesn't need to print the error again.

Remove the repetitive logs from wlan_scan_process_bcn_probe_rx_sync
and tgt_scan_bcn_probe_rx_callback. And fix check patch errors.

Change-Id: Ia340b71b5b476339d2ffe68b287b894ff6b532e8
CRs-Fixed: 2435932
2019-04-19 01:56:57 -07:00
Jingxiang Ge
4218f02cef qcacmn: Pass hang reason to qdf_trigger_self_recovery
To identify the reason for recovery, add parameter
"reason" for qdf_trigger_self_recovery.

And revise comment for qdf_hang_reason, replace "CDS"
with "QDF".

Change-Id: I8b388b5e83dbbdf29246c264ada56290f0dd3bfc
CRs-Fixed: 2431282
2019-04-19 01:56:52 -07:00
Lin Bai
0577a01ab2 qcacmn: Fix compiler issue without CONFIG_DP_TRACE
Compiler threw error -
implicit declaration of function 'qdf_dp_trace_apply_tput_policy'
when CONFIG_DP_TRACE not enabled.

Change-Id: Ia4e6fdf129b7fdc31c901b6fa78ce2cb0935b369
CRs-Fixed: 2433430
2019-04-18 20:45:58 -07:00
Pragaspathi Thilagaraj
9582515724 qcacmn: Send idle roam trigger monitor command to firmware
Send idle roam trigger monitor command to firmware based on
the SET SUSPEND mode command received from the user space.
The set suspend mode value sent will be used by firmware as
one of the parameters in determining if the device is in
idle state. When set suspend mode is 1, device is not in
idle state else the device is considered idle if idle state
data packet count, idle rssi, inactivity time criteria are met.

Add changes to send the idle trigger monitor value over the
wmi command WMI_IDLE_TRIGGER_MONITOR_CMDID.

Change-Id: I34632814a1e653fa87cfbab90c72ee1622dfd63c
CRs-Fixed: 2436222
2019-04-18 17:02:30 -07:00
jiad
5679e39c7d qcacmn: Fix RX buffers refill for driver loading
On low memory system, skb allocation failures are observed in
dp_rx_buffers_replenish during driver loading phase within
dp_rx_pdev_attach code path. Per kernel memory team analysis,
failures are caused by large amount of atomic allocations.
Currently when replenishing RX buffers, srng spinlock is first
grabbed and then skb buffers are being requested, which makes
skb allocation happen in atomic context.

Fix is to create a new API for refilling rx buffers when
loading driver. In the API, skbs are allocated into a
pool without srng lock grabbed. Srng lock is grabbed only
when refilling already allocated skb to rxdma ring.

Change-Id: I9d45a42c9f2b0af7bf1d8031adb474d66ff9db59
CRs-Fixed: 2425798
2019-04-18 17:02:27 -07:00
Rajeev Kumar
ad8457136c qcacmn: Use qdf_tracker for nbuf mapping
qdf_tracker generically implements all of the logic necessary to
implement the qdf_nbuf map tracking. Rather than using the current
custom tracking solution for qdf_nbuf map tracking, use qdf_tracker
instead.

Change-Id: Id33138a9035653b45c66b712bd11e54873266a17
CRs-Fixed: 2425623
2019-04-18 13:26:22 -07:00
Tushnim Bhattacharyya
0055e67260 qcacmn: Remove logs from mgmt txrx functions
Remove the descriptor related frequent logs from mgmt txrx functions.

Change-Id: Iff372d4df9dc79285e87bf972a4c1baf5d74a87e
CRs-Fixed: 2432488
2019-04-18 02:33:33 -07:00
Rajeev Kumar
aba8b2edd2 qcacmn: Stats: Add handling of pmo suspend resume
Register pmo suspend resume handler to disable/enable stats requests.

Change-Id: If1112e3ef23bfa53f107eb5a668189da4f83bd0c
CRs-Fixed: 2406729
2019-04-18 00:28:40 -07:00
Sourav Mohapatra
1792251be9 qcacmn: Assert in case any obj is in L-state for long
Any obj ref can be taken by modules. In the case the obj is logically
deleted but not deleted physically due to some pending reference not
released, it leads to memory curruption issues in unexpected places.
Debugging these issues becomes difficult as there is no indication where
the ref leak has happened. Especially when the curruption occurs before
stop_modules is called (where there is check for ref leaks)

To ease the process of debugging such issues, add a print to show the
modules holding the refs after logical deletion. Also, assert in
case any objs are in logically deleted state for longer than 10 secs.

Change-Id: I8fa55693c89f146d859cc9ec3355f5eb1e2c3853
CRs-Fixed: 2419733
2019-04-18 00:28:36 -07:00
Rajeev Kumar Sirasanagandla
78d8f5911f qcacmn: Add wmi service bit
Add wmi service bit: wmi_service_sta_plus_sta_support.

When this wmi service bit is set, firmware shall support simultaneous
connections on multiple STA interfaces.

If firmware doesn't set this service bit and if the host driver
doesn't check this bit before second STA connection, then firmware
shall reject connection by returning failure in VDEV_START_RESP_EVENTID.

Change-Id: I9e20911af5372b651586f25d9f13e4364c672435
CRs-Fixed: 2427202
2019-04-18 00:28:33 -07:00
Pragaspathi Thilagaraj
5e3cd0af27 qcacmn: Send idle and disconnect roam parameters to firmware
Add support for new wmi command WMI_ROAM_DEAUTH_CONFIG_CMDID to
send disconnect roam trigger parameters and the new wmi command
WMI_ROAM_IDLE_CONFIG_CMDID is used to send the idle roam trigger
parameters.

Update the idle roam and disconnect roam parameters and send them
on the new wmi commands over wmi.

Change-Id: I57acb90266d506d37dcbb58d50ef23fadc439e46
CRs-Fixed: 2431502
2019-04-16 19:58:01 -07:00
Shashikala Prabhu
f7786d3822 qcacmn: Change the data type of average/roundup tx rate
The datatype of average and round up tx rate was uint32_t which truncates
the upper byte of the average and round up tx rate value.

changing the datatype of average and round up tx rate from uint32_t to
uint64_t.

Change-Id: I3809ba7cfc73ec0b4609981e70d57112ac958f33
CRs-Fixed: 2409751
2019-04-16 09:09:38 -07:00
Jeff Johnson
cb4f428edc qcacmn: Refine struct add_ts_param
Many of the fields in struct add_ts_param use camelCase which is
frowned upon by the Linux coding standard, so rename them to be
compliant.

Note that change I829ad0abb864f0a05047894bab9977d8529074dc
("qcacld-3.0: Align with the refined struct add_ts_param") is
interdependent with this change.

Change-Id: I421b670b86a7e1cecbe5a2686efefbbb6c455267
CRs-Fixed: 2433927
2019-04-16 02:50:25 -07:00
Sandeep Puligilla
41696b3a10 qcacmn: Enable CFG INI/NON INI Logging
Enable CFG INI/NON INI logging

CRs-Fixed: 2425069
Change-Id: I21cbcc5f88cc0099dc593113f1d346e188d70f58
2019-04-15 22:26:42 -07:00
Manjunathappa Prakash
05f70da365 qcacmn: Do not update source ring hp in completion process
ce_send_entries_done_nolock_srng() source ring Tx completion processing
callback function making the redundant update of previous HP. Further
when actual Tx updates the HP results in 2nd HP update.
Because of race in hardware HP update detection, second write is lost.
Avoid this scenario by not updating HP in Tx completion processing.

Also remove unused ce_send_entries_done and ce_recv_entries_done APIs.

Change-Id: I1eb288cd7fb0ff418d4cec4f8d127cff8fc9822d
CRs-Fixed: 2407394
2019-04-15 15:21:20 -07:00
Abhishek Singh
bd80d5c8ba qcacmn: API to add scan entry without posting to scheduler thread
Add an API to add scan entry without posting it to scheduler thread.
This will be used to update the beacon/probe during roaming to new AP.

Change-Id: Ia53ba194032eb953c5b102b0cc406db12e58f42d
CRs-Fixed: 2435404
2019-04-15 16:34:20 +05:30
Rohan Dutta
613f7920c7 qcacmn: For PMF return the igtk key in getkey call
Hostapd requests igtk keys with keyix 4,5.
Adding support to wlan_crypto_getkey to send the igtk keys
for keyix 4,5. In absence of the patch, hostapd getkey
call for igtk keys will fail.

Change-Id: I32cd6b417aae92cf3b3ac17bb72e19b581d21bd6
2019-04-12 08:08:12 -07:00
Tallapragada Kalyan
0ef58eec14 qcacmn: Increase the MAX limit of RX Release Ring to 8192
Increase the MAX limit of RX Release ring from 1024 to
8192

Change-Id: I45a4bac2b91b0400fc4acc7cb236f38276a4e0b2
2019-04-12 05:20:28 -07:00
Vivek
445a3a5889 qcacmn: Print all elements of serialization history circular buffer
In the current implementation, we print the ser history
from index 0 to the current index of the ciruclar buffer,
so when buffer overflows we print only few recent items.

Instead, we should print all the elements in the circular buffer
starting from current index to entire length of the circular buffer.
This will print all the elements in the circular buffer
when it overflows and also takes care of printing
required items when buffer is not overflown.

Change-Id: I6c54cb34de7a1ba24ee0204004cc9a203173c66b
CRs-Fixed: 2430483
2019-04-12 02:56:42 -07:00
Pavankumar Nandeshwar
1ab908e62b qcacmn: add CDP function to process CP peer delete response
Add a CDP function which processes the peer delete response
and deletes the static ast entry for the peer

Change-Id: Id646979ed07bd82609ca08e7ef3201382d07b1de
CRs-fixed: 2385115
2019-04-12 02:56:39 -07:00
Tallapragada Kalyan
12a6840949 qcacmn: change qdf_assert_alway to qdf_assert in rx path
change qdf_assert_alway to qdf_assert in rx path

Change-Id: Id9ac6b69b693c3194972cdb61265f867c2267679
CRs-Fixed: 2432396
2019-04-12 02:56:35 -07:00
Chaithanya Garrepalli
58e7c5e121 qcacmn: In add ast entry call the callback inside ast lock
In dp_peer_add_ast() call the CP callback inside ast lock
to ensure the ast add and delete commands are called in a
sequence

Change-Id: If76bf8dca34555e56074e74792f3283b6b5a28d3
CRs-fixed: 2424637
2019-04-11 12:38:49 -07:00
Om Prakash Tripathi
0e3c541835 qcacmn: Change log level to debug for "Failed to create a scan entry"
Its pretty common to simulate malformed beacon/brobe response
frames leading to print "Failed to create a scan entry".

Change-Id: Id89c4e66f0ac449b02e774067932e65d1da9ddc8
CRs-Fixed: 2431173
2019-04-11 12:38:46 -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
Naga
9dad9767b1 qcacmn: Cleanup duplicate fields in vdev_mlme
Add change to cleanup duplicate fields of
of vdev_mlme, which are also in mlme_channel_param
and their dependencies while updating
vdev_start_param. Cleanup unused mlme_cfg_ids.

Change-Id: Ie32971283a337f04692c0c0bc7f41fff75c090c3
CRs-Fixed: 2407953
2019-04-11 01:14:21 -07:00
jiad
cc43b53e87 qcacmn: Allocate IPA TX skb buffers with srng unlocked
On low memory system, skb allocation failures are observed in
dp_tx_ipa_uc_attach during driver loading phase. Per kernel
memory team analysis, failures are caused by large amount of
atomic allocations. Currently when allocating IPA TX skbs,
srng spinlock is first grabbed and then skb buffers are being
requested, which makes skb allocation happen in atomic context.

Fix is to make skb allocations with srng unlocked since it is
safe for race conditions during driver loading time. This ensures
skb allocations in process context.

Change-Id: I1624276c087c8247d672fb7cea5daded07ab93a3
CRs-Fixed: 2426489
2019-04-11 01:14:17 -07:00
Will Huang
8c82dda691 qcacmn: Fix possible OOB in extract_ocb_dcc_stats_tlv
The correct element number of param_tlvs->stats_per_channel_list is
actually param_tlvs->num_stats_per_channel_list and thus the
qdf_mem_copy() can actually copy more bytes than are in the buffer
causing a buffer overread.

Fix it by checking fix_param->num_channels against the actually
param_tlvs->num_stats_per_channel_list before doing memory copy.

Change-Id: I610920ac1d0a927a52de83935616e8e8fdfec7e7
CRs-Fixed: 2428212
2019-04-11 01:14:14 -07:00
Santosh Anbu
a3d6f77c62 qcacmn: Add API to validate umac_cmd in serialization command
Since umac cmd is specific to the module adding cmd to serialization
queue, an API is needed to validate the umac_cmd associated with that
serialization context holding the serialization queue lock.

Change-Id: Iadb4deb17ffabd780432a29e7cbd37024fd431fe
CRs-Fixed: 2430764
2019-04-11 01:14:10 -07:00
Jingxiang Ge
23c5658da6 qcacmn: Trigger recovery while wmi stuck
Replace QDF_BUG with qdf_trigger_self_recovery while wmi stuck.

Change-Id: If366fbdff356d16b78324051aad99fd4455978b5
CRs-Fixed: 2430743
2019-04-11 01:14:05 -07:00
Chaitanya Kiran Godavarthi
e541e9ccda qcacmn: Add Tx AMPDU statistics
Count of MSDUs Tx with AMPDU aggregation and
MSDUs without AMPDU aggregation is maintained. This
count is obtained from per ppdu stats.

Change-Id: I7c38846534bbe5f2fd0a9b3602a9d453e1c1f449
2019-04-10 05:27:06 -07:00
Naga
613a74a6cf qcacmn: Add change to send custom AMPDU/AMSDU aggr size
Add change to support sending AMPDU/AMSDU custom aggregation
size to FW using converged MLME and target_if framework.

Change-Id: Icf665e3bf30c5ef5903342264e89776611c7774a
CRs-Fixed: 2430278
2019-04-10 05:27:02 -07:00
Ajit Pal Singh
ed6f03ba6e qcacmn: Set MaxMsgsPerBundledRecv in HTC_SETUP_COMPLETE_EX_MSG
Set MaxMsgsPerBundledRecv in HTC_SETUP_COMPLETE_EX_MSG for USB,SDIO
interfaces.
This is required for enabling RX bundling.

Change-Id: Ifb6a9a7167701c051d405bfae125fcfd0c8c55c5
CRs-Fixed: 2414409
2019-04-10 02:13:32 -07:00
Jinwei Chen
2f79dd975f qcacmn: degrade log level when dump rx data TLV
currently host will dump TLV with info level if HW indicate RX
data with invalid sw_peer_id, this will introduce excessive logging
issue, host panic.

degrade the log level to debug level.

Change-Id: Ia24f411bdfd9ec8e315874340d3bf046c245a72b
CRs-Fixed: 2420640
2019-04-09 22:20:55 -07:00
Ajit Pal Singh
5fc9a33c2e qcacmn: usb: Remove usb_set_intfdata()
Remove usb_set_intfdata() as usb interface private data is not being
used in driver.

Change-Id: I65f718b8abe2f33ec7f180ec265baab9772d30d0
CRs-Fixed: 2427944
2019-04-09 11:56:54 -07:00
Akshay Kosigi
48debcb1f6 qcacmn: Move get macaddr API at proper place
Move get macaddr from peer API at appropriate place instead of fetching
it everytime and not using it.

Change-Id: I01349a672215395795cd08cd65d98ad8a08b95b0
CRs-Fixed: 2431163
2019-04-09 11:56:50 -07:00
Pamidipati, Vijay
37d107d2d1 qcacmn: HIF schedule latency measurement
Add support to measure interrupt latencies, store them
in different "bins" and display the constructed histogram
through user command.

Change-Id: I268be6b39745d550ac7db5d321c2d1fdb2d17d41
CRs-Fixed: 2365812
2019-04-09 04:00:32 -07:00
Mohit Khanna
6d22eeb468 qcacmn: Tx desc alloc: remove default wakeup action
When the status is FLOW_POOL_ACTIVE_PAUSED, all queues are expected to
be paused. Still some on the fly packet can make it to the driver. In
such a case, the function dp_tx_desc_alloc takes a default action of
WLAN_WAKE_NON_PRIORITY_QUEUE. This is incorrect, since it will wake all
non priority queues, when they should be paused.
Make default action as WLAN_NETIF_ACTION_TYPE_NONE. If this is the
action to be taken, donot call the pause_cb from dp_tx_desc_alloc.

Rate limit log levels in case dp_tx_desc_alloc fails.

Change-Id: I1ef3018e90576d2c3aaa0d10d56e9b155681271b
CRs-Fixed: 2421813
2019-04-08 22:01:47 -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
Mohit Khanna
f085b61b59 qcacmn: dp_rx_null_q_desc_handle: drop if msdu_len > RX_BUFFER_SIZE
In some cases, the msdu_len as retrieved fromm msdu_start TLV is
greater than RX_BUFFER_SIZE. In such cases, when qdf_nbuf_set_pktlen
is called, it will expand the skb to accommodate the bigger packet.
This makes the rx_tlv_hdr var invalid, since it continues to point to
the older skb->data. Access of this rx_tlv_hdr will cause exception.

Drop the packet if msdu_len > RX_BUFFER_SIZE. This is not expected while
reaping WBM RX Release ring.

Change-Id: I60890e4d3ee0afa451884d4df458eb50be280280
CRs-Fixed: 2426245
2019-04-08 17:43:38 -07:00
Linux Build Service Account
13da9a8463 Merge "qcacmn: Filter data packets in m_copy mode" 2019-04-08 12:06:01 -07:00
Linux Build Service Account
b8a649b3a0 Merge "qcacmn: Add support to cache peer capability info" 2019-04-08 12:06:01 -07:00
phadiman
86911cd6e0 qcacmn: Filter data packets in m_copy mode
Filter out data packets from mon destination
ring in m_copy mode as we already receive
first 100 bytes of data in mon status ring

Change-Id: I09321aa42b850d7b3cdc0bda4c7c51f79a6f850e
2019-04-08 10:50:21 -07:00
Visweswara Tanuku
5832077a65 qcacmn: In Epping, Pass BMI context to bmi_done and bmi_cleanup
In epping_enable bmi_done is called with null context due to which
bmi finish is incomplete

Pass BMI Context before invoking bmi_done and bmi_cleanup

Change-Id: Ic7f424a03cb92d6d3218b5fa148ea95d6011cfed
CRs-Fixed: 2419720
2019-04-08 10:50:18 -07:00