Commit Graph

708 Commits

Author SHA1 Message Date
Kiran Kumar Lokere
7ec465930a qcacmn: Add support to configure action frame in HE TB PPDU
Add support to send the action frame in HE TB PPDU configuration
to firmware.

Change-Id: I8f8f63652e0890736266766b283411464f8903b9
CRs-Fixed: 2347028
2018-11-22 00:43:44 -08:00
Aditya Sathish
1ce1a2e34a qcacmn: Fix WMI for peer channel re-intersection
Fix WMI message for peer channel width switching to account
for reserve space allocated in the message between num_peer
and chan_width_peer_list.

Change-Id: I5f0cec3c263cb68f44f0fcaa2aa26d120e807b1a
CRs-Fixed: 2352372
2018-11-20 10:31:40 -08:00
Pavankumar Nandeshwar
ad5e0bd66f qcacmn: Change fwlogs API for smartlogs
Add function pointers for calling smartlogs init and deinit.

CRs-Fixed: 2008290
Change-Id: I4734e490394a24f5a39eb50f3ac386ad99834cb3
2018-11-19 11:05:49 -08:00
Vivek
0844327b5e qcacmn: Remove unused and duplicate members from vdev_start_params
Remove the unused fields from WMI unified vdev_start_params structure.
The channel information duplicated in vdev_start_params and
it sub structure channel is removed and all implementations
can use the channel sub structure directly.

Change-Id: I47cf4c4223111b6f564ec8336dbfcda4592e8e0c
CRs-Fixed: 2350505
2018-11-19 03:19:44 -08:00
gaurank kathpalia
07e79f5860 qcacmn: Fill vdev nss chain params structure
Fill the nss chain params structure, with the dynamic params
and send to FW.

Change-Id: I6d9589b1af33a3bf2d4895424c22ca0c24b4b9a8
CRs-Fixed: 2349795
2018-11-16 05:10:23 -08:00
Ashish Kumar Dhanotiya
c4fd271d20 qcacmn: Send the vdev chain params to fw
Send the vdev nss, chain params to fw.

Change-Id: Ie62ea5001c579545b43b4c30ab15d9023e636042
CRs-Fixed: 2347628
2018-11-16 05:10:17 -08:00
gaurank kathpalia
df157bd26a qcacmn: Add wmi service for per vdev chain support
Add and populate the wmi service for per
vdev nss chain support feature.

Change-Id: I30a0921186826892f87433287ab206b168cee964
CRs-Fixed: 2347627
2018-11-16 05:10:14 -08:00
phadiman
e5a330acf6 qcacmn: Set WMI Endpoint as Async
Conditionally set WMI enpoint as
async only for WIN and revert it
for MCL

Change-Id: I8969fffb4ba72909839baea2bdd12723665a8a4f
2018-11-15 01:38:33 -08:00
Kris Muthusamy
a999ec4a42 qcacmn: WMI changes for rawmode open config WAR
Add WMI changes for rawmode open config WAR.

Change-Id: Ia7dd3ae6f40509d01c59413b7f3ad8410c9aa801
2018-11-14 18:51:51 -08:00
Pragaspathi Thilagaraj
4db72ac87b qcacmn: Fix null pointer dereference in extract_sar_limit_event_tlv
When WMI_SAR_GET_LIMITS_EVENTID is received from firmware, the
function extract_sar_limit_event_tlv is called to update the SAR
limits for all the chains of each band. There is a for loop
defined to loop over each item in param_buf->sar_get_limits.
Since the param_buf->sar_get_limits could be either optionally
defined or not a part of the message at all there is a potential
NULL pointer dereference if sar_get_limits is not sent as part
of the WMI_SAR_GET_LIMITS_EVENTID event.

param_buf->sar_get_limits needs to be checked for NULL prior to
derefencing it.

Change-Id: I93c07fa8048df97c6f6960b0db6df3bbc30e23b4
CRs-Fixed: 2336928
2018-11-14 09:03:51 -08:00
Rhythm Patwa
8ff2fb7fa8 qcacmn: Add WMI support for configuring UL parameters
Add wmi vdev param support for UL parameters.

