Commit Graph

1164 Commits

Author SHA1 Message Date
Visweswara Tanuku
fbe384b6ac qcacmn: Add additional fields in wmi_twt_session_stats_info
Add below new fields in wmi_twt_session_stats_info required
for twt_session parameters and extract them.
protection flag, info_frame_disabled flag,
sp_tsf_us_lo & sp_tsf_us_hi

Change-Id: I3ca7fe44a1363c07d3a7db98086c66a1b7859eac
CRs-Fixed: 2730748
2020-08-05 02:17:14 -07:00
nwzhao
5ba7078b27 qcacmn: [WMI]FR47702 TWT stats, add WMI support for TWT Stats Event
Add WMI support for WMI_TWT_SESSION_STATS_EVENTID. This event
contains stats for a given TWT session.

Change-Id: Ieca2b6845fd2ec32ccdfb1021611bed07379d365
CRs-Fixed: 2609951
2020-08-05 02:17:10 -07:00
Visweswara Tanuku
19b1248241 qcacmn: Extract additional params from twt add dialog comp evt
Extract additional params obtained from fw as part of
WMI_TWT_ADD_DIALOG_COMPLETE_EVENTID during TWT setup

Change-Id: Ic58a1da463238a748cbf2678fe0156789ebb3559
CRs-Fixed: 2737036
2020-08-04 19:28:24 -07:00
Visweswara Tanuku
82befeaf2a qcacmn: Update status field in wmi_twt_del_dialog_complete_event_param
Update status field in wmi_twt_del_dialog_complete_event_param
during extraction of wmi event TWT_DEL_DIALOG_COMPLETE buffer

Change-Id: I89abaff01f27ebdde556eb3d1f37c723001ce2cb
CRs-Fixed: 2746112
2020-08-04 03:54:35 -07:00
Santosh Anbu
6315ce5dd1 qcacmn: Add dependency of blacklist manager macro at WMI layer
The blacklist manager macro is connection manager specific, whereas
the macros used at WMI is dependent on roam offload.
Hence mark of dependency of FEATURE_BLACKLIST_MGR on
WLAN_FEATURE_ROAM_OFFLOAD.

Change-Id: If48b701a450d34915d57780a274311aa2590c89a
CRs-Fixed: 2746160
2020-08-03 19:08:13 -07:00
Naman Padhiar
a791b154c5 qcacmn: Send WMI HOST WAKEUP command over QMI
Add support to send HOST_WAKEUP WMI command over QMI for
WCN6750 target. Host sends HOST_WAKEUP command over QMI
itself and FW brings target out of power save mode, process
HOST_WAKEUP command and send back corresponding event over QMI.

Change-Id: I897749391683a7a7b53d4b6af57f258b1e02135c
2020-08-01 09:01:07 -07:00
Rajasekaran Kalidoss
2415379851 qcacmn: Add event id's for TWT complete events
Add TWT event ID's for add, delete, pause and
resume twt events.

CRs-Fixed: 2743159
Change-Id: If4a0972ab41b88bdcffeb93f60afda9ffb9f9108
2020-08-01 09:01:00 -07:00
gaurank kathpalia
1adfeac4b8 qcacmn: Enhance BLM infra
Enhance BLM infra to include source,
reason for blacklist, original timeout,
received time for better debug.

Change-Id: I9bad1970816bc45e16331f90182f1d9d4a01d6eb
CRs-Fixed: 2744400
2020-07-31 16:26:38 -07:00
Shwetha G K
540ae68533 qcacmn: Support capture_count and MO marking enhancement
Send capture_count, capture_interval_mode_sel and MO marking
field as part of WMI_CFR_CAPTURE_FILTER_CMDID command.

Change-Id: Icf2738d49eaea711f69915302dc2655298958a33
2020-07-31 14:13:11 -07:00
Abhinav Kumar
e936132a21 qcacmn: Save info related to WTC BTM roaming
Save info related to WTC BTM roaming coming via
wmi_roam_trigger_reason_tlv_param.

Change-Id: Iec089ba48b2ff30c09838119144b2b0f0abf9e65
CRs-Fixed: 2740598
2020-07-31 12:02:38 -07:00
Pragaspathi Thilagaraj
8fe9240f54 qcacmn: Fix possible OOB access while sending ext stats request
In 32-bit systems, currently there is possible oob access in
send_stats_ext_req_cmd_tlv() is preq->request_data_len is
uin32_t max and len is also of type uint32_t.

