Commit Graph

82 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Manikandan Mohan
e1bfb737ad wlan: Add support for 11AC, ACS hostapd config
Support for configuring 11ac and ACS channel list parameters in
hostapd configuration file through soft AP SDK.

Change-Id: I45c4f4285357701299c44f31243dea5107b0fabb
CRs-Fixed: 892713
2015-09-09 17:38:47 -07:00
Linux Build Service Account
cddacfa293 Merge 650d036038 on remote branch
Change-Id: I622541a7fac02a2db2d869da97a513b062955b4a
2015-08-16 23:56:06 -06:00
c_rrajiv
e629e82bc8 wlan: Add softap support through ndc commands.
Changes required to support the softap commands
through ndc cli. This new support as part of the
64bit enablement and ndc is used for cli automation
in softap testcases.
Change-Id: I460a3785c3b4a44656281c7243ebdf921fe20f91
CRs-Fixed: 710050
2015-07-20 16:39:08 +05:30
Bala Krishna Bhamidipati
650d036038 Invoke qsap_set_ini_filename to set the fIni (if NULL)
If WIFI_DRIVER_CONF_FILE is not defined fIni is set to null and
hence all the set/get_cfg SAP commands fail. Thus, Invoke
qsap_set_ini_filename explicitly if fINI is NULL.

Change-Id: I9df1f95d7f4b884602cc501fe9e75ff4c26e400c
CRs-Fixed: 865432
2015-07-06 15:33:57 +05:30
Changzhi Deng
fddc6bed07 Hotspot: Set maximun client connections number
This function is for end user to set maximun client
connections number and apply this to hostapd module

Change-Id: I6150b376d22756e8c04ebabe666d81cf3af8fc87
2015-06-09 18:23:27 -07:00
Ravi Joshi
9b8ed11141 framework: Fix for making SAP sdk code 64 bit compliant
Fix for making SAP SDK code 64 bit compliant. The typedefs
were incorrect on an LP64 architecture since a long int will
be 64-bits.

Change-Id: I4c9f5f2fb2b820193fbe03fdf8e2307c281ea014
CRs-Fixed: 640894
2014-11-23 22:05:50 -08:00
Linux Build Service Account
92dd0a5d38 Merge "wlan: Fix for OSS build compilation issue" 2014-11-20 07:38:22 -08:00
Neelansh Mittal
587b8b3d67 wlan: Change location of hostapd files.
Change location of hostapd accept and deny files
from /data/hostapd to /data/misc/wifi because
SElinux does not allow netd and hostapd to access
/data/hostapd directory.

Change-Id: I61e8521b3a4b6aab759d3b7cbc04acd3da3c8cf3
CRs-Fixed: 756614
2014-11-19 17:59:02 +05:30
Mahesh A Saptasagar
8e9475b346 wlan: Fix for OSS build compilation issue
Do not include "wpa_ctrl.h" in qsap.c file to avoid compilation
errors on OSS builds.

Change-Id: Ie3afa0bc564a5b2d9c2245b85f4681b83c1d1644
CRs-Fixed: 758764
2014-11-18 20:11:25 +05:30
Vinay Krishna Eranna
c4bcc0d420 wlan: Read ieee80211d param from hostapd.conf file
Read ieee80211d param from hostapd.conf file instead of reading it
from ini file.

Change-Id: I3773652bc91e2f166111704e70231af6845c5ffc
CRs-Fixed: 727043
2014-09-30 01:14:04 -07:00
Subhani Shaik
62ada8bd10 wlan:ndc command support.
Copying the softap sdk include files to TARGET obj
so its easy for other modules to include them.
This is required for system/netd/server/Android.mk
file

Change-Id: Ia581cf93b1849866e22ea3f93350906bc4fb8c71
2014-08-01 10:40:56 -07:00
Linux Build Service Account
bcc62d3cca Merge "wlan: Add support for configuration of AKM suite" 2014-04-18 01:20:41 -07:00
Ravi Joshi
124fb55d96 framework: Fix for 64-bit unsafe QCSAP_IOCTL_ASSOC_STA_MACADDR handling
Fixes for making SAP SDK 64 bit compliant for QCSAP_IOCTL_ASSOC_STA_MACADDR
ioctl

Change-Id: I161ac3113c01752f627bd876f85342d5a9b20ede
CRs-Fixed: 639046
2014-04-02 16:18:12 -07:00
Ravi Joshi
8b0be84bab softap: Fix for hostapd.conf corruption
SoftAP fails to load the default hostapd.conf file
which was left behind as part of failed attempt to
start the softAP. The default hostapd.conf is required
to be copied in case of accidental corruption of
hostapd.conf

Change-Id: I4e6ab7a6bc67fcdcfe225e7e1a811fafe402ebc7
CRs-Fixed: 626022
2014-03-07 15:58:23 -08:00
Hanumantha Reddy Pothula
87d01a1158 Updated string banned functions strncpy and memcpy
Banned call strncpy has been updated
with strlcpy