Change-Id: I3f742daf5691b0867c42b447c26efa640478800f
CRs-fixed: 2226303
2018-11-09 08:19:53 -08:00
Pavankumar Nandeshwar
03b0b38c07 qcacmn: Add flags to enable vow stats in firmware
Add flags WMI_HOST_FW_FEATURE_VOW_FEATURES and
WMI_HOST_FW_FEATURE_VOW_STATS which will be sent
to firmware to enable VOW stats.

Change-Id: I7829327ac21406af309f21b79f9f040687997275
CRs-Fixed: 2340765
2018-11-09 04:12:22 -08:00
Arif Hussain
e1a66b56e2 qcacmn: Add support for obss spatial reuse default threshold
Add support to send default offsets to firmware.

Change-Id: I5d566fbd5eb074e7aac94f793c5431734c2e0922
CRs-Fixed: 2345173
2018-11-07 00:12:24 -08:00
narayan
fdf921110e qcacmn: Adding wmi param as part of peer_extd_stats
Adding two members including tx sgi_count in
host peer_extd_stats structure which is received from
the fw and populated to upper layer along with adding two
members to cdp_rx_stats.

Change-Id: Id45b2d0042d01771ac74a906d72c369c3dc31394
CRs-Fixed: 2147922
2018-11-06 22:40:05 -08:00
Dustin Brown
f88a90fad9 qcacmn: Reduce 'no event handler registered' log
Change I9a14a3defc61462bf4c7a8f0278e258603b781c7 moved a log in
wmi_control_rx indicating that a specific event Id has no associated
handler from debug-level to error-level. This resulted in excessive
logging, as the driver has no obligation to handle every event type
received from firmware and very well might not want to handle every
event type received from firmware. Restore the original debug-level to
the log.

Change-Id: I4b1118fef7e4752dbaaf796db2f9444927c7e178
CRs-Fixed: 2341953
2018-10-31 19:20:52 -07:00
Rajeev Kumar Sirasanagandla
3e8da3a6a6 qcacmn: Avoid buffer overflow in roam scan stats extract handler
In extract_roam_scan_stats_res_evt_tlv(), there is potential
buffer-overflow due to no input validation of following event
parameters from firmware:
(a) Roam scan frequencies against maximum value of 50
(WMI_ROAM_SCAN_STATS_CHANNELS_MAX) and
(b) Roam scan candidates against maximum value of 4
(WMI_ROAM_SCAN_STATS_CANDIDATES_MAX)

To fix this, validate roam scan stats event parameters.

Change-Id: I866b492f7ccb48c4960ff25a9e817cbdb394509e
CRs-Fixed: 2335530
2018-10-30 06:29:39 -07:00
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
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
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
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
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
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
phadiman
1a2f48a775 qcacmn: Set WMI endpoint as async
WMI endpoint will receive commands
from both user context and kernel
context

Hence making the it as asynchronous

Change-Id: Ia969bb9db6a8978a7f50bc19f9f602dfbc1c83ea
CRs-Fixed: 2313262
2018-10-18 16:58:46 -07:00
Arif Hussain
03673ae28f qcacmn: Fix integer overflow in roam scan stats extract
In extract_roam_scan_stats_res_evt_tlv(), validate
num_roam_scans to avoid any possible integer overflow
when receive larger num_roam_scans value.

Change-Id: I0f3bbf64fac8c151789de2f93a77c9af29b855d1
CRs-Fixed: 2331868
2018-10-18 14:22:29 -07:00
Jianmin Zhu
2c09245385 qcacmn: Avoid OOB in create_reg_rules_from_wmi
the fixed_param TLV structure is pulled from the WMI message and
assigned to chan_list_event_hdr. num_2g_reg_rules and
num_5g_reg_rules are assigned from the TLV structure, then passed
to create_reg_rules_from_wmi without length check, out of buffer
may happen.

Change-Id: I70c9d74ef94161896e1c7700c73943040f3a77e1
CRs-Fixed: 2327667
2018-10-18 12:44:38 -07:00
Ashish Kumar Dhanotiya
8efaac88d4 qcacmn: Null pointer access in green ap egap status event
While extracting green ap egap status info there is no
sanity check for egap info event and chainmask event which may
lead to NULL pointer access.

To prevent this NULL pointer access add a sanity check for
egap info event and chainmask event.