Fix possible OOB access while sending ext stats request message
to firmware by validating the requested data length against the
difference between wmi max message size(WMI_SVC_MSG_MAX_SIZE),
size of the wmi command fixed param and wmi tlv header size
WMI_TLV_HDR_SIZE.

Change-Id: I769c9a6b7c0e0f76e2ec1070cac6c69768816454
CRs-Fixed: 2724256
2020-07-31 12:02:35 -07:00
Kiran Venkatappa
857a439237 qcacmn: Move wmi print macros out of WMI_INTERFACE_EVENT_LOGGING
Macros like wmi_warn, wmi_alert, wmi_debug and others are not dependent
on WMI_INTERFACE_EVENT_LOGGING feaure. Move these outside to fix
compilation errors observed when this feature is disabled.

Change-Id: Ia585f4b947063828e2038d87b4736267d9aaad88
CRs-Fixed: 2742439
2020-07-29 11:38:46 -07:00
Shwetha G K
e18a6dab27 qcacmn: Add service_bitmap to support CFR capture_count & MO marking
Add wmi service_bitmap to support CFR capture_count & MO
marking.

Change-Id: I4e72dd089971dbbfc8391bb8d4eca1400bb94f77
2020-07-28 17:39:09 -07:00
Shwetha G K
4876ce33bf qcacmn: Add support for wmi_ext2 service bitmap
Add support for wmi_ext2 service bitmap

Change-Id: I2c147b91e11c2487027a7af88ff1752c7b48730b
2020-07-28 17:39:06 -07:00
Rhythm Patwa
4f9a9d0938 qcacmn: Add tx_flag to Host WMI mgmt frame structure for incorrect key support
Add 'tx_flag' param to wmi_mgmt_params structure for configuration
to use incorrect key for encryption of mgmt frame.

The 'tx_flag' param is primarily added to provide additional
test configuration options for mgmt frames.
Currently it only has support to encode the mgmt frame with
incorrect key for PMF protected connection.

Change-Id: Id894c735c4c612a75506a33938372c3fa2e7f24a
CRs-fixed: 2690147
2020-07-24 15:18:15 -07:00
Gururaj Pandurangi
b1f6686944 qcacmn: Enable three new 5.9 ghz channels for US
Add new channel bonding pairs as well as frequency
pairs for 40, 80 and 160 MHz with the support of
three new 5.9 GHz channels 169, 173 and 177.
Add new API reg_modify_chan_list_for_5dot9_ghz_channels
to enable/disable these new channels based on
INI value and service bit.

Change-Id: I8598e705ba4047e96e7167661ba70d4236cde251
CRs-Fixed: 2696211
2020-07-23 17:24:06 -07:00
Rathees kumar Chinannan
199049f281 qcacmn: Add new param on peer assoc command
Add new param on peer assoc command to pass sta
type for bsscolor.

Change-Id: I83f78c07f9079b23629c2f7f42d67ae9630c2d6c
CRs-fixed: 2727001
2020-07-22 03:21:40 -07:00
Srinivas Dasari
b6130d4eb6 qcacmn: Process NAN events even when nan_disable_support is present
Currently, host driver processes NAN events only if
wmi_service_nan_dbs_support is advertised by the firmware. But NAN
concurrency is handled in host in non-DBS platforms also when
wmi_service_nan_disable_support is advertised by the firmware.
So, process the events if any of these two are capabilities
are present.

Change-Id: Ib571ef69ea177ddd758f800448939122126339b8
CRs-Fixed: 2735465
2020-07-20 04:46:55 -07:00
Abhinav Kumar
93ea2cf59b qcacmn: Process Disconnect request from FW
FW sends a disconnect request to HOST while roaming failure
through event WMI_VDEV_DISCONNECT_EVENTID per vdev id.
Process WMI_VDEV_DISCONNECT_EVENTID and issue disconnection.

Change-Id: I0d3d2ddf0cab65eecbfc7676e9b21f2cc19971e2
CRs-Fixed: 2731954
2020-07-17 21:25:51 -07:00
Shiva Krishna Pittala
b6a6d5e2c4 qcacmn: Add Host abstraction for WMI pdev param SR_TRIGGER_MARGIN
Pdev parameter WMI_PDEV_PARAM_SR_TRIGGER_MARGIN is added to configure
the safety margin which will be used in calculating the acceptable
interference level for PSR based Spatial Reuse operation.
Add the host abstraction for the same parameter.

CRs-Fixed: 2729664
Change-Id: Iae542d4f7de23520ee00719e721d81e32737a191
2020-07-17 17:23:27 -07:00
Shashikala Prabhu
065e48fb63 qcacmn: Add wrapper function to get host pdev_id from tgt_pdev_id
Add wrapper function to get host pdev id from target pdev id.