Change-Id: I992c2d3580dce24981a4ec9fd9d50ecca109c044
CRs-Fixed: 554334
2014-01-17 11:56:22 +05:30
Linux Build Service Account
0ecf7a3d93 Merge "Revert "wlan: Don't overwrite the channel configured in hostapd.conf"" 2014-01-07 12:04:43 -08:00
Mahesh A Saptasagar
4a7a459864 Revert "wlan: Don't overwrite the channel configured in hostapd.conf"
This reverts commit 2addd175cc.

Change-Id: I1b4a145bc1b491d65f49dfc0f5990e52de8a4f37
CRs-Fixed: 589261
2013-12-16 13:48:46 +05:30
Mahesh A Saptasagar
d289ef3449 SAP: Make QSAP SDK compatible w.r.t Android framework.
SAP parameter ignore_broadcast_ssid always set to
"broadcast" due to improper handling of SAP parameters
at SAP SDK.

To mitigate this issue update the ignore_broadcast_ssid
parameter based on the value configured in the framework.

Change-Id: Ia1a35a38464710088921b94269b624d8b1910abc
CRs-Fixed: 588560
2013-12-16 11:50:56 +05:30
Mahesh A Saptasagar
2addd175cc wlan: Don't overwrite the channel configured in hostapd.conf
When SAP is turned on through GUI, hostapd.conf file
will be overwritten by the framework parameters.Since
in Kit-Kat framework,channel value is hard coded to 6,
same is getting over written whenever we turn on SAP
through GUI, this will cause SAP to come up always on
channel 6.
To mitigate this issue, avoid overwriting the channel
parameter in hostap.conf file by ignoring the channel
parameter from the framework.

Change-Id: I4d87cf70868ad705f63211b2bd10ac2a67646d09
CRs-Fixed: 584112
2013-12-03 13:32:30 -08:00
Linux Build Service Account
fc7138812d Merge "qcom: softap: Fix potential string null termination and buffer overflow" 2013-11-29 13:30:37 -08:00
Mingcheng Zhu
69b91cc907 qcom: softap: Fix potential string null termination and buffer overflow
Fix potential string null termination and buffer overflow

Change-Id: I05e28b30a4e3134625d20fb5591b239ea4b9f3a4
CRs-fixed: 554078
2013-11-26 12:23:43 -08:00
Shake M Subhani
ff6440b26f softap: sscanf sanity check for SoftAP service
The sscanf return value is verified whether the three channel
variables, i.e. start channel, end channel and channel band,
are properly updated. If malformed input is given to sscanf, then
these variables may not properly updated. To provide validation
of input,  verifying that sscanf returned a correct value of 3.

Change-Id: Ibd185e7a0ffcf5803927990531fc33f0e8977cc9
CRs-fixed: 554349
2013-11-26 12:06:14 +05:30
Mahesh A Saptasagar
41f17f12e4 wlan: make qsap compatible w.r.t ndc implementation.
changes to make qsap compatible w.r.t ndc implementation by
correcting argument mismatch.

Change-Id: I6722ce3fdcf2b4bc45c44d82d56f2c5a14435d7c
CRs-Fixed: 436332
2013-11-21 11:27:03 -08:00
Vinay Krishna Eranna
1c4304379e Fix: SIGPIPE issue while querying softap enabled status
Before downloading commands to driver through softap SDK we are
checking if SoftAP is enabled are not by running ps in popen.
This sometime throws SIGPIPE error (signal) which is not handled,
due to this we were facing application crash. To fix this we modify
to check the operation mode of the driver through ioctl.

Change-Id: Ia0703ff343d401801655d3b666ade66107a4789e
CRs-Fixed: 535340
2013-10-01 20:14:57 +05:30
Anh Nguyen
43cf2bea85 Update ini_file buffer size to be PROPERTY_VALUE_MAX
Update ini_file size from 64 to PROPERTY_VALUE_MAX to fix
property_get() too small error

Change-Id: I93d71016a7f2dc7ce3866ffce5dcf874a2f831cd
2013-09-24 11:04:11 -07:00
Chet Lanctot
7a2827f169 wlan: Add support for configuration of AKM suite
Changes to allow setting the configuration item for
AKM suite (wpa_key_mgmt) in hostapd
configuration file.  This is needed for PMF
(802.11w) to add SHA256 to the list when
necessary.

Change-Id: Ia6fd4976241fb11525f4be6c11801b9c471d4427
CRs-Fixed: 523705
2013-09-09 17:48:58 -07:00
Chet Lanctot
4c15b56910 wlan: Add support for configuration of 802.11w
Changes to allow setting the configuration item for
802.11w (Protected Management Frames) in hostapd
configuration file.

CRs-Fixed: 512764

Change-Id: I4dc7afe8fc56bff79f52eae04a65d573db2746d9
2013-07-26 10:08:27 -07:00