Change-Id: Ib9cc273f12bb159bce309065279230e96925be7f
CRs-Fixed: 2331873
2018-10-18 03:58:02 -07:00
Alok Singh
1ae17d8c6f qcacmn: Add ctl failsafe event
CTL failsafe event handler adds the capability to inform host
when failsafe algorithm invoked.

CRs-Fixed: 2333137
Change-Id: I91298c9be1f0f8291c927dbd3ac4a2a9f1b9f31b
2018-10-18 02:17:40 -07:00
Abhijit Pradhan
bbdd2dcc99 qcacmn: WMI changes for NOL violation
This commit contains the following changes related to FR49350:
usenol pdev param declaration and implementation of wmi cmd to send
the param to FW.
Failure status code declaration for scan and vdev start.

CRs-Fixed: 2328894
Change-Id: I5d3bfe758aeb9907193b6f626582b70413f5381c
2018-10-18 02:17:10 -07:00
Rajesh Chauhan
b13d3af59f qcacmn: Print input bw in tdls_get_wmi_offchannel_bw for error case
In tdls_get_wmi_offchannel_bw in default case uninitialized output
bw is printed instead input bw. This will result in printing
uninitialized variable.

Change-Id: I7819dad3426fbe1b4c4626bc69744e3ee59ba18f
CRs-Fixed: 2329333
2018-10-17 14:28:30 -07:00
Pratik Gandhi
5526a55fa2 qcacmn: wmi logging - buffer offset for multi-radio
Move buffer offset to wmi soc as buffer offsets are same for all
pdevs in soc.

Change-Id: I7822ae18212d66420ce6c68341c38c9737de2f58
CRs-Fixed: 2330630
2018-10-17 05:50:44 -07:00
Rakshith Suresh Patkar
5c881ec3ec qcacmn: Update debug info in wbuff_buff_get()
The debug node for all the nbufs allocated by wbuff
for a module contains the file and line info
pertaining to wbuff_module_register().

To enhance debugging, Use qdf_net_buf_debug_update_node()
to update debug info when nbuf is requested through
wbuff_buff_get().

Change-Id: Ie8b148ef6313bd3b265cfa3f141e8d0de8b75597
CRs-Fixed: 2328257
2018-10-16 21:21:15 -07:00
Nandha Kishore Easwaran
91edd5ac29 qcacmn: Change pdev_stats to pdev_stats_v2
Change the wmi_pdev_stats structure to wmi_pdev_stats_v2 structure.
This change is needed because of corresponding change made in FW
for renaming the structure.

Change-Id: I6dd3abd61730d8f17d74a11a42978a64853136e5
2018-10-16 15:23:02 -07:00
Qiwei Cai
770c90f8ca qcacmn: Featurize WMI APIs and TLVs that are specific to MCL
In the existing converged component, WMI TLV APIs are implemented in
a generic manner without proper featurization. All the APIs exposed
outside of WMI are implemented in wmi_unified_api.c and all the APIs
forming the CMD or extracting the EVT is implemented in wmi_unified_tlv.c.
Since WIN and MCL have a unified WMI layer in the converged component and
there are features within WIN and MCL that are not common, there exists a
good number of WMI APIs which are specific to WIN but compiled by MCL and
vice-versa. Due to this inadvertent problem, there is a chunk of code and
memory used up by WIN and MCL for features that are not used in their
products.
Featurize WMI APIs and TLVs that are specific to MCL -
- DSRC
- NAN
- P2P
- PMO
- roaming
- concurrency
- STA
- Generic MCL specific WMI (STA)

Change-Id: I03a68b0db30a3aa585b269ab0a1745b37bc7e0b7
CRs-Fixed: 2316935
2018-10-16 13:40:25 -07:00
narayan
a566dce41a qcacmn: WMI support added for sifs_trigger interval config
FR: TDMA Support for Wave2 Radios (host support)
Added a wmi cmd for configuring the interval between successive sifs
trigger frames given by the user app. Added a separate wmi cmd instead
of wmi param with reference to further scope.

Change-Id: Ifa778a761e3495ef7abab5f63a49661b307034ae
CRs-Fixed: 2330484
2018-10-16 11:38:15 -07:00
Wu Gao
b9a832ec33 qcacmn: Check chain mask tables number valid
Chain mask tables number is from wmi service ready ext event, it is
not check valid which will cause oob read arry of chain mask tables.

