summaryrefslogtreecommitdiff
path: root/wireless.c
Commit message (Collapse)AuthorAgeFilesLines
* wireless: Call wireless_interface_handle_link before deleting the vifHans Dedecker2016-11-041-0/+1
| | | | | | | Similar as when updating a vif; call wireless_interface_handle_link removing the vif from the network when deleting a vif Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* bridge: Make bridge_device_type staticHans Dedecker2016-09-261-1/+1
| | | | Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* wireless: remove config_autostartEduardo Abinader2016-08-251-2/+1
| | | | | | just a cleanup for an unused member. Signed-off-by: Eduardo Abinader <eduardoabinader@gmail.com>
* wireless: add retry_setup_failed to status notificationEduardo Abinader2016-08-241-0/+1
| | | | | | | | As autostart is now more aligned to user intention of automatic starting the wdev, to add retry_setup_failed to status msg may be of a help for current stating how setup is proceeding. Signed-off-by: Eduardo Abinader <eduardoabinader@gmail.com>
* netifd: track when wdev setup failsEduardo Abinader2016-08-231-5/+13
| | | | | | | | | | | When netifd failed to load a valid configuration, after an invalid one, it was not possible to setup the wireless device. This patch aims to track this situation and behave acordingly, by keeping track of failed setup without affecting autostart behavior. Also block the restart of the wdev, when not applied. Signed-off-by: Eduardo Abinader <eduardoabinader@gmail.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* wireless: call wireless_interface_handle_link before updating vif configFelix Fietkau2015-12-021-0/+1
| | | | | | | If the network changes, we need to remove the vif from the old network before we lose access to the previous state Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* Initialize wireless interface attributes in proper functionDmitry Ivanov2015-09-261-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently multicast to unicast feature may be configured for incorrect wireless interface in case of reconfiguration. Test case: Initial wireless configuration: config wifi-iface option mode ap option disabled 1 config wifi-iface option mode sta option disabled 0 config wifi-iface option mode ap option disabled 0 After reboot, multicast to unicast feature is configured for interface #3 (wlan0-1) only. Next, enable interface #1 and issue "wifi" command. Now, multicast to unicast feature is configured for interface #2 (wlan0) which is wrong. It should be configured for interfaces #1 and #3 only. This patch resolves this problem. Signed-off-by: Dmitry Ivanov <dima@ubnt.com> Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: fix mcast_to_ucast handling, only apply it to AP modeFelix Fietkau2015-09-101-0/+9
| | | | | | | Fixes a regression that caused WDS stations to repeat packets back to the AP. Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* bridge: Allow setting multicast_to_unicast optionLinus Lüssing2015-08-251-0/+4
| | | | | | | | | | | With this patch the multicast_to_unicast feature can be disabled for all wireless interfaces via an according option on the uci bridge interface. This patch also exports the setting information to wireless handler scripts. The hostapd script will need that information to determine whether to enable or disable ap-isolation, for instance. Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
* bridge: Fix multicast_to_unicast feature by hairpin+isolateLinus Lüssing2015-08-251-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | All IGMP and MLD versions suffer from a specific limitation (from a snooping switch perspective): Report suppression. Once a listener hears an IGMPv2/3 or MLDv1 report for the same group itself participates in then it might (if this listener is an IGMPv3 or MLDv2 listener) or will (if this is an IGMPv1/2 or MLDv1 listener) refrain from sending its own report. Therefore we might currently miss such surpressing listeners as they won't receive the multicast packet with the mangled, unicasted destination. Fixing this by first isolating the STAs and giving the bridge more control over traffic forwarding. E.g. refraining to forward listener reports to other STAs. For broadcast and unicast traffic to an STA on the same AP, the hairpin feature of the bridge will reflect such traffic back to the AP interface. However, if the AP interface is actually configured to isolate STAs, then hairpin is kept disabled. Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
* wireless: fix teardown, always pass the previous config to the teardown ↵Felix Fietkau2015-02-281-2/+22
| | | | | | handler instead of the new one Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: use strdup for vif sectionsFelix Fietkau2014-10-241-5/+7
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: print the active configuration in status infoFelix Fietkau2014-10-041-2/+2
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: fix blob buf in put_container()Felix Fietkau2014-10-041-3/+3
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: copy the vif section name instead of keeping a reference that ↵Felix Fietkau2014-10-041-3/+5
| | | | | | might go stale Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* netifd: Allow to add link devices which can be marked as non externalHans Dedecker2014-07-301-1/+1
| | | | Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
* bridge: enable multicast_to_unicast on all wireless bridge portsFelix Fietkau2014-06-291-0/+6
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: fix cancelling setupFelix Fietkau2014-05-151-14/+17
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* netifd: fix a use-after-free issue on wireless config updateFelix Fietkau2014-04-291-1/+2
| | | | | | After vlist_add() the device could have been freed Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: defer init until after command line option processingFelix Fietkau2014-03-071-2/+1
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: fix device config reload regressionFelix Fietkau2014-02-231-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: add a "get_validate" methode to ubusJohn Crispin2014-02-171-0/+24
| | | | Signed-off-by: John Crispin <blogic@openwrt.org>
* wireless: load and then ignore disabled devicesJohn Crispin2014-02-171-3/+10
| | | | Signed-off-by: John Crispin <blogic@openwrt.org>
* wireless: fix alignment of wireless config structs - fixes segfaults on armFelix Fietkau2013-12-291-3/+3
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: cancel the script check timerFelix Fietkau2013-12-281-0/+1
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: remove the no_delete flag, remove virtual interfaces from the avl treeFelix Fietkau2013-12-111-1/+0
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: fix handling of wdev->config_state, prevent handling of multiple ↵Felix Fietkau2013-12-111-5/+3
| | | | | | state changes (reload + remove) Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: remove freed wireless devices from the vlist avl treeFelix Fietkau2013-12-111-3/+4
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: add back support for multiple networks per interfaceFelix Fietkau2013-12-081-16/+33
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: make interfaces in status an array instead of an objectFelix Fietkau2013-12-031-3/+3
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: prepare bridge interfaces before passing them to the setup scriptFelix Fietkau2013-12-031-0/+3
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: only process setup retries in setup/up stateFelix Fietkau2013-12-021-0/+3
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: fix reload of active interfacesFelix Fietkau2013-12-011-30/+27
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: fix issues with cancelling device setupFelix Fietkau2013-12-011-0/+2
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: add another debug messageFelix Fietkau2013-12-011-0/+1
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: fix parsing of the immediate flag for kill-allFelix Fietkau2013-12-011-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: add input validation for processesFelix Fietkau2013-12-011-1/+6
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: fix config state handlingFelix Fietkau2013-12-011-1/+4
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: add debug messagesFelix Fietkau2013-12-011-1/+10
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: fix use-after-free bugFelix Fietkau2013-11-301-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: show the virtual interface section name in wireless statusFelix Fietkau2013-11-301-1/+5
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* wireless: show the ifname in wireless statusFelix Fietkau2013-11-301-0/+2
| | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org>
* add initial support for handling wireless devices via scriptsFelix Fietkau2013-11-291-0/+863
Signed-off-by: Felix Fietkau <nbd@openwrt.org>