diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2016-06-17 07:50:22 +0000 |
---|---|---|
committer | Luka Perkov <luka@openwrt.org> | 2016-06-19 19:56:13 +0200 |
commit | 468fe950b84bf37bb0519337cfe554ac9c296d2f (patch) | |
tree | 159ffddf2f475f10beeb6cd76ca655a6e59332ef /package/kernel/mac80211/patches/351-0011-brcmfmac-don-t-remove-interface-on-link-down-firmwar.patch | |
parent | 0e29de61f7fa28126bba270a67fe710a6f949374 (diff) | |
download | upstream-468fe950b84bf37bb0519337cfe554ac9c296d2f.tar.gz upstream-468fe950b84bf37bb0519337cfe554ac9c296d2f.tar.bz2 upstream-468fe950b84bf37bb0519337cfe554ac9c296d2f.zip |
mac80211: brcmfmac: fix support for BCM4366
1) Fix setting AP channel
2) Improve BSS management to avoid:
[ 3602.929199] brcmfmac: brcmf_ap_add_vif: timeout occurred
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Backport of r49383
git-svn-id: svn://svn.openwrt.org/openwrt/branches/chaos_calmer@49386 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kernel/mac80211/patches/351-0011-brcmfmac-don-t-remove-interface-on-link-down-firmwar.patch')
-rw-r--r-- | package/kernel/mac80211/patches/351-0011-brcmfmac-don-t-remove-interface-on-link-down-firmwar.patch | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/351-0011-brcmfmac-don-t-remove-interface-on-link-down-firmwar.patch b/package/kernel/mac80211/patches/351-0011-brcmfmac-don-t-remove-interface-on-link-down-firmwar.patch new file mode 100644 index 0000000000..df707a788f --- /dev/null +++ b/package/kernel/mac80211/patches/351-0011-brcmfmac-don-t-remove-interface-on-link-down-firmwar.patch @@ -0,0 +1,60 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com> +Date: Mon, 30 May 2016 06:40:54 +0200 +Subject: [PATCH] brcmfmac: don't remove interface on link down firmware event +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +There are two firmware events we handle similarly in brcmfmac: +BRCMF_E_LINK and BRCMF_E_IF. The difference from firmware point of view +is that the first one means BSS remains present in the firmware. Trying +to (re)create it (e.g. when adding new virtual interface) will result in +an error. + +Current code treats both events in a similar way. It removes Linux +interface for each of them. It works OK with e.g. BCM43602. Its firmware +generates both events for each interface. It means we get BRCMF_E_LINK +and remove interface. That is soon followed by BRCMF_E_IF which means +BSS was also removed in a firmware. The only downside of this is a +harmless error like: +[ 208.643180] brcmfmac: brcmf_fweh_call_event_handler: no interface object + +Unfortunately BCM4366 firmware doesn't automatically remove BSS and so +it doesn't generate BRCMF_E_IF. In such case we incorrectly remove Linux +interface on BRCMF_E_LINK as BSS is still present in the firmware. It +results in an error when trying to re-create virtual interface, e.g.: +> iw phy phy1 interface add wlan1-1 type __ap +[ 3602.929199] brcmfmac: brcmf_ap_add_vif: timeout occurred +command failed: I/O error (-5) + +With this patch we don't remove Linux interface while firmware keeps +BSS. Thanks to this we keep a consistent states of host driver and +device firmware. + +Further improvement should be to mark BSS as disabled and remove +interface on BRCMF_E_LINK. Then we should add support for reusing +BSS-es. + +Signed-off-by: Rafał Miłecki <zajec5@gmail.com> +Signed-off-by: Kalle Valo <kvalo@codeaurora.org> +--- + +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +@@ -5269,7 +5269,6 @@ brcmf_notify_connect_status_ap(struct br + struct net_device *ndev, + const struct brcmf_event_msg *e, void *data) + { +- struct brcmf_if *ifp = netdev_priv(ndev); + static int generation; + u32 event = e->event_code; + u32 reason = e->reason; +@@ -5280,8 +5279,6 @@ brcmf_notify_connect_status_ap(struct br + ndev != cfg_to_ndev(cfg)) { + brcmf_dbg(CONN, "AP mode link down\n"); + complete(&cfg->vif_disabled); +- if (ifp->vif->mbss) +- brcmf_remove_interface(ifp); + return 0; + } + |