Change-Id: I2fa0251358ed66d928477c0b55933ca028c8bd53
CRs-Fixed: 2331850
2018-10-16 11:38:05 -07:00
Jianmin Zhu
74b6ab3e30 qcacmn: Fix OOB in extract_reg_11d_new_country_event_tlv
In extract_reg_11d_new_country_event_tlv(), the
reg_11d_country_event->new_alpha2 buffer from the original WMI
message is copied into reg_11d_country->alpha2. Will only copy
REG_ALPHA2_LEN bytes into a buffer that REG_ALPHA2_LEN +1 bytes.
then reg_11d_country->alpha2 buffer is printed as a string.
Because the original reg_11d_new_country structure in
tgt_reg_11d_new_cc_handler() was allocated on the stack and
not initialized, there is no guarantee that the buffer is
NULL terminated. Due to this the WMI_LOGD() call will result in
an OOB issue when printing the buffer.

Change-Id: I20b0044974438d95e4c09f843db2a7f369c9b85d
CRs-Fixed: 2327718
2018-10-15 12:47:28 -07:00
Harprit Chhabada
3871ce8c90 qcacmn: Fix OOB read in extract_ndp_confirm_tlv()
In the call to QDF_TRACE_HEX_DUMP in extract_ndp_confirm_tlv(),
the buffer, event->ndp_cfg is dereferenced an additional time
and then read the length number of bytes in hex_dump_to_buffer,
resulting in an OOB read.

As WMI logging is already enabled, remove the hex dump.

Change-Id: I6a866e87dd80f3e41cf3c699ff4846416d309cf3
CRs-Fixed: 2326012
2018-10-12 15:18:15 -07:00
Yeshwanth Sriram Guntuka
59648ac529 qcacmn: Fix out of bound access in extract_single_phyerr_tlv
Bufp and buf_len are populated in extract_comb_phyerr_tlv
without validating the buf_len which can cause possible
out of bound access in dfs_phyerr_event_handler.

Fix is to validate the buf_len against num_bufp in param_tlvs.

Change-Id: I95e18d7600f8419f31e768fcc18c3024fe37b7db
CRs-Fixed: 2321371
2018-10-08 15:56:56 -07:00
Jingxiang Ge
e00afe8783 qcacmn: Add vdev id sanity check in extract_gtk_rsp_event_tlv
While handling WMI_GTK_OFFLOAD_STATUS_EVENTID, QDF_BUG()
can occur in pmo_tgt_gtk_rsp_evt->pmo_psoc_get_vdev if
vdev_id is out of range. As the value is directly from
WLAN FW and can be outside the trust boundary.

Add sanity check for vdev id once get parameter from
wlan fw.

Change-Id: I335df52fece39c1a51a556ba4678bd43f470673a
CRs-Fixed: 2321523
2018-10-08 05:26:45 -07:00
Aditya Sathish
a06a063b7d qcacmn: Add host WMI support for EAPOL minrate resource config
Add host WMI support for EAPOL minrate resource configuration.

Through the use of the global.ini configuration parameter -
eapol_minrate_set and eapol_minrate_ac_set, the user can set EAPOL
frames to be sent in minimum rate in tunnel mode. In addition to
this, the user can also select between the 4 ACs (BE, BK, VI, VO)
to send the EAPOL frames.

The changes are reflected in the target resource config which
is sent to the firmware.

Change-Id: Ib9a264b64305bf43708c3c2af3ff254b6cc28477
CRs-Fixed: 2298020
2018-10-08 01:53:22 -07:00
Tallapragada Kalyan
16395277c9 qcacmn: pass pdev wmi_handle to lro hash config
pass pdev wmi_handle instead of soc wmi_handle
for lro hash config to avoid target assert.
CRs-Fixed: 2319084

Change-Id: Ic570b07367cd34b39d50324ff709f827d550b6c8
2018-10-08 01:53:19 -07:00
Manikandan Mohan
a45200bb7f qcacmn: Fix out-of-bounds read in extract_ndp_sch_update_tlv
Update WMI_NDL_SCHEDULE_UPDATE_EVENTID handling for possible out
of bounds read when fixed_params->num_channels is greater than
TLV length of NDL channel list or NSS list and fixed_params->
num_ndp_instances is greater than TLV length of NDP Instance list.

