Commit graph

149 commits

Author SHA1 Message Date
Michael Bestas
01b63e146b
qsap: Remove obsolete module flags
LOCAL_VENDOR_MODULE always implied LOCAL_USE_VNDK.
LOCAL_PRELINK_MODULE is deprecated since 2015.

Fixes the following warning in 14 QRP3:
including system/qcom/softap/sdk/Android.mk ...
build/make/core/local_vendor_product.mk:4: warning: LOCAL_USE_VNDK must
    not be used. Please use LOCAL_VENDOR_MODULE or LOCAL_PRODUCT_MODULE
    instead.

Change-Id: I3a6498c32eb0319fb81d44f24e12a56610b13445
2024-06-12 04:34:59 +03:00
dianlujitao
ddd4779b46 qsap: Always build as vendor module
Change-Id: I529ca3951be2be0fb8d5bf93a85737b38ee8fbee
2022-08-13 20:42:10 +08:00
Dan Pasanen
c61e35d742 qsap: Add wifi_qsap_set_tx_power
Change-Id: I9ef277db6f4e068e7b92710f6039b4f261d72282
2022-08-08 17:32:28 +02:00
Nolen Johnson
9cfce3a31b qsap: Allow devices to use a local version of this
Change-Id: I7e892aaff2fc6937b3e0e4e2331006d459cbf113
2022-08-08 11:29:42 -04:00
Arne Coucheron
43f569833a qsap: Move to log/log.h
* cutils/log.h is deprecated.

Change-Id: Id29be75e58dab602ed3abcaa64571b4d565fabb3
2022-03-21 20:18:43 +01:00
Paul Keith
0a9d93707e qsap: Fix remaining compile errors
Change-Id: I65ff436ad4e02032f6fc1fd5639ce22ebf64a033
2022-03-21 13:09:26 -05:00
Nolen Johnson
b6ab59993e qsap: Compile with -Wall -Wextra -Werror
Change-Id: Ic80ea2ab7363ba57ca971eef1132f660396ddae1
2022-03-21 13:09:26 -05:00
Jeferson
630de9bda1 qsap: Resolve some compiler warnings
system/qcom/softap/sdk/qsap_api.c:351:59: error: format specifies type 'long' but the argument has type 's32' (aka 'int') [-Werror,-Wformat]
    ALOGD("cmd=%s, Val:%s, INI:%ld \n", pcmd->name, pVal, inifile);
                               ~~~                        ^~~~~~~
                               %d
system/qcom/softap/sdk/qsap_api.c:1308:58: error: format specifies type 'long' but the argument has type 's32' (aka 'int') [-Werror,-Wformat]
    ALOGD("Sap auto channel selection pautochan=%ld \n", *pautochan);
                                                ~~~      ^~~~~~~~~~
                                                %d

Change-Id: Ib6a560c94edd982156fb8b997e7891d4a406a1f4
2022-03-21 18:06:17 +01:00
RenanQueiroz
2ca7872af0 softap: sdk: Add 'vendor.' prefix to wlan.driver.config
* In 126af66b04,
  the prop wlan.driver.config was renamed to vendor.wlan.driver.config.
  Therefore, make the same change on softap as well.

Change-Id: I696d851c8ecd35ec42cf680149c402b3b8044cfc
2022-03-13 05:02:21 +01:00
Christopher N. Hesse
8d1788b0f1 softap: sdk: Declare VNDK usage
Change-Id: I8d408c34947d9febf6afa95929bf9fb696d9d097
2022-03-02 11:15:17 -05:00
Arne Coucheron
399b3f4231 qsap: Fix missing log symbols
Add liblog to LOCAL_SHARED_LIBRARIES instead of using LOCAL_LDLIBS.

Change-Id: Iaf8fbc245babce372f047f73cb1400b19c54836d
2022-03-02 11:15:17 -05:00
Alexei Avshalom Lazar
1b6053c5cd QSAP: add support for setting EDMG configuration in hostapd
EDMG is disabled by default.
Add support for setting EDMG configuration for wigig softap.

Change-Id: I64ca5ae8dd4a837e658e07dda5a5ec6417020319
CRs-Fixed: 2567407
2019-12-01 00:52:38 -08:00
Dedy Lansky
a2dd08f8d4 QSAP: add support for setting ieee80211ax in hostapd
80211ax is enabled by default. allow disabling 80211ax for wigig
softap.
Also add support for creating a seperate config file for
wigig, to avoid conflicts with wifi APs.

Change-Id: If04f7da1695715aea037a01da11728c7350ed68c
2019-11-19 17:14:34 +02:00
Dedy Lansky
59c014ff95 QSAP: add support for HW_MODE_AD (Wigig)
Add "ad" to list of supported operating modes and add GCMP to the list
of valid pairwise ciphers.
For AD mode, disable HT capability as this is not relevant for Wigig.

Change-Id: Ia036859fe4d15b5f2fc9ff5b22c3b508fc8aae13
2019-08-08 09:58:36 +03:00
Hu Wang
62ae34e1a4 QSAP: Add support to set sae_require_mfp parameter
For SAE transtion mode, set sae_require_mfp to 1 to require MFP
for all associations using SAE.

CRs-Fixed: 2390790
Change-Id: I64bd35cbb77f6c9b64970c9a9db0a1bc3aeb2314
2019-03-21 10:33:18 -07:00
Abhishek Srivastava
2443024a1a wlan: Add default hostapd configuration file
If the hostapd configuration files are not present in /data/vendor/wifi,
copy it from the default file location /vendor/etc/hostapd
while starting softAP.

Change-Id: I3093e99cdd906d86035f9e8dbfdddb06ae9f7c80
CRs-Fixed: 2409527
2019-03-08 05:59:48 -08:00
Linux Build Service Account
e0c1c7780a Merge "QSAP: Enhance 'set' commmand to configure for OWE" 2019-01-02 18:28:14 -08:00
Hu Wang
d855500014 QSAP: Enhance 'set' commmand to configure for OWE
This creates a new hostapd_owe.conf if use below 'set' CMD:
  "softap qccmd set owe <args>"

CRs-Fixed: 2356574
Change-Id: I1ef4f11f7bdb3155dcfbc2c75fa106c8a3ecc61a
2018-12-06 18:15:48 +08:00
Hu Wang
aa4c6caf36 QSAP: Add support to set owe_transition_ifname parameter
CRs-Fixed: 2356574
Change-Id: Ib06fdc0e7120328e8cae07a4441ab23045e0c45c
2018-11-27 17:24:17 +08:00
Abhishek Srivastava
b44cdad94e QCSDK: Add support of wowlan_triggers, accept/deny_mac_file configuration.
This allows setting of following configs to hostapd.conf through QSAP:
wowlan_triggers accept_mac_file, deny_mac_file

CRs-Fixed: 2336537
Change-Id: If6a9e6a202e7aec86e1a3562bb392459a61287a2
2018-10-24 19:07:40 +05:30
Ajit Vaishya
996f2a81d8 Remove reading of ini file from wlan property
Remove reading of ini file from wlan.driver.config
property since it is not used anymore.
This would prevent unnecessary avc denial warning.

CRs-Fixed: 2314284
Change-Id: Idceaef0262bada69a2d69d3bae2d69cbeff4efcf
2018-09-12 21:45:21 +05:30
Srikanth Marepalli
71d1ddbe77 qsap: Add NULL check for soc & msg allocations in qsap_get_mode
Add appropriate checks to avoid NULL pointer dereferencing.

Change-Id: I9b96eeb1cf3b860416c950b5c689dc5858e194c6
CRs-Fixed: 2300013
2018-08-28 07:06:06 -07:00
Purushottam Kushwaha
68e72488ab QSAP: add support to set acs_exclude_dfs parameter.
acs_exclude_dfs is needed to avoid selection of DFS channels when
ACS (channel=0) is set for 5Ghz. This commit adds support for this
acs_exclude_dfs parameter.

Change-Id: If8a8777e7ec45bd37fd7e94e6f114852b2636b0c
CRs-Fixed: 2299524
2018-08-20 14:14:41 +05:30
Hu Wang
76d63aadc7 qsap: Convert SIOCGIWMODE to nl80211 for qsap_get_mode
Wireless extension is deprecated, hence convert SIOCGIWMODE to nl80211
for qsap_get_mode.

Change-Id: I30c3b4c2859b7c9c621f3f74d51e0e039837dcc9
CRs-Fixed: 2274099
2018-07-15 22:40:17 -07:00
Veerendranath Jakkam
bfad727b06 qsap: Add NULL check for getpwnam and getgrnam.
Add appropriate checks to avoid NULL pointer dereferencing.

Change-Id: I0961a8e55fea055ee731e20ae28c833c54c32e67
CRs-Fixed: 2263188
2018-06-19 16:38:02 +05:30
Purushottam Kushwaha
e4263cecd2 QSAP: Fixing LOCAL_MODULE flag to LOCAL_VENDOR_MODULE
CRs-Fixed: 2255114
Change-Id: I5d55ff31400cef3b4fcbb2ba37d373ed0de44c39
2018-06-06 14:39:35 +05:30
Purushottam Kushwaha
2ef0af2cb2 QSAP: Add support to set operating mode "any".
Currently softap sdk allows only following modes:
"b", "g", "n", "g-only", "n-only", "a".

This commit adds support for hw_mode "any" via QSAP.

CRs-Fixed: 2250379
Change-Id: I13de4c196c3cd752a902ef8bf3fed4a01f95eb6a
2018-05-31 19:06:12 +05:30
CNSS_WLAN Service
a087076b93 Merge "QSAP: Do not modify hw_mode when channel is set to 0 (for ACS)." into wlan-service.lnx.4.0 2018-05-25 07:26:54 -07:00
Purushottam Kushwaha
168beebc4e QSAP: Do not modify hw_mode when channel is set to 0 (for ACS).
Currently when channel value is less than 14, hw_mode is set to
g (or b). Application might want to run ACS by setting channel=0
in all possible hw modes.

This commit skip changing hw_mode, if channel is set to 0.

Change-Id: I0da492d70ec9c9455d79e4df33fb86a7313633ba
CRs-Fixed: 2245734
2018-05-21 07:58:24 -07:00
Purushottam Kushwaha
9283d3e375 QSAP: use vendor path for default hostapd files.
This redefines macros to use "/data/vendor/wifi/hostapd/" path for
read/write/update hostapd configuration parameters.

Additionaly, it creates libqsap_headers which other modules can use
to refer/include *.h files in this project.

Change-Id: Ice64e5a56a69882b001b2f3bcd99ba0f91ffc8a2
CRs-Fixed: 2244795
2018-05-18 20:19:42 +05:30
Veerendranath Jakkam
c613ebbc1c qsap: Fix VNDK compilation issues of libqsap.
- Removed "android_filesystem_config.h" references.
- Added cutils header library in Android.mk.
- Added required system headers explicitly.

Change-Id: I1213fc40335fba7ea52c4c296b28bc66cba72701
CRs-Fixed: 2244720
2018-05-18 18:42:03 +05:30
Veerendranath Jakkam
20f62e8554 softap: Make softap libs as vendor module libs.
- Make libqsap_sdk as vendor module.
- Remove "libQWiFiSoftApCfg" module.

Change-Id: Ie9c5795faae1d08b580cb23fe5d1a57caf1b014a
CRs-Fixed: 2239628
2018-05-06 23:35:49 +05:30
Veerendranath Jakkam
f4f45de50c softap: Ensure VNDK compliance.
Replace LOCAL_COPY_HEADERS with LOCAL_EXPORT_C_INCLUDE_DIRS.

CRs-Fixed: 2221808
Change-Id: Ic35fef21a142b9dc76e435b3b0898e841ff76c75
2018-04-10 20:04:00 +05:30
Ajit Vaishya
3f87532c1e qsap: Support to configured Vendor IE elements in hostapd.conf.
With this commit, able to configured vendor_elements and
assocresp_elements in hostapd.conf file.
i.e
  qdc softap qccmd set vendor_elements=<Values>
  qdc softap qccmd set assocresp_elements=<Values>

Change-Id: Ib67413779a347c6567ab093bf84f87b1b63cc7db
CRs-Fixed: 2197458
2018-02-28 23:53:47 +05:30
Peng Xu
4d42a1d281 softap: Fix KW issue for array index out of bounds
Check the length of the buffer before using it calculate
the index of the data in the buffer to prevent index becoming
a negative value.

Change-Id: I3dc440dac2e4a5437e2ff70c39577876a3a97123
CRs-fixed: 2111307
2017-09-19 11:04:49 -07:00
Srinivas Dasari
a7f0080a40 qsap: Initialize setCmd to avoid uninitialized memory access
setCmd variable is used to prepare the command with the
arguments received. This can be initialized to the string "str"
to avoid possible uninitialized memory access.

Change-Id: I60cb4de5b01560e4bb079ed92e6c3bde6cfbf9c7
CRs-Fixed: 2098740
2017-09-18 12:24:26 +05:30
Abhishek Srivastava
80064989b2 qsap: Allow empty wpa_passphrase
With this commit, wpa_passphrase should follow below condition:
1. empty string (len = 0)
2. string with length >= 8 && length <= 64

Change-Id: I029ac7cc2b32b564b4e3d6b747cc584ba59e5fde
2017-09-04 04:26:38 -07:00
Ajit Vaishya
8c3357cbe4 qsap: Point the hostapd configuration location to /data/misc/wifi
1) This commit points the hostapd configuration location
   to /data/misc/wifi.
2) Aims to enable configure ctrl_interface via qsap command.

CRs-Fixed: 2091779
Change-Id: I8ebfdd4b5c359659272209ab2e0f7b92793e51c9
2017-08-14 22:47:42 +05:30
Purushottam Kushwaha
0e5ec067f7 qsap: Add API to get device mac address based on interface name.
This adds new API linux_get_ifhwaddr() which can be used to get
mac address of input interface. IOCTL SIOCGIFHWADDR is used to get
the interface address.

CRs-Fixed: 2080924
Change-Id: I1b825fb2c1f35280d2d57928be4f87d23d78decb
2017-07-27 20:49:56 -07:00
Purushottam Kushwaha
a7c3aa8a21 qsap: Modify qsapsetSoftap API to set dual2g/5g configurations.
This enhances qsapsetSoftap to take arguments for dual2g and dual5g
configurations while maintaining backward compatibility to set
config file in case of standalone sap.

Additionally enhance 'set' command to configure ssid2 and bridge
parameters which are needed for dual2g/dual5g. Also when setting
ssid2, disable ssid in config files (or vice-versa).

CRs-Fixed: 2080924
Change-Id: I60bf62e6b2ad0cde3ebdfff4814f2ab98aa24b92
2017-07-27 20:49:20 -07:00
Ajit Vaishya
a21d26579d qsap: Enhance 'set' command to configure for SAP + SAP.
This enhances existing 'set' command to allow configuration of dual
SAP. It will create/read/write/update to following configuration files:
CMD: "softap qccmd set channel=6" writes to hostapd.conf
CMD: "softap qccmd set dual2g channel=6" writes to hostapd_dual2g.conf
CMD: "softap qccmd set dual5g channel=6" writes to hostapd_dual5g.conf

Additionally enable LOG_TAG for logging APIs with TAG "QCSDK" and
modify default config file location.

CRs-Fixed: 2080924
Change-Id: I46c59de7fbd2ea273793406f0b82515df94e5c38
2017-07-27 20:48:41 -07:00
Ajit Vaishya
5d72c3af41 qsap: Add APIs to control and manage bridge interface.
This adds APIs to trigger create, delete, interface up and interface
down commands on bridge interface.
It uses following IOCTLs for sending command to linux kernel:
Add bridge iface: SIOCBRADDBR
Remove bridge iface: SIOCBRDELBR
Mark iface up/down: SIOCGIFFLAGS

CRs-Fixed: 2080924
Change-Id: I3d34dc16e9ca82dc4b550cbc83fa4120c80ad54c
2017-07-27 14:08:21 -07:00
Purushottam Kushwaha
a49496aea8 qsap: Remove support for wifi_fst from QSAP APIs
wifi_fst.h is no longer part of /hardware/libhardware_legacy/ ,
therefore, compilation of libqsap_sdk would fail. Remove dependencies
for wifi_fst from QSAP.

Additionally, skip calling 'chown' after changing configuration
parameters as QSAP is not changing ownership.

CRs-Fixed: 2069881
Change-Id: Iaadfa182270f22555e486dac24a5acafc247b943
2017-07-13 12:12:08 +05:30
Linux Build Service Account
f4e6d19070 Promotion of wlan-service.lnx.1.1-00019.
CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
1017907 1044315   Ic8fcabf0ad514e5a73d5a9a9ebccb6ca52dcb9b4   Softap: Add support for STA+SoftAP Concurrency

Change-Id: I7eaeacea9a9d6b45dbf87b52c65313386c1897d4
CRs-Fixed: 1017907, 1044315
2016-07-25 08:11:51 -06:00
Nalla Kartheek
f4eef25c34 Softap: Add support for STA+SoftAP Concurrency
1. Add functions to create and remove softap interface using
   NL commands.
2. Write Softap interface into hostapd.conf.

Change-Id: Ic8fcabf0ad514e5a73d5a9a9ebccb6ca52dcb9b4
CRs-Fixed: 1044315
2016-07-22 13:15:28 -07:00
Linux Build Service Account
5cf4b594e9 Promotion of wlan-service.lnx.1.1-00018.
CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
1014736   Ic2dd119b1fbfbf88b7b39000c1633792c8a628c2   qsap: add functions for calling FST manager start/stop

Change-Id: I319845b13411ff32ceea9c706d1ed1358989baff
CRs-Fixed: 1014736
2016-07-11 10:10:01 -06:00
Hamad Kadmany
421ce6f83e qsap: add functions for calling FST manager start/stop
FST manager start/stop need to be done in sync with start/stop
of softAP controller.
To support such functionality, added general functions that
can be used pre and post softAP start/stop operations.

Change-Id: Ic2dd119b1fbfbf88b7b39000c1633792c8a628c2
CRs-Fixed: 1014736
2016-06-16 12:43:56 +03:00
Linux Build Service Account
f70b065f22 Promotion of wlan-service.lnx.1.1-00008.
CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
1025722   If284ce12b1141bde8d01bee7023ac9ae94d255b7   GTK: Decrease GTK rekey interval

Change-Id: Ic7a80bf0d046869f26f397ec03f80e03cc3be8f2
CRs-Fixed: 1025722
2016-06-14 12:26:21 -06:00
c_rrajiv
c160697b1f GTK: Decrease GTK rekey interval
GTK rekey interval is reduced to match with
standard values existing with commercial APs.
This further helps in testing the GTK rekeying
functionality and offload scenarios with SAP case.

CRs-Fixed: 1025722

Change-Id: If284ce12b1141bde8d01bee7023ac9ae94d255b7
2016-06-08 00:48:54 -07:00
Linux Build Service Account
6228c9263b Merge "Promotion of wlan-service.lnx.1.1-00003." 2016-05-24 03:22:27 -07:00