diff options
author | Felix Fietkau <nbd@nbd.name> | 2019-02-27 21:42:39 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2019-03-07 14:50:23 +0300 |
commit | 004960423fe17dfff93753017b7081dab36c7180 (patch) | |
tree | f7f0aadb89dbeda7e9d734683747e4dea751c5b1 /drivers/net/wireless/mediatek/mt76/mt76x02_util.c | |
parent | de3c2af15fce23c42407ad0a868ac47df2e7279a (diff) | |
download | linux-004960423fe17dfff93753017b7081dab36c7180.tar.xz |
mt76: mt76x2: implement full device restart on watchdog reset
Restart the firmware and re-initialize the MAC to be able to recover
from more kinds of hang states
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x02_util.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x02_util.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c index a48c261b0c63..28eccb3119d1 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x02_util.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_util.c @@ -237,6 +237,8 @@ int mt76x02_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif, struct mt76x02_vif *mvif = (struct mt76x02_vif *)vif->drv_priv; int idx = 0; + memset(msta, 0, sizeof(*msta)); + idx = mt76_wcid_alloc(dev->mt76.wcid_mask, ARRAY_SIZE(dev->mt76.wcid)); if (idx < 0) return -ENOSPC; @@ -274,6 +276,8 @@ mt76x02_vif_init(struct mt76x02_dev *dev, struct ieee80211_vif *vif, struct mt76x02_vif *mvif = (struct mt76x02_vif *)vif->drv_priv; struct mt76_txq *mtxq; + memset(mvif, 0, sizeof(*mvif)); + mvif->idx = idx; mvif->group_wcid.idx = MT_VIF_WCID(idx); mvif->group_wcid.hw_key_idx = -1; |