Change-Id: Idbd74e30868597c9787095372516b7d7dd12481b
CRs-fixed: 2327673
2018-10-06 16:57:51 -07:00
Manikandan Mohan
c078394102 qcacmn: Fix out-of-bounds read in extract_ndp_confirm_tlv
Update handling of WMI_NDP_CONFIRM_EVENTID for possible out of
bounds read when fixed_params->num_ndp_channels is greater than
TLV length of NDP channel list or NSS list

Change-Id: I3bf429a47c46edbb464cf8447f227f7baa74fbe3
CRs-fixed: 2325849
2018-10-06 16:57:48 -07:00
Gyanranjan Hazarika
584a187b8d qcacmn: changes for BSS Color Enahancement FR40903
Added WMI extract API for beacon_tx_status_event

Change-Id: I8516184d5734672d56553fb232bd8e84d89ded58
CRs-fixed: 2242109
2018-10-05 22:10:09 -07:00
Sathish Kumar
a8dcd50683 qcacmn: Featurize WMI APIs and TLVs that are specific to WIN
In the existing converged component, WMI TLV APIs are implemented in
a generic manner without proper featurization. All the APIs exposed
outside of WMI are implemented in wmi_unified_api.c and all the APIs
forming the CMD or extracting the EVT is implemented in wmi_unified_tlv.c.

Since WIN and MCL have a unified WMI layer in the converged component and
there are features within WIN and MCL that are not common, there exists a
good number of WMI APIs which are specific to WIN but compiled by MCL and
vice-versa. Due to this inadvertent problem, there is a chunk of code and
memory used up by WIN and MCL for features that are not used in their
products.

Featurize WMI APIs and TLVs that are specific to WIN
- Air Time Fareness (ATF)
- Direct Buffer Rx (DBR)
- Smart Antenna (SMART_ANT)
- Generic WIN specific WMI (AP)

Change-Id: I7b27c8993da04c9e9651a9682de370daaa40d187
CRs-Fixed: 2320273
2018-10-05 02:14:04 -07:00
Basamma Yakkanahalli
98730d5d12 qcacmn: WMI API to send beacon offload control for non tlv
The existing Beacon offload control WMI command is used
to control beacon tx to intimate FW for a VAP the beacon
is suspend or resume.
Added API for non tlv to send WMI_BCN_OFFLOAD_CTRL_CMDID
command to FW.

Change-Id: Ia02f4c7f317460ab766ca765bab14e0cd7acd879
CRs-Fixed: 2269491
2018-10-04 15:52:51 -07:00
Yeshwanth Sriram Guntuka
d3ceb840a7 qcacmn: Release vdev ref in os_if_ndp_end_ind_handler
NAN vdev ref count incremented as part of end_ind handler
is not released which will result in the nan vdev not
getting physically deleted.

Fix is to release nan vdev ref in os_if_ndp_end_ind_handler.

Change-Id: I31a32fa241fb9e86d3a64d490722bc42905970c4
CRs-Fixed: 2325580
2018-10-04 14:05:43 -07:00
Bala Venkatesh
a670c5cc1d qcacmn: Update TDLS opclass correctly to FW
Due to change in Opclass calculation in the new
regulatory component invalid opclass is returned for the
TDLS component. Update arguments to calculate opclass correctly
to regulatory component.

Change-Id: I062bbb55d283f9525da241d32177e26d07aa8590
CRs-Fixed: 2325834
2018-10-03 16:05:42 -07:00
Nandha Kishore Easwaran
27551277a1 qcacmn: Add WMI param to reset beacon stats
Add new WMI param to reset beacon counter in FW.

Change-Id: I03c58b492a606ee3f9e22b783a0dc2177edbb6db
CRs-fixed: 2250012
2018-10-03 08:33:27 -07:00
Shashikala Prabhu
70da943414 qcacmn: Add wmi wrapper function to get target pdev id from host
Add wmi wrapper function to convert host pdev id to target  pdev id.

Change-Id: I3824a7556bf0b740d069602e9ee5a572c427c49c
CRs-Fixed: 2316715
2018-10-02 13:48:38 -07:00