Commit Graph

33 Commits

Author SHA1 Message Date
Pragaspathi Thilagaraj
38b8236ddc qcacmn: Add support for initiate pasn auth vendor command
Add support for initiate pasn authentication using the vendor
command: QCA_NL80211_VENDOR_SUBCMD_PASN
Fill the below required attributes to initiate PASN:
QCA_WLAN_VENDOR_ATTR_PASN_ACTION
QCA_WLAN_VENDOR_ATTR_PASN_PEERS
QCA_WLAN_VENDOR_ATTR_PASN_PEER_MAC_ADDR
QCA_WLAN_VENDOR_ATTR_PASN_PEER_SRC_ADDR

Change-Id: If33f54eafe5986b4571cc21a80fb0b61578db116
CRs-Fixed: 3232261
2022-07-14 04:12:51 -07:00
Pragaspathi Thilagaraj
788ca7bb89 qcacmn: Set 11az Ranging related feature capabilities
Set 11az Ranging related extended capabilities over the
wiphy extended capabilities. Mask these fields for SAP iface

Change-Id: Ib6ce92f42d7125b4e9532d5c893ffe955be0f0dc
CRs-Fixed: 3235143
2022-07-08 21:30:55 -07:00
Pragaspathi Thilagaraj
f0cac26bbb qcacmn: Add support to delete all pasn peers
Add support to delete all pasn peers

Change-Id: I2c3d95cb8994693d8944d69624d2db0992f2f03d
CRs-Fixed: 3158523
2022-07-06 23:08:01 -07:00
Pragaspathi Thilagaraj
ee69671df1 qcacmn: Donot advertise TB and NTB ranging support
Donot advertise TB and NTB ranging support as kernel
doesn't support that flags.

Change-Id: I43ba16a7130dfc570c371db8474bbc136e576173
CRs-Fixed: 3233041
2022-07-04 16:47:39 -07:00
Pragaspathi Thilagaraj
957b6d2307 qcacmn: Add support to initiate PASN authentication request
Register OSIF callbacks with Wifi_pos module to initiate PASN
authentication request.

Call cfg80211_pasn_auth_request() to initiate PASN authentication
from wpa_supplicant for the list of secure peers.

Change-Id: I52b9518526f1b04ad520f2f19c7a4caa9b62b6b0
CRs-Fixed: 3149968
2022-06-28 12:17:57 -07:00
Pragaspathi Thilagaraj
e58618ef1d qcacmn: Use correct wiphy feature flag
Use NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE instead of
NL80211_EXT_FEATURE_PROTECTION_OF_RANGING_NEGOTIATION.
Also remove NL80211_EXT_FEATURE_SECURE_RTT advertisement
which is not required.

Change-Id: I5ba3da86125719f410c925ef40441acddc40ab9a
CRs-Fixed: 3154060
2022-03-23 19:42:32 -07:00
Pragaspathi Thilagaraj
aa27094cab qcacmn: Add support to set 11az ext feature flags
Add support to set 11az ext feature flags
Read the firmware capability for 11az features and
advertise the corresponding wiphy flags.

Change-Id: I85f6cc2f65a5d9892830f66a726cffc823093bca
CRs-Fixed: 3150584
2022-03-23 19:42:26 -07:00
Shashikala Prabhu
a117c19fda qcacmn: Add support to extract the channel info from RTT measreq
Add support to extract the freq, cfreq1, cfreq2, PHY mode, Destination
macaddr, and channel BW values from the RTT measurement request buffer
received from the LOWI application. Pass these values to a registered
callback. Users can use these values to make some decisions on the RTT
scan.

Change-Id: Idb2232c07bbfa2946dc01e75908b9a6036597ecf
CRs-Fixed: 3060685
2021-11-22 15:09:55 -08:00
Yue Ma
674474c55a qcacmn: Add CONFIG_CNSS_OUT_OF_TREE flag
Use CONFIG_CNSS_OUT_OF_TREE to control if CNSS family drivers are
built from in-kernel-tree source or out-of-kernel-tree source since
the exposed header files will be in different paths. This is also
for backward compatibility.

Change-Id: I698492f175ea140e6854c372f366a63f36de24c9
CRs-fixed: 3022556
2021-08-30 13:38:44 -07:00
Abdul Muqtadeer Ahmed
3921edb0ae qcacmn: Fix the integer overflow issue
In the assignment of varaible expected_field_info_size with an expression,
there might be an issue of integer overflow.

To fix this issue add a check for the expression with UINT_MAX
before assigning the expression to variable expected_field_info_size.

Change-Id: Iaa58fc164655d5b074eef55f8fd78f83a71e3fdf
CRs-Fixed: 2825846
2021-04-27 16:13:16 -07:00
Shashikala Prabhu
6d11d6f27a qcacmn: Add support to get pdev_id and psoc from dev_name
LOWI application provides the interface name as part of lowi message to
host driver. Add support in the driver code to get the corresponding
pdev_id and pdev from interface name using  dev_get_by_name().

Change-Id: I267b95c843a9bb1dd0c58ff45767f31999500b1c
CRs-Fixed: 2711423
2020-07-17 01:51:26 -07:00
Vinay Gannevaram
7ccc84acb3 qcacmn: Add support for NLA type OEM_DATA REQ-RESP in LOWI
Host driver processes cld80211 vendor subcmd
CLD80211_VENDOR_SUB_CMD_OEM_DATA and send
response in NLA format. Peer status indication
is also sent in nla format

CRs-Fixed: 2597282
Change-Id: I94f1fb7939141952ef92dbb7d3a130ba20d31608
2020-03-21 12:35:42 -07:00
Vinay Gannevaram
8fd2d1abbf qcacmn: Add support for NLA type CH_INFO_RESP in LOWI
Host driver processes cld80211 vendor sub command
CLD80211_VENDOR_SUB_CMD_GET_CH_INFO and respond with
NLA type CH_INFO response

CRs-Fixed: 2595374
Change-Id: Ibe6f2431ac1cae6e4560ec11424434b4f1cf8b76
2020-03-21 12:35:24 -07:00
Vinay Gannevaram
23a3603951 qcacmn: Add support for NLA type CAP_RESP in LOWI
Host driver processes cld80211 vendor sub command
CLD80211_VENDOR_SUB_CMD_GET_CAPS and respond with
NLA type CAP response

CRs-Fixed: 2595140
Change-Id: I5a6aa1fac537ca618404520b81c541a20dafd6fb
2020-03-21 12:35:02 -07:00
Kiran Venkatappa
2e5d58d46f qcacmn: Send wifi pos WMI commands using pdev's wmi handle
For multi-radio SoCs, wmi handle is maintained per pdev to map to
separate copy engine used for sending WMI commands to taget. Add support
to send wifi position related WMI to send it per pdev.

Change-Id: I300be2bbfd77cb9390fef37b5b02a002284976e0
CRs-Fixed: 2495277
2019-07-29 16:12:15 -07:00
Rajeev Kumar Sirasanagandla
d36ba2d9cf qcacmn: Fix possible overread in wifi_pos_parse_req
In wifi_pos_parse_req(), payload sections of nl attributes ATTR_DATA and
ATTR_META_DATA are type casted to driver internal structures tAniMsgHdr
and wifi_pos_field_info respectively without validating payload lengths
which can lead to buffer overread if the payload lengths are less than
size of internal structures.

To fix this, avoid type-cast and return error if payload lengths of nl
attributes ATTR_DATA and ATTR_META_DATA are less than size of tAniMsgHdr
and wifi_pos_field_info respectively.

Change-Id: Ie9e3197f2cd3852b394e834991aa8d3a5b530d85
CRs-Fixed: 2471275
2019-07-17 08:31:58 -07:00
Abhiram Jogadenu
1c2b583ee2 qcacmn: Componentize and enable conv WIFI POS
Componentize and enable converged WIFI POS

Change-Id: I8e3f745dbb087818c9d411c7a00e1cdb2907d4d3
2019-07-16 17:15:24 -07:00
Jeff Johnson
23e26381c0 qcacmn: Rename OSIF logging macros
The current OSIF logging macros use a "cfg80211" prefix. This is
confusing because that prefix should only be used by the Linux
cfg80211 module. To avoid confusion rename the macros to use an
"osif" prefix.

Change-Id: Id3273498f623d04beec879aa9d77c1d33986357a
CRs-Fixed: 2469485
2019-06-17 13:00:54 -07:00
Arif Hussain
2fcbb3f715 qcacmn: Add SSR protection to os_if_wifi_pos_callback()
Protect SSR protection for wifi pos callback function to prevent
possible race condition between user request and driver unload.

Change-Id: I68d3636429f8891f0a4d6c78642aeecf7d67e105
CRs-Fixed: 2349354
2019-05-14 11:15:56 -07:00
Jeff Johnson
766ea098f6 qcacmn: os_if: Replace explicit comparison to NULL
Per the Linux Kernel coding style, as enforced by the kernel
checkpatch script, pointers should not be explicitly compared to
NULL. Therefore within os_if replace any such comparisons with logical
operations performed on the pointer itself.

Change-Id: I1cf6f897d1d2722d112dd3f802d789652373eaed
CRs-Fixed: 2418254
2019-03-26 01:24:42 -07:00
Jianmin Zhu
745dc0d96d qcacmn: Change log level from err to debug for LFR3 performance KPI
Log of level err will call printk to print on uart, may make
current thread sleep or delay > 10ms, then wma_roam_synch_event
need longer time to handle, LFR3 roam need longer time.

Change-Id: Ibdd58f74fcf5cf3de8e2b06166c375a2ce634cb5
CRs-Fixed: 2411278
2019-03-13 00:07:29 -07:00
Madhvapathi Sriram
409d19924e qcacmn: Remove error log for qdf_mem_malloc in os_if files
qdf layer already has the error trace

Change-Id: I4ff1fa2a7e261aecd715fd2c8ae68e6e843f1118
CRs-Fixed: 2376427
2019-02-11 02:29:59 -08:00
Naveen Rawat
2d39710f9b qcacmn: Protect wifi_pos global psoc object
Protect wifi_pos global psoc object with spinlock.

Change-Id: I5a250061b482fd2699bebb34c7eac3bd649831f7
CRs-Fixed: 2235825
2018-05-30 15:51:51 -07:00
Jeff Johnson
3d70ae460b qcacmn: os_if: Remove legacy markings
Per current guidance remove legacy markings.

Change-Id: I0d9c1ff59217a115770baea9edd17c57a10a3bc2
CRs-Fixed: 2230684
2018-05-18 02:17:33 -07:00
Mukul Sharma
c42f0c13b7 qcacmn: Disable indoor channel on sap start
There are scenario where indoor channel operations
(like  active / passive scan/connect/roam etc)
are not desired / permitted specially in sap case.
Hence add support of disabling indoor channel
on sap start and revert it on sap stop.

Change-Id: Id6e01534532e3076a3e662e6a4f71e8be924165a
CRs-fixed: 2161319
2018-03-05 22:33:53 -08:00
Jeff Johnson
a4262320ce qcacmn: Use enum QDF_OPMODE
Change "qcacmn: Rename enum tQDF_ADAPTER_MODE" (qca-wifi-host-cmn
Change-Id I20f1b6d1a0ab4b8fe6a85cefdff96a49e2f4652c) renamed enum
tQDF_ADAPTER_MODE to QDF_OPMODE. Update all references to use the
new name.

Change-Id: Ic6f663dac11a100f168b2626c7c0fbcaccbfca4f
CRs-Fixed: 2141061
2017-11-09 23:42:58 -08:00
Naveen Rawat
9523aa15fa qcacmn: Add ucfg_wifi_pos set/get apis for FTM value
Define ucfg_wifi_pos apis for set/get of fine_time_meas_initiator.

Change-Id: Id33ba633c58e5b286211da9343797fc99ec364aa
CRs-Fixed: 2124286
2017-10-20 13:54:00 -07:00
Naveen Rawat
dec67cca98 qcacmn: Fix compilation error in os_if_wifi_pos_register_nl
Fix compilation error in os_if_wifi_pos_register_nl

Change-Id: I851e0aeef694967ca7580fdb3799baaf74397fd7
CRs-Fixed: 2120477
2017-10-04 19:25:54 -07:00
Dustin Brown
1b57dba257 qcacmn: Add wrapper for nla_parse()
The Linux kernel version 4.12 introduced an API change to nla_parse().
Add conditional compilation to call nla_parse with the correct
parameters based on the version of the linux kernel being compiled
against.

Change-Id: Ie904d217a42a2396f8245251a9c90a15dac2c0c9
CRs-Fixed: 2093354
2017-09-15 15:26:31 -07:00
Naveen Rawat
d35749f195 qcacmn: Fix memory leak in wifi_pos send peer status api
In function os_if_wifi_pos_send_peer_status free buffer used to send
peer status indication to userspace after use.

Change-Id: Id90ea35aef4584d0ee7ef856d5cd12104eb089a4
CRs-Fixed: 2030121
2017-04-14 04:22:51 -07:00
Naveen Rawat
922724f2db qcacmn: Implement WIFI_POS commands
Implement following commands for WIFI_POS:
1) ANI_MSG_APP_REG_REQ
2) ANI_MSG_CHANNEL_INFO_REQ
3) ANI_MSG_SET_OEM_CAP_REQ
4) ANI_MSG_GET_OEM_CAP_REQ
5) ANI_MSG_OEM_DATA_REQ
6) ANI_MSG_PEER_STATUS_IND

Change-Id: I7e3b502660b169f4cdb654cb5f433446a24d2421
CRs-Fixed: 2003488
2017-03-22 01:36:36 -07:00
Naveen Rawat
a8423167a9 qcacmn: Implement Wifi Positioning Init/Deinit
Implement Init/Deinit for the WIFI Positioning component.

Change-Id: Iec0f4199935f63f7019de5ae16fc760817165954
CRs-Fixed: 2003488
2017-03-21 01:10:14 -07:00
Naveen Rawat
89284c2621 qcacmn: Add new files for Wifi Positioning component
Add new files for Wifi Positioning component.

Change-Id: I62d808a5ce01ce7211e22df960dd337454e1f8b5
CRs-Fixed: 2003488
2017-03-08 19:30:51 -08:00