Change-Id: I4628955569d741765efc515949909d9ea358e54a
CRs-Fixed: 2711423
2020-07-17 01:51:30 -07:00
Abhinav Kumar
55d706efcd qcacmn: Add service bit for CONFIGURE_ROAM_TRIGGER_PARAM_SUPPORT
Add new service bit for
WMI_SERVICE_CONFIGURE_ROAM_TRIGGER_PARAM_SUPPORT.

Change-Id: I3f2683c5284cdc615270fd653e6173649c543c04
CRs-Fixed: 2733024
2020-07-16 20:05:37 -07:00
hqu
ee897412af qcacmn: Move rso related process to connection manager [PART 1]
Based on new macro ROAM_OFFLOAD_V1, define
send_roam_scan_offload_rssi_thresh_cmd to different
function pointer type.

Change-Id: I965b8c0a2a2660b9560d48a92ad693a7efb7aaff
CRs-Fixed: 2730850
2020-07-16 20:05:31 -07:00
Abhinav Kumar
a5c1fed773 qcacmn: Extract btm response and initial roam stats
Extract btm response and initial roaming stats coming
from FW through WMI_ROAM_STATS_EVENTID event as
wmi_roam_btm_response_info_tlv_param and
wmi_roam_initial_info_tlv_param respectively.

Change-Id: I680260276530368aab0e783bf4ef83edb0fe0d62
CRs-Fixed: 2728465
2020-07-16 20:05:28 -07:00
Srinivas Dasari
4e5cfb2ac9 qcacmn: Add vdev param to configure NAN feature bitmap to firmware
Define a new vdev param to set corresponding bit to enable/disable
a particular NAN feature.
Currently, Framework configures NAN DW as 4 seconds when the
device is in sync role and the screen is off. But customers might
want this to be 512ms always irrespective of screen off/on.
Send the vdev param on NAN vdev by setting the "bit 0" to 0 to
indicate firmware to ignore framework configured DW value and
consider the firmware default value.

Change-Id: Idcbdae94bd6a96fbbe15ec103a0aa558cdfcd572
CRs-Fixed: 2721980
2020-07-08 18:55:57 -07:00
aloksing
093d940112 qcacmn: Add wmi support wifistats
Send WMI command to FW with provided tlv from wifistats

Change-Id: I80ac9f621c75429bdca18962423026c2008a71d0
2020-07-08 08:59:19 -07:00
phadiman
1fe461c320 qcacmn: Add WMI LOG for Set Peer parameter
Add WMI LOG for set peer parameter for debug
purposes like set peer_nss, peer_nss_160

CRs-Fixed: 2726041
Change-Id: Ib1a3d22cd101b76efc07121fc333d303b1a26377
2020-07-07 14:16:54 -07:00
Surabhi Vishnoi
20e9e49e70 qcacmn: Add support for WMI_VDEV_BCN_LATENCY event
Add interface changes for WMI_VDEV_BCN_LATENCY_EVENTID which
is sent by firmware to indicate the latency IE received from
connected AP in beacon.

Change-Id: Ia6cec01be89f13885b011414f0d77f64c6eb05ee
CRs-Fixed: 2723226
2020-07-06 11:23:14 -07:00
gaolez
f4c326f721 qcacmn: Add length check in ndp event handler
qcacld-2.0 to qcacld-3.0 propagation

Add length check to prevent the data overflow the wmi buffer. The
length in the fixed_params and TLV hdr also need check.

Change-Id: I2bbf9f08b6c19062324dca420af08ff94835eaca
CRs-Fixed: 2248879
2020-07-03 15:00:41 -07:00
Subrat Dash
f5419dc428 qcacmn: Fix NULL pointer dereference in oem data command
Avoid pointer dereference before NULL check.

Change-Id: I941121bf699b08f847865c511520520947ef60f4
CRs-fixed: 2722422
2020-07-02 18:23:33 -07:00
Uraj Sasan
307b78c912 qcacmn: Send "tx_max_mcs_nss" for tlv command
Add tx_max_mcs_nss for TLV command.
It is used in computing nss and mcs for tx path.

Change-Id: Id5d4e5ff5318582586d3e29609a9feaa52516fe0
2020-07-02 08:48:18 -07:00
Abhishek Singh
e2097ddb09 qcacmn: Replace different struct of SISD with struct wlan_ssid
There are different version of SSID structure used in driver, replace
them with struct wlan_ssid.

Also move struct element_info from scan module to generic structures.

