aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/hostapd/src
Commit message (Collapse)AuthorAgeFilesLines
* hostapd: add ubus link-measurements notificationsDavid Bauer2022-04-172-0/+33
| | | | | | | Notify external ubus subscribers of received link-measurement reports. Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit f6445cfa1acb32676723c49da3e3158b64a4b3d2)
* hostapd: add ubus method for requesting link measurementsDavid Bauer2022-04-171-0/+65
| | | | | | | | | | | Add a ubus method to request link-measurements from connected STAs. In addition to the STAs address, the used and maximum transmit power can be provided by the external process for the link-measurement. If they are not provided, 0 is used as the default value. Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit 965aa33a18c76bb2d5a1eeb0cfa01501b08e784a)
* hostapd: add support for enabling link measurementsDavid Bauer2022-04-171-0/+10
| | | | | | | | Allow external processes to enable advertisement of link-measurement RRM capability. Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit 2ca5c3da04c3f05a7477ae484768e03d4ca30711)
* hostapd: add STA extended capabilities to get_clientsDavid Bauer2022-02-191-0/+10
| | | | | | | | | | Add the STAs extended capabilities to the ubus STA information. This way, external daemons can be made aware of a STAs capabilities. This field is of an array type and contains 0 or more bytes of a STAs advertised extended capabilities. Signed-off-by: David Bauer <mail@david-bauer.net>
* hostapd: update to v2.10David Bauer2022-02-081-1/+1
| | | | | | | | | | | | | | | | | | Upstreamed patches: 020-mesh-make-forwarding-configurable.patch e6db1bc5da3fd7d5f4dba24aa102543b4749912f 550-WNM-allow-specifying-dialog-token.patch 979f19716539362f8ce60a77bf1b88fdcf5ba8e5 720-ACS-fix-channel-100-frequency.patch 2341585c349231af00cdef8d51458df01bc6965f 741-proxyarp-fix-compilation-with-Hotspot-2.0-disabled.patch 08bdf4f90de61a84ed8f4dd918272dd9d36e2e1f Compile-tested: wpad-wolfssl hostapd-openssl Run-tested: ath79-generic Signed-off-by: David Bauer <mail@david-bauer.net> Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
* hostapd: automatically calculate channel center freq on chan_switchFelix Fietkau2022-02-071-0/+34
| | | | | | Simplifies switching to different channels when on >= VHT80 Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: add op-class to get_status outputDavid Bauer2022-01-141-2/+9
| | | | | | Include the current operation class to hostapd get_status interface. Signed-off-by: David Bauer <mail@david-bauer.net>
* hostapd: add missing function declarationDavid Bauer2021-12-271-0/+10
| | | | Signed-off-by: David Bauer <mail@david-bauer.net>
* hostapd: make OpenWrt statistics per-BSSDavid Bauer2021-12-201-4/+4
| | | | | | | WNM and RRM statistics were incorrectly per-PHY, leading to shared statistic counters per BSS. Signed-off-by: David Bauer <mail@david-bauer.net>
* hostapd: provide BSS-transition-queries to ubus subscribersDavid Bauer2021-12-201-7/+56
| | | | | | | | | | | | | | | Provide incoming BSS transition queries to ubus subscribers. This allows external steering daemons to provide clients with an optimal list of transition candidates. This commit has no functional state in case no ubus subscriber is present or it does not handle this ubus message. To prevent hostapd from sending out a generic response by itself, a subscribing daemon has to return a non-zero response code to hostapd. Signed-off-by: David Bauer <mail@david-bauer.net>
* hostapd: WNM: allow specifying dialog-tokenDavid Bauer2021-12-201-4/+11
| | | | | | | | | | Backport a patch to allow extending the ubus BSS-transition method for specifying individual dialog tokens for BSS transition management requests. This is required for handling BSS transition queries in the future. Signed-off-by: David Bauer <mail@david-bauer.net>
* hostapd: close correct blobmsg tableDavid Bauer2021-12-161-1/+1
| | | | Signed-off-by: David Bauer <mail@david-bauer.net>
* hostapd: add OpenWrt specific statistic countersDavid Bauer2021-12-151-1/+13
| | | | | | | | | | This adds a new struct for storing statistics not (yet) tracked by hostapd regarding RRM and WNM activity. These statistics can be read using the get_status hostapd interface ubus method. Signed-off-by: David Bauer <mail@david-bauer.net>
* hostapd: enable FILS support in the full config and add build feature discoveryFelix Fietkau2021-12-101-0/+4
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: add beacon_interval to get_status ubus outputDavid Bauer2021-11-251-0/+1
| | | | | | | | | | Add the beacon interval to hostapd status output. This allows external services to discover the beacon interval for a specific VAP. This way, external wireless management daemons can correctly calculate fields containing TBTT value from absolute time-values. Signed-off-by: David Bauer <mail@david-bauer.net>
* hostapd: ubus: add BSS transtiton request methodDavid Bauer2021-10-131-40/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | The existing wnm_disassoc_imminent ubus method only supports issuing a bss transition request with the disassoc imminent flag set. For use-cases, where the client is requested to roam to another BSS without a pending disassoc, this existing method is not suitable. Add a new bss_transition_request ubus method, which provides a more universal way to dispatch a transition request. It takes the following arguments: Required: addr: String - MAC-address of the STA to send the request to (colon-seperated) Optional: abridged - Bool - Indicates if the abridged flag is set disassociation_imminent: Bool - Whether or not the disassoc_imminent flag is set disassociation_timer: I32 - number of TBTTs after which the client will be disassociated validity_period: I32 - number of TBTTs after which the beacon candidate list (if included) will be invalid neighbors: blob-array - Array of strings containing neighbor reports as hex-string Signed-off-by: David Bauer <mail@david-bauer.net>
* hostapd: ubus: add notification for BSS transition responseDavid Bauer2021-10-132-0/+44
| | | | | | | | | To allow steering daemons to be aware of the STA-decided transition target, publish WNM transition responses to ubus. This way, steerings daemons can learn about STA-chosen targets and send a better selection of transition candidates. Signed-off-by: David Bauer <mail@david-bauer.net>
* hostapd: fix segfault when deinit mesh ifacesJesus Fernandez Manzano2021-09-241-0/+5
| | | | | | | | | | | In hostapd_ubus_add_bss(), ubus objects are not registered for mesh interfaces. This provokes a segfault when accessing the ubus object in mesh deinit. This commit adds the same condition to hostapd_ubus_free_bss() for discarding those mesh interfaces. Signed-off-by: Jesus Fernandez Manzano <jesus.manzano@galgus.net>
* hostapd: fix broken check in radar detection notificationFelix Fietkau2021-08-111-3/+0
| | | | | | | This check was accidentally left in after reworking the code, causing a segfault Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: add "force" parameter for channel switchFelix Fietkau2021-07-151-1/+21
| | | | | | | This will restart the interface in case the CSA fails and can be used to force the device on a DFS channel (including full CAC) Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: initialize ht/vht/he mode on channel switch by defaultFelix Fietkau2021-07-121-2/+24
| | | | | | Use the current mode, but allow overwriting via ubus command parameters Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: add support for enabling HE on channel switchFelix Fietkau2021-07-121-0/+3
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: make it possible to update station airtime weights via ubusFelix Fietkau2021-07-121-0/+58
| | | | | | This allows dynamic tuning based on other runtime information Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: add HE flag to get_clientsDavid Bauer2021-07-061-0/+1
| | | | | | Expose the hostapd HE flag via ubus to indicate HE capable devices. Signed-off-by: David Bauer <mail@david-bauer.net>
* hostapd: remove unused mac_buff allocationMartin Weinelt2021-07-061-1/+0
| | | | Signed-off-by: Martin Weinelt <hexa@darmstadt.ccc.de>
* hostapd: report bssid, ssid and channel over ubusMartin Weinelt2021-07-061-0/+38
| | | | | | | | | Imports a function from iw to convert frequencies to channel numbers. Co-authored-by: David Bauer <mail@david-bauer.net> Signed-off-by: Martin Weinelt <hexa@darmstadt.ccc.de> [fix potential out of bounds read] Signed-off-by: David Bauer <mail@david-bauer.net>
* hostapd: stop advertising 11w featureDobroslaw Kijowski2021-06-201-2/+0
| | | | | | | | | | | | | This is a follow up of 1a9b896d ("treewide: nuke DRIVER_11W_SUPPORT"). LuCI commit ab010406 ("luci-mod-network: skip check for 802.11w feature") skips check of the 11w feature [1]. Now advertising it in hostapd is superfluous so stop doing it. [1]: https://github.com/openwrt/luci/pull/4689 Signed-off-by: Dobroslaw Kijowski <dobo90@gmail.com> [remove outdated PKG_RELEASE bump and update to SPDX] Signed-off-by: Paul Spooren <mail@aparcar.org>
* hostapd: report radar detected events via ubusFelix Fietkau2021-05-262-0/+27
| | | | | | Events are reported on all BSS interfaces Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: improve channel switch supportFelix Fietkau2021-05-261-3/+9
| | | | | | | | Instead of requiring the user to call it on each BSS individually, run it on all BSSs internally. Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: add missing inline stubs for ubus vlan event supportFelix Fietkau2021-05-261-0/+8
| | | | | | Only used when building without ubus support Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: add ubus notifications for adding/removing vlan interfacesFelix Fietkau2021-05-182-0/+39
| | | | | | | This can be used to handle network configuration of dynamically created vlan interfaces in a more flexible way Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: return PID on config_add callDaniel Golle2021-01-102-0/+8
| | | | | | | | | To simplify the way netifd acquires the PIDs of wpa_supplicant and hostapd let the config_add method of both of them return the PID of the called process. Use the returned PID instead of querying procd when adding wpa_supplicant configuration. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* treewide: nuke DRIVER_11W_SUPPORTDobroslaw Kijowski2020-12-231-2/+0
| | | | | | | | | | | | | | As of hostapd upstream commit 7d2ed8ba "Remove CONFIG_IEEE80211W build parameter" https://w1.fi/cgit/hostap/commit?id=7d2ed8bae86a31dd2df45c24b3f7281d55315482 802.11w feature is always enabled in the build time. It doesn't make sense to opt-in 802.11w per driver as hostapd will always be compiled with this feature enabled. As suggested by Hauke Mehrtens, for now keep 11w enabled in build_features.h for compatibility reasons. This option will be dropped when LuCI is adjusted. Signed-off-by: Dobroslaw Kijowski <dobo90@gmail.com>
* hostapd: set validity interval for BSS TMRADavid Bauer2020-11-171-1/+1
| | | | | | | | | | | | This sets the validity interval for the BSS transition candidate list to the same value as the disassociation timer. Currently the value is always 0, which is the specification states is a reserved value. Also, wpa_supplicant and from the looks of it some Android implementations will outright ignore the candidate list in this case. Signed-off-by: David Bauer <mail@david-bauer.net>
* hostapd: ubus: add get_status methodDavid Bauer2020-11-171-0/+40
| | | | | | | This adds a new get_status method to a hostapd interface, which provides information about the current interface status. Signed-off-by: David Bauer <mail@david-bauer.net>
* hostapd: ubus: add VHT capabilities to client listDavid Bauer2020-11-171-0/+71
| | | | | | | This adds parsed VHT capability information to the hostapd get_clients method. Signed-off-by: David Bauer <mail@david-bauer.net>
* hostapd: ubus: add driver information to client listDavid Bauer2020-11-171-0/+24
| | | | | | | | This adds information from mac80211 to hostapd get_client ubus function. This way, TX as well as RX status information as well as the signal can be determined. Signed-off-by: David Bauer <mail@david-bauer.net>
* hostapd: ubus: add handler for wps_status and guard WPS callsDaniel Golle2020-10-162-0/+56
| | | | | | | | | Expose WPS ubus API only if compiled with WPS support and add new handler for wps_status call. Also add '-v wps' option to check whether WPS support is present in hostapd. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* hostapd: ubus: make (B)SSID optional for neighbor reportDavid Bauer2020-09-221-9/+24
| | | | | | | | | | | Make the BSSID and SSID fields optional when configuring a neighbor report into hostapd. Both options can now be an empty string. For the BSSID, the first 6 byte are copied from the neighbor report. For the SSID, the SSID for the affected hostapd BSS is used. Signed-off-by: David Bauer <mail@david-bauer.net>
* hostapd: ubus: send notification instead of eventDavid Bauer2020-09-221-11/+12
| | | | | | | | | | | Rafal Milecki pointed out that ubus events are meant for low-level ubus events only (e.g. addition or removal of an object). Higher level events should happen as notifications on the ubus object itself. Dispatch BSS events on the main hostapd ubus object instead of publishing them as ubus events. Signed-off-by: David Bauer <mail@david-bauer.net>
* hostapd: ubus: fix infinite loop when configuring RRM NRDavid Bauer2020-09-211-2/+1
| | | | | | | The return-code was set, however it was never returned, nor was the loop interrupted. Signed-off-by: David Bauer <mail@david-bauer.net>
* hostapd: send procd event on BSS updateDavid Bauer2020-09-211-3/+35
| | | | | | | Dispatch ubus events also to procd in order to trigger service reloads on hostapd updates. Signed-off-by: David Bauer <mail@david-bauer.net>
* hostapd: send ubus event on BSS updateDavid Bauer2020-09-211-1/+23
| | | | | | | | | | | hostapd will emit a ubus event with the eventname hostapd.<ifname>.<event> when adding, removing or reloading a BSS. This way, services which install state (for example the RMM neighbor list) can on-demand reinstall this information for the BSS without polling this state. Signed-off-by: David Bauer <mail@david-bauer.net>
* hostapd: add UCI support for Hotspot 2.0Daniel Golle2020-09-081-0/+4
| | | | Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* hostapd: add config symbol for allowing drivers to enable 802.11ax supportFelix Fietkau2020-06-101-0/+4
| | | | | | Also expose a build feature for it Signed-off-by: Felix Fietkau <nbd@nbd.name>
* hostapd: add WEP as queryable build featureDavid Bauer2020-05-221-0/+4
| | | | | | | | | | | Commit 472fd98c5b12 ("hostapd: disable support for Wired Equivalent Privacy by default") made support for WEP optional. Expose the WEP support to LuCi or other userspace tools using the existing interface. This way they are able to remove WEP from the available ciphers if hostapd is built without WEP support. Signed-off-by: David Bauer <mail@david-bauer.net>
* hostapd: reduce to a single instance per serviceDaniel Golle2020-04-142-29/+2
| | | | Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* hostapd: add abridged flag in disassoc_imminentNick Hainke2020-03-301-0/+5
| | | | | | | | | | | | | If the abridged flag is set to 1 the APs that are listed in the BSS Transition Candidate List are prioritized. If the bit is not set, the APs have the same prioritization as the APs that are not in the list. If you want to steer a client, you should set the flag! The flag can be set by adding {...,'abridged': true,...} to the normal ubus call. Signed-off-by: Nick Hainke <vincent@systemli.org>
* hostapd: expose beacon reports through ubusNick Hainke2020-03-302-0/+39
| | | | | | | | | | | | | | | | | | | Subscribe to beacon reports through ubus. Can be used for hearing map and client steering purposes. First enable rrm: ubus call hostapd.wlan0 bss_mgmt_enable '{"beacon_report":True}' Subscribe to the hostapd notifications via ubus. Request beacon report: ubus call hostapd.wlan0 rrm_beacon_req '{"addr":"00:xx:xx:xx:xx:xx", "op_class":0, "channel":1, "duration":1,"mode":2,"bssid":"ff:ff:ff:ff:ff:ff", "ssid":""}' Signed-off-by: Nick Hainke <vincent@systemli.org> [rework identation] Signed-off-by: David Bauer <mail@david-bauer.net>
* hostapd: fix segfault in wpa_supplicant ubusDaniel Golle2020-03-181-0/+2
| | | | | | | | | | | | | | When introducing ubus reload support, ubus initialization was moved to the service level instead of being carried out when adding a BSS configuration. While this works when using wpa_supplicant in that way, it breaks the ability to run wpa_supplicant on the command line, eg. for debugging purposes. Fix that by re-introducing ubus context intialization when adding configuration. Reported-by: @PolynomialDivision https://github.com/openwrt/openwrt/pull/2417 Fixes: 60fb4c92b6 ("hostapd: add ubus reload") Signed-off-by: Daniel Golle <daniel@makrotopia.org>