summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mediatek/mt76/mt7921/sdio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7921/sdio.c')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7921/sdio.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/sdio.c b/drivers/net/wireless/mediatek/mt76/mt7921/sdio.c
index 8ce4252b8ae7..584921fb25b5 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/sdio.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/sdio.c
@@ -122,33 +122,17 @@ static int mt7921s_probe(struct sdio_func *func,
.drv_own = mt7921s_mcu_drv_pmctrl,
.fw_own = mt7921s_mcu_fw_pmctrl,
};
-
struct ieee80211_ops *ops;
struct mt7921_dev *dev;
struct mt76_dev *mdev;
u8 features;
int ret;
- features = mt7921_check_offload_capability(&func->dev, (const char *)
- id->driver_data);
-
- ops = devm_kmemdup(&func->dev, &mt7921_ops, sizeof(mt7921_ops),
- GFP_KERNEL);
+ ops = mt7921_get_mac80211_ops(&func->dev, (void *)id->driver_data,
+ &features);
if (!ops)
return -ENOMEM;
- if (!(features & MT7921_FW_CAP_CNM)) {
- ops->remain_on_channel = NULL;
- ops->cancel_remain_on_channel = NULL;
- ops->add_chanctx = NULL;
- ops->remove_chanctx = NULL;
- ops->change_chanctx = NULL;
- ops->assign_vif_chanctx = NULL;
- ops->unassign_vif_chanctx = NULL;
- ops->mgd_prepare_tx = NULL;
- ops->mgd_complete_tx = NULL;
- }
-
mdev = mt76_alloc_device(&func->dev, sizeof(*dev), ops, &drv_ops);
if (!mdev)
return -ENOMEM;