bb4782a7a48cf33333dae5bdc6251d3db3e966d0
[openwrt/staging/hauke.git] /
1 From 8d9627b05b2c33e4468e65739eb7caf9c3f274d8 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Tue, 10 Dec 2019 12:35:55 +0100
4 Subject: [PATCH] brcmfmac: set interface carrier to off by default
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 It's important as brcmfmac creates one main interface for each PHY and
10 doesn't allow deleting it. Not setting carrier could result in other
11 subsystems misbehaving (e.g. LEDs "netdev" trigger turning LED on).
12
13 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
14 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
15 ---
16 drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 2 ++
17 1 file changed, 2 insertions(+)
18
19 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
20 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
21 @@ -678,6 +678,8 @@ int brcmf_net_attach(struct brcmf_if *if
22 goto fail;
23 }
24
25 + netif_carrier_off(ndev);
26 +
27 netdev_set_priv_destructor(ndev, brcmf_cfg80211_free_netdev);
28 brcmf_dbg(INFO, "%s: Broadcom Dongle Host Driver\n", ndev->name);
29 return 0;