mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-03 20:34:23 -04:00
mt76: unify remove_interface
Use common remove_interface callback in mt76x0 and mt76x2. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
committed by
Felix Fietkau
parent
900c0f4746
commit
0cd47bae22
@@ -62,14 +62,6 @@ static int mt76x0_add_interface(struct ieee80211_hw *hw,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void mt76x0_remove_interface(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
struct mt76x0_dev *dev = hw->priv;
|
||||
|
||||
mt76_txq_remove(&dev->mt76, vif->txq);
|
||||
}
|
||||
|
||||
static int mt76x0_config(struct ieee80211_hw *hw, u32 changed)
|
||||
{
|
||||
struct mt76x0_dev *dev = hw->priv;
|
||||
@@ -203,7 +195,7 @@ const struct ieee80211_ops mt76x0_ops = {
|
||||
.start = mt76x0_start,
|
||||
.stop = mt76x0_stop,
|
||||
.add_interface = mt76x0_add_interface,
|
||||
.remove_interface = mt76x0_remove_interface,
|
||||
.remove_interface = mt76x02_remove_interface,
|
||||
.config = mt76x0_config,
|
||||
.configure_filter = mt76x02_configure_filter,
|
||||
.bss_info_changed = mt76x0_bss_info_changed,
|
||||
|
||||
@@ -127,6 +127,15 @@ void mt76x02_vif_init(struct mt76_dev *dev, struct ieee80211_vif *vif,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76x02_vif_init);
|
||||
|
||||
void mt76x02_remove_interface(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
struct mt76_dev *dev = hw->priv;
|
||||
|
||||
mt76_txq_remove(dev, vif->txq);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76x02_remove_interface);
|
||||
|
||||
int mt76x02_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
struct ieee80211_ampdu_params *params)
|
||||
{
|
||||
|
||||
@@ -28,6 +28,8 @@ int mt76x02_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
|
||||
void mt76x02_vif_init(struct mt76_dev *dev, struct ieee80211_vif *vif,
|
||||
unsigned int idx);
|
||||
void mt76x02_remove_interface(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif);
|
||||
|
||||
int mt76x02_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
struct ieee80211_ampdu_params *params);
|
||||
|
||||
@@ -18,15 +18,6 @@
|
||||
#include "mt76x2.h"
|
||||
#include "mt76x02_mac.h"
|
||||
|
||||
void mt76x2_remove_interface(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif)
|
||||
{
|
||||
struct mt76x2_dev *dev = hw->priv;
|
||||
|
||||
mt76_txq_remove(&dev->mt76, vif->txq);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76x2_remove_interface);
|
||||
|
||||
void mt76x2_sta_rate_tbl_update(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_sta *sta)
|
||||
|
||||
@@ -314,7 +314,7 @@ const struct ieee80211_ops mt76x2_ops = {
|
||||
.start = mt76x2_start,
|
||||
.stop = mt76x2_stop,
|
||||
.add_interface = mt76x2_add_interface,
|
||||
.remove_interface = mt76x2_remove_interface,
|
||||
.remove_interface = mt76x02_remove_interface,
|
||||
.config = mt76x2_config,
|
||||
.configure_filter = mt76x02_configure_filter,
|
||||
.bss_info_changed = mt76x2_bss_info_changed,
|
||||
|
||||
@@ -164,7 +164,7 @@ const struct ieee80211_ops mt76x2u_ops = {
|
||||
.start = mt76x2u_start,
|
||||
.stop = mt76x2u_stop,
|
||||
.add_interface = mt76x2u_add_interface,
|
||||
.remove_interface = mt76x2_remove_interface,
|
||||
.remove_interface = mt76x02_remove_interface,
|
||||
.sta_add = mt76x02_sta_add,
|
||||
.sta_remove = mt76x02_sta_remove,
|
||||
.set_key = mt76x02_set_key,
|
||||
|
||||
Reference in New Issue
Block a user