Change-Id: Ia32f82d943980c23b4ff478f5a06c5c053036de5
CRs-Fixed: 2721872
2020-07-01 00:26:20 -07:00
Pragaspathi Thilagaraj
acc60e6ede qcacmn: Add support to send WMI_VDEV_SET_PCL_CMDID command
For STA + STA roaming, instead of WMI_PDEV_SET_PCL_CMDID, the
WMI_VDEV_SET_PCL_CMDID needs to be sent.
Declare the corresponding send_vdev_set_pcl_cmd wmi tlv ops for
sending the WMI_VDEV_SET_PCL_CMDID command.
Also add changes to read the peer create confirmation and dual
sta roam feature support firmware capability.

Change-Id: I21456cb2e4c0b2bb66bf341539d2070677c49d16
CRs-Fixed: 2702849
2020-06-27 06:18:25 -07:00
Rachit Kankane
e85e67ce9b qcacmn: Add no interband mcc service bit
Add WMI service bit for targets which doesn't
support interband MCC.

Change-Id: Ia7c93ed0b53dfb539457167722bc3b04fb27032b
CRs-Fixed: 2715598
2020-06-26 05:37:40 -07:00
Abhishek Ambure
d5aa3cc44f qcacmn: Add support for roam capability report event
Firmware sends WMI_ROAM_CAPABILITY_REPORT_EVENTID event asynchronously
to host during FW init. It indicates FW roam related capabilities to host.
scoring_capability_bitmap in the event indicates firmware candidate scoring
capabilities. Host uses scoring_capability_bitmap to calculate roam score.

Change-Id: Idd2cad257e5d783166bd8cc0418dd4f394989295
CRs-Fixed: 2716781
2020-06-25 16:46:57 -07:00
Pragaspathi Thilagaraj
f49eeb2735 qcacmn: Remove roam related wmi files from cmn
Move the roam related wmi files to qcacld-3.0 folder.

Change-Id: I4146646cbb73c38e03de490f8dee66439ae85a68
CRs-Fixed: 2714613
2020-06-25 03:49:58 -07:00
Jayachandran Sreekumaran
cb709cad18 qcacmn: iot_sim code cleanup in wmi
Refactor code and put iot_sim code under feature flag.

Change-Id: Id4720d63ae174d9f4490285e6eb69ab2972ccd28
CRs-Fixed: 2707122
2020-06-24 03:34:54 -07:00
Jianmin Zhu
1a387e156e qcacmn: Add log for roam scan mode
Add debug log when send roam scan mode to firmware.

Change-Id: I3d897778bbb1bf35a19882e78e51a8d44b4a3d40
CRs-Fixed: 2714627
2020-06-23 04:01:14 -07:00
Vignesh U
ace59f2d1f qcacmn: Update OCAC completion Host structure and processing routine
The OCAC completion event 'wmi_vdev_adfs_ocac_complete_event_fixed_param'
has been updated to include center frequencies of 2 segments in MHz for
165Mhz Agile mode.

Update the corresponding Host OCAC completion data structure
'vdev_adfs_complete_status' to include 2 center frequencies to support
165MHz Agile mode.

Also FW might send a delayed OCAC completion status after the Host has
configured a new agile channel. So all the OCAC completion events should be
validated if the status is received for the current agile channel.

Update the OCAC completion processing API to include 2 center frequencies
and chwidth so that, it is possible to check if the OCAC completion status
is received on current agile channel or an obsolete agile channel.

CRs-Fixed: 2705671
Change-Id: Iab8980f8d030120d107f068d890c9694d28ee98c
2020-06-19 21:47:30 -07:00
Subrat Dash
94bf91fc2b qcacmn: Add support to send pdev id in the oem data wmi cmd
The FW API is updated for pdev_id in the fixed param.
The pdev_vdev_flag is used to indicate whether the command
is meant for pdev or vdev.

The pdev_vdev_flag should be set to 1 for pdev command and 0 for
vdev command.

CRs-Fixed: 2693893
Change-Id: I99aabb9b73fd44d746342dfc1741fc6585c0863c
2020-06-16 06:15:54 -07:00
Srikanth Marepalli
0497ce7057 qcacmn: Fix buffer overflow while memcpy of pmk_ext
Due to commit : Ia630580bba050513800e3acac875baf937ec8d14
while processing RSO command driver fills the pmk_ext_len without
checking the pmk_len. If pmk_len is NULL then pmk_ext_len gets
filled with a negative value and after this while doing the
memcpy it will cause the buffer overflow due to invalid length.

Fix is to verify pmk_len before filling the value in pmk_ext_len.

Change-Id: I506d691ca5bd5d627fc85073346698126ad2ba56
CRs-Fixed: 2707959
2020-06-15 15:59:02 +05:30
Arun Kumar Khandavalli
1eb43f3787 qcacmn: remove panic if the tag length and filled data are not matching
Remove panic when tlv doesn't matching attributes, the following commit
takes away a chance to pass invalid values tlv to test the the wmi event
hence reverting commit ca24670e56.


Change-Id: Iafff2067288c8a6fafa016f21b1d7fdfdcb0753e
CRs-Fixed: 2706245
2020-06-10 11:53:35 -07:00
Abhishek Ambure
374d2eee38 qcacmn: Add support to send max ndi host supports to fw
Host configures max ndi interfaces support to firmware using
WMI_INIT_CMD. In resource config of WMI_INIT_CMD, host updates
max number of ndi interfaces support and sends it to firmware.

Change-Id: I44ccbe726663bc18d3c69b4aae0b0e3e9c1501ee
CRs-Fixed: 2701559
2020-06-10 07:26:09 -07:00
Abhishek Ambure
afdf76270f qcacmn: Add support to send ESS RSSI roam trigger to fw
Firmware uses the ESS report element information from beacon. For
roaming, station uses ESS report information to consider next AP.

Hence add support to send ESS RSSI roam trigger reason to firmware.

Change-Id: Id10cd3030d4dffde0bbcc883d582c5ca7e0f1005
CRs-Fixed: 2688520
2020-06-08 21:09:44 -07:00
Shashikala Prabhu
a76f88adb8 qcacmn: Add support to populate target 11AX wireless modes
Add support to populate 11AX wireless modes advetised in ext2 service
ready message. To support older FW that do not advertise this, use
existing host workaround to populate these in host  itself.

Change-Id: I3b3b280672592c858bd3f6f0e368909a16bd30ee
CRs-Fixed: 2650136
2020-06-08 18:37:03 -07:00
Abhishek Ambure
23dab4b3a5 qcacmn: Add support to send max ndp sessions to fw
Firmware advertises max number of ndp sessions support in
wmi_service_ready_ext2 event. If the firmware advertised value of
max ndp sessions is non-zero, then host uses a minimum of max ndp
sessions of target_resource_config and firmware advertised max ndp
sessions to configure max ndp sessions in firmware using WMI_INIT_CMD.

Change-Id: Ied6891157ce589e5d36a4f8b9694a95b5c819ad6
CRs-Fixed: 2688393
2020-06-08 16:01:08 -07:00
Arun Kumar Khandavalli
ca24670e56 qcacmn: Crash if the tag length and filled data are not matching
Whenever a wmi even it received the tlv received from the firmware
will be sanitized, if there is any error the event would be dropped.
This dropping of the event can give side effects in the host/firmware
after some time and making it difficult to find the actual reason of
why the tlv is not received properly.

Crash the system if the tlv is not parsed correctly to debug the issues.

Change-Id: Ic56e3f96252ac74917caeebc8296c2b50ae4f3cd
CRs-Fixed: 2695053
2020-06-07 03:13:54 -07:00
Lincoln Tran
d7ffb6df23 qcacmn: Update wmi_discard_fw_event
Update return type of wmi_discard_fw_event to return QDF_STATUS
to match scheduler_msg_process_fn_t.

Change-Id: Iba2d41c4bab2bfd5fb163d82fca6c6b895e5a2a4
CRs-fixed: 2699644
2020-06-02 03:22:52 -07:00
Abhishek Ambure
101c1fdeda qcacmn: Send oce_subnet_id_weightage_pcnt to firmware
In struct weight_config, "oce_subnet_id_weightage" added newly.
Station uses "oce_subnet_id_weightage" as one of the parameter for
selecting AP candidate during initial connection. Host sends
"oce_subnet_id_weightage" ini value to firmware over WMI command
WMI_ROAM_AP_PROFILE.

Add oce_subnet_id_weightage in scan object scoring param to calculate
weightage based on SUBNET ID and select candidate accordingly.

Change-Id: I6583f46f661eaefabbad858bc7fb34e37443ebae
CRs-Fixed: 2675924
2020-06-01 01:37:41 -07:00
Lincoln Tran
bf4490a41d qcacmn: Remove min check for channel list
Remove the min check for channel list in PNO scan as there is no
limitation in FW for number of channel. The min check is truncating
the 6G channels.

Change-Id: Ic12a82e6b1f9d22c6136abc01125f0465fe821c9
CRs-fixed: 2661087
2020-05-22 18:30:09 -07:00