Commit graph

139 commits

Author SHA1 Message Date
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
Linux Build Service Account
2a1b069ae0 Promotion of wlan-service.lnx.1.1-00003.
CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
1016741   Idf747b74191de4904ca939601a263b9fb8f9e971   softap: support for starting/stopping Wigig soft AP

Change-Id: I6751c19f041b93fbd956e1e3f2626796c3557c8e
CRs-Fixed: 1016741
2016-05-23 20:33:06 -07:00
Linux Build Service Account
7cab567836 Promotion of wlan-service.lnx.1.1-00002.
CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
1016741   Idf747b74191de4904ca939601a263b9fb8f9e971   softap: support for starting/stopping Wigig soft AP

Change-Id: I17dcde26ac9275cacc600ae92fb332f89c146935
CRs-Fixed: 1016741
2016-05-22 23:36:13 -06:00
Dedy Lansky
350c353182 softap: support for starting/stopping Wigig soft AP
Support new command: eCMD_ENABLE_WIGIG_SOFTAP.

Change-Id: Idf747b74191de4904ca939601a263b9fb8f9e971
CRs-Fixed: 1016741
2016-05-17 02:14:25 -07:00
Linux Build Service Account
4d6c04aa73 Promotion of wlan-service.lnx.1.0-00014.
CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
943343 943343   I37d8927f2973f90772ab46cc767fdea1ac9cfc6b   wlan: Add support for ieee80211h hostapd config

Change-Id: I5ce5eff98aa7188b654c69a702af16406d87921a
CRs-Fixed: 943343
2016-02-03 01:23:39 -08:00
Pradeep Reddy POTTETI
5c1a3abaf0 wlan: Add support for ieee80211h hostapd config
Support for configuring ieee80211h parameter in
hostapd configuration file through soft AP SDK.

Change-Id: I37d8927f2973f90772ab46cc767fdea1ac9cfc6b
CRs-Fixed: 943343
2016-01-07 20:03:13 +05:30
Ashwini Sukhadev Patil
1e2073ebaf Softap: Avoid possible array index out-of-bounds access.
Return value of snprintf can be more than size value when output
is truncated, so copying the '\0' at return value may cause array
index out-of-bound access. And as snprintf function takes care of
terminating the string with '\0', its redundant to copy '\0' at
return value.

CRs-Fixed: 947966
Change-Id: Ic5dab6d9aa57db5000f23c82e2a22924e0154c40
2015-12-07 12:11:48 +05:30
Linux Build Service Account
c46bf72725 Merge "Modify NDC commands to write to hostapd.conf" 2015-09-22 20:58:29 -07:00
Linux Build Service Account
bb81a3fc87 Merge "wlan: Add support for 11AC, ACS hostapd config" 2015-09-22 20:58:29 -07:00
Pradeep Reddy POTTETI
a1c6f1dbe5 Provide read/write access on accept/deny files to hostapd
This commit provides read/write access on accept/deny files
to hostapd similar to hostapd.conf.

Change-Id: I1c3cda056a4067d48484cb336e748f04804b68e3
CRs-fixed: 910398
2015-09-18 20:20:16 +05:30
Ashwini Sukhadev Patil
cc16315997 Modify NDC commands to write to hostapd.conf
Provision to configure rts_threshold, fragm_threshold and
wmm_enabled in hostapd.conf through NDC commands.

CRs-Fixed: 889979
Change-Id: I94e4486573b562fbe48c641423bf1c1389d0c744
2015-09-11 19:14:22 +05:30