1 /* SPDX-License-Identifier: ISC */
3 #include <linux/etherdevice.h>
4 #include <linux/platform_device.h>
6 #include <linux/module.h>
11 mt7603_start(struct ieee80211_hw *hw)
13 struct mt7603_dev *dev = hw->priv;
15 mt7603_mac_start(dev);
16 dev->survey_time = ktime_get_boottime();
17 set_bit(MT76_STATE_RUNNING, &dev->mt76.state);
18 mt7603_mac_work(&dev->mac_work.work);
24 mt7603_stop(struct ieee80211_hw *hw)
26 struct mt7603_dev *dev = hw->priv;
28 clear_bit(MT76_STATE_RUNNING, &dev->mt76.state);
29 cancel_delayed_work_sync(&dev->mac_work);
34 mt7603_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
36 struct mt7603_vif *mvif = (struct mt7603_vif *)vif->drv_priv;
37 struct mt7603_dev *dev = hw->priv;
38 struct mt76_txq *mtxq;
43 mutex_lock(&dev->mt76.mutex);
45 mvif->idx = ffs(~dev->vif_mask) - 1;
46 if (mvif->idx >= MT7603_MAX_INTERFACES) {
51 mt76_wr(dev, MT_MAC_ADDR0(mvif->idx),
52 get_unaligned_le32(vif->addr));
53 mt76_wr(dev, MT_MAC_ADDR1(mvif->idx),
54 (get_unaligned_le16(vif->addr + 4) |
57 if (vif->type == NL80211_IFTYPE_AP) {
58 mt76_wr(dev, MT_BSSID0(mvif->idx),
59 get_unaligned_le32(vif->addr));
60 mt76_wr(dev, MT_BSSID1(mvif->idx),
61 (get_unaligned_le16(vif->addr + 4) |
65 idx = MT7603_WTBL_RESERVED - 1 - mvif->idx;
66 dev->vif_mask |= BIT(mvif->idx);
67 mvif->sta.wcid.idx = idx;
68 mvif->sta.wcid.hw_key_idx = -1;
70 eth_broadcast_addr(bc_addr);
71 mt7603_wtbl_init(dev, idx, mvif->idx, bc_addr);
73 mtxq = (struct mt76_txq *)vif->txq->drv_priv;
74 mtxq->wcid = &mvif->sta.wcid;
75 mt76_txq_init(&dev->mt76, vif->txq);
76 rcu_assign_pointer(dev->mt76.wcid[idx], &mvif->sta.wcid);
79 mutex_unlock(&dev->mt76.mutex);
85 mt7603_remove_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
87 struct mt7603_vif *mvif = (struct mt7603_vif *)vif->drv_priv;
88 struct mt7603_dev *dev = hw->priv;
89 int idx = mvif->sta.wcid.idx;
91 mt76_wr(dev, MT_MAC_ADDR0(mvif->idx), 0);
92 mt76_wr(dev, MT_MAC_ADDR1(mvif->idx), 0);
93 mt76_wr(dev, MT_BSSID0(mvif->idx), 0);
94 mt76_wr(dev, MT_BSSID1(mvif->idx), 0);
95 mt7603_beacon_set_timer(dev, mvif->idx, 0);
97 rcu_assign_pointer(dev->mt76.wcid[idx], NULL);
98 mt76_txq_remove(&dev->mt76, vif->txq);
100 mutex_lock(&dev->mt76.mutex);
101 dev->vif_mask &= ~BIT(mvif->idx);
102 mutex_unlock(&dev->mt76.mutex);
106 mt7603_init_edcca(struct mt7603_dev *dev)
108 /* Set lower signal level to -65dBm */
109 mt76_rmw_field(dev, MT_RXTD(8), MT_RXTD_8_LOWER_SIGNAL, 0x23);
111 /* clear previous energy detect monitor results */
112 mt76_rr(dev, MT_MIB_STAT_ED);
115 mt76_set(dev, MT_MIB_CTL, MT_MIB_CTL_ED_TIME);
117 mt76_clear(dev, MT_MIB_CTL, MT_MIB_CTL_ED_TIME);
119 dev->ed_strict_mode = 0xff;
120 dev->ed_strong_signal = 0;
121 dev->ed_time = ktime_get_boottime();
123 mt7603_edcca_set_strict(dev, false);
127 mt7603_set_channel(struct mt7603_dev *dev, struct cfg80211_chan_def *def)
129 u8 *rssi_data = (u8 *)dev->mt76.eeprom.data;
134 cancel_delayed_work_sync(&dev->mac_work);
136 mutex_lock(&dev->mt76.mutex);
137 set_bit(MT76_RESET, &dev->mt76.state);
139 mt76_set_channel(&dev->mt76);
140 mt7603_mac_stop(dev);
142 if (def->width == NL80211_CHAN_WIDTH_40)
145 dev->mt76.chandef = *def;
146 mt76_rmw_field(dev, MT_AGG_BWCR, MT_AGG_BWCR_BW, bw);
147 ret = mt7603_mcu_set_channel(dev);
153 if (def->chan->band == NL80211_BAND_5GHZ) {
155 rssi_data += MT_EE_RSSI_OFFSET_5G;
158 rssi_data += MT_EE_RSSI_OFFSET_2G;
161 memcpy(dev->rssi_offset, rssi_data, sizeof(dev->rssi_offset));
164 mt76_hw(dev)->wiphy->bands[def->chan->band]->channels) << 1;
165 mt76_wr(dev, MT_WF_RMAC_CH_FREQ, idx);
166 mt7603_mac_set_timing(dev);
167 mt7603_mac_start(dev);
169 clear_bit(MT76_RESET, &dev->mt76.state);
171 mt76_txq_schedule_all(&dev->mt76);
173 ieee80211_queue_delayed_work(mt76_hw(dev), &dev->mac_work,
174 MT7603_WATCHDOG_TIME);
176 /* reset channel stats */
177 mt76_clear(dev, MT_MIB_CTL, MT_MIB_CTL_READ_CLR_DIS);
178 mt76_set(dev, MT_MIB_CTL,
179 MT_MIB_CTL_CCA_NAV_TX | MT_MIB_CTL_PSCCA_TIME);
180 mt76_rr(dev, MT_MIB_STAT_PSCCA);
181 mt7603_cca_stats_reset(dev);
183 dev->survey_time = ktime_get_boottime();
185 mt7603_init_edcca(dev);
188 mutex_unlock(&dev->mt76.mutex);
191 mt7603_mac_work(&dev->mac_work.work);
197 mt7603_config(struct ieee80211_hw *hw, u32 changed)
199 struct mt7603_dev *dev = hw->priv;
202 if (changed & (IEEE80211_CONF_CHANGE_CHANNEL |
203 IEEE80211_CONF_CHANGE_POWER))
204 ret = mt7603_set_channel(dev, &hw->conf.chandef);
206 if (changed & IEEE80211_CONF_CHANGE_MONITOR) {
207 mutex_lock(&dev->mt76.mutex);
209 if (!(hw->conf.flags & IEEE80211_CONF_MONITOR))
210 dev->rxfilter |= MT_WF_RFCR_DROP_OTHER_UC;
212 dev->rxfilter &= ~MT_WF_RFCR_DROP_OTHER_UC;
214 mt76_wr(dev, MT_WF_RFCR, dev->rxfilter);
216 mutex_unlock(&dev->mt76.mutex);
223 mt7603_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags,
224 unsigned int *total_flags, u64 multicast)
226 struct mt7603_dev *dev = hw->priv;
229 #define MT76_FILTER(_flag, _hw) do { \
230 flags |= *total_flags & FIF_##_flag; \
231 dev->rxfilter &= ~(_hw); \
232 dev->rxfilter |= !(flags & FIF_##_flag) * (_hw); \
235 dev->rxfilter &= ~(MT_WF_RFCR_DROP_OTHER_BSS |
236 MT_WF_RFCR_DROP_OTHER_BEACON |
237 MT_WF_RFCR_DROP_FRAME_REPORT |
238 MT_WF_RFCR_DROP_PROBEREQ |
239 MT_WF_RFCR_DROP_MCAST_FILTERED |
240 MT_WF_RFCR_DROP_MCAST |
241 MT_WF_RFCR_DROP_BCAST |
242 MT_WF_RFCR_DROP_DUPLICATE |
243 MT_WF_RFCR_DROP_A2_BSSID |
244 MT_WF_RFCR_DROP_UNWANTED_CTL |
245 MT_WF_RFCR_DROP_STBC_MULTI);
247 MT76_FILTER(OTHER_BSS, MT_WF_RFCR_DROP_OTHER_TIM |
248 MT_WF_RFCR_DROP_A3_MAC |
249 MT_WF_RFCR_DROP_A3_BSSID);
251 MT76_FILTER(FCSFAIL, MT_WF_RFCR_DROP_FCSFAIL);
253 MT76_FILTER(CONTROL, MT_WF_RFCR_DROP_CTS |
254 MT_WF_RFCR_DROP_RTS |
255 MT_WF_RFCR_DROP_CTL_RSV |
256 MT_WF_RFCR_DROP_NDPA);
258 *total_flags = flags;
259 mt76_wr(dev, MT_WF_RFCR, dev->rxfilter);
263 mt7603_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
264 struct ieee80211_bss_conf *info, u32 changed)
266 struct mt7603_dev *dev = hw->priv;
267 struct mt7603_vif *mvif = (struct mt7603_vif *)vif->drv_priv;
269 mutex_lock(&dev->mt76.mutex);
271 if (changed & (BSS_CHANGED_ASSOC | BSS_CHANGED_BSSID)) {
272 if (info->assoc || info->ibss_joined) {
273 mt76_wr(dev, MT_BSSID0(mvif->idx),
274 get_unaligned_le32(info->bssid));
275 mt76_wr(dev, MT_BSSID1(mvif->idx),
276 (get_unaligned_le16(info->bssid + 4) |
279 mt76_wr(dev, MT_BSSID0(mvif->idx), 0);
280 mt76_wr(dev, MT_BSSID1(mvif->idx), 0);
284 if (changed & BSS_CHANGED_ERP_SLOT) {
285 int slottime = info->use_short_slot ? 9 : 20;
287 if (slottime != dev->slottime) {
288 dev->slottime = slottime;
289 mt7603_mac_set_timing(dev);
293 if (changed & (BSS_CHANGED_BEACON_ENABLED | BSS_CHANGED_BEACON_INT)) {
294 int beacon_int = !!info->enable_beacon * info->beacon_int;
296 tasklet_disable(&dev->pre_tbtt_tasklet);
297 mt7603_beacon_set_timer(dev, mvif->idx, beacon_int);
298 tasklet_enable(&dev->pre_tbtt_tasklet);
301 mutex_unlock(&dev->mt76.mutex);
305 mt7603_sta_add(struct mt76_dev *mdev, struct ieee80211_vif *vif,
306 struct ieee80211_sta *sta)
308 struct mt7603_dev *dev = container_of(mdev, struct mt7603_dev, mt76);
309 struct mt7603_sta *msta = (struct mt7603_sta *)sta->drv_priv;
310 struct mt7603_vif *mvif = (struct mt7603_vif *)vif->drv_priv;
314 idx = mt76_wcid_alloc(dev->mt76.wcid_mask, MT7603_WTBL_STA - 1);
318 __skb_queue_head_init(&msta->psq);
322 msta->wcid.idx = idx;
323 mt7603_wtbl_init(dev, idx, mvif->idx, sta->addr);
324 mt7603_wtbl_set_ps(dev, msta, false);
326 if (vif->type == NL80211_IFTYPE_AP)
327 set_bit(MT_WCID_FLAG_CHECK_PS, &msta->wcid.flags);
333 mt7603_sta_assoc(struct mt76_dev *mdev, struct ieee80211_vif *vif,
334 struct ieee80211_sta *sta)
336 struct mt7603_dev *dev = container_of(mdev, struct mt7603_dev, mt76);
338 mt7603_wtbl_update_cap(dev, sta);
342 mt7603_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif,
343 struct ieee80211_sta *sta)
345 struct mt7603_dev *dev = container_of(mdev, struct mt7603_dev, mt76);
346 struct mt7603_sta *msta = (struct mt7603_sta *)sta->drv_priv;
347 struct mt76_wcid *wcid = (struct mt76_wcid *)sta->drv_priv;
349 spin_lock_bh(&dev->ps_lock);
350 __skb_queue_purge(&msta->psq);
351 mt7603_filter_tx(dev, wcid->idx, true);
352 spin_unlock_bh(&dev->ps_lock);
354 mt7603_wtbl_clear(dev, wcid->idx);
358 mt7603_ps_tx_list(struct mt7603_dev *dev, struct sk_buff_head *list)
362 while ((skb = __skb_dequeue(list)) != NULL)
363 mt76_tx_queue_skb_raw(dev, skb_get_queue_mapping(skb),
368 mt7603_sta_ps(struct mt76_dev *mdev, struct ieee80211_sta *sta, bool ps)
370 struct mt7603_dev *dev = container_of(mdev, struct mt7603_dev, mt76);
371 struct mt7603_sta *msta = (struct mt7603_sta *)sta->drv_priv;
372 struct sk_buff_head list;
374 mt76_stop_tx_queues(&dev->mt76, sta, false);
375 mt7603_wtbl_set_ps(dev, msta, ps);
379 __skb_queue_head_init(&list);
381 spin_lock_bh(&dev->ps_lock);
382 skb_queue_splice_tail_init(&msta->psq, &list);
383 spin_unlock_bh(&dev->ps_lock);
385 mt7603_ps_tx_list(dev, &list);
389 mt7603_release_buffered_frames(struct ieee80211_hw *hw,
390 struct ieee80211_sta *sta,
391 u16 tids, int nframes,
392 enum ieee80211_frame_release_type reason,
395 struct mt7603_dev *dev = hw->priv;
396 struct mt7603_sta *msta = (struct mt7603_sta *)sta->drv_priv;
397 struct sk_buff_head list;
398 struct sk_buff *skb, *tmp;
400 __skb_queue_head_init(&list);
402 spin_lock_bh(&dev->ps_lock);
403 skb_queue_walk_safe(&msta->psq, skb, tmp) {
407 if (!(tids & BIT(skb->priority)))
410 skb_set_queue_mapping(skb, MT_TXQ_PSD);
411 __skb_unlink(skb, &msta->psq);
412 __skb_queue_tail(&list, skb);
415 spin_unlock_bh(&dev->ps_lock);
417 mt7603_ps_tx_list(dev, &list);
420 mt76_release_buffered_frames(hw, sta, tids, nframes, reason,
425 mt7603_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
426 struct ieee80211_vif *vif, struct ieee80211_sta *sta,
427 struct ieee80211_key_conf *key)
429 struct mt7603_dev *dev = hw->priv;
430 struct mt7603_vif *mvif = (struct mt7603_vif *)vif->drv_priv;
431 struct mt7603_sta *msta = sta ? (struct mt7603_sta *)sta->drv_priv :
433 struct mt76_wcid *wcid = &msta->wcid;
434 int idx = key->keyidx;
436 /* fall back to sw encryption for unsupported ciphers */
437 switch (key->cipher) {
438 case WLAN_CIPHER_SUITE_TKIP:
439 case WLAN_CIPHER_SUITE_CCMP:
446 * The hardware does not support per-STA RX GTK, fall back
447 * to software mode for these.
449 if ((vif->type == NL80211_IFTYPE_ADHOC ||
450 vif->type == NL80211_IFTYPE_MESH_POINT) &&
451 (key->cipher == WLAN_CIPHER_SUITE_TKIP ||
452 key->cipher == WLAN_CIPHER_SUITE_CCMP) &&
453 !(key->flags & IEEE80211_KEY_FLAG_PAIRWISE))
456 if (cmd == SET_KEY) {
457 key->hw_key_idx = wcid->idx;
458 wcid->hw_key_idx = idx;
460 if (idx == wcid->hw_key_idx)
461 wcid->hw_key_idx = -1;
465 mt76_wcid_key_setup(&dev->mt76, wcid, key);
467 return mt7603_wtbl_set_key(dev, wcid->idx, key);
471 mt7603_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u16 queue,
472 const struct ieee80211_tx_queue_params *params)
474 struct mt7603_dev *dev = hw->priv;
475 u16 cw_min = (1 << 5) - 1;
476 u16 cw_max = (1 << 10) - 1;
479 queue = dev->mt76.q_tx[queue].hw_idx;
482 cw_min = params->cw_min;
484 cw_max = params->cw_max;
486 mutex_lock(&dev->mt76.mutex);
487 mt7603_mac_stop(dev);
489 val = mt76_rr(dev, MT_WMM_TXOP(queue));
490 val &= ~(MT_WMM_TXOP_MASK << MT_WMM_TXOP_SHIFT(queue));
491 val |= params->txop << MT_WMM_TXOP_SHIFT(queue);
492 mt76_wr(dev, MT_WMM_TXOP(queue), val);
494 val = mt76_rr(dev, MT_WMM_AIFSN);
495 val &= ~(MT_WMM_AIFSN_MASK << MT_WMM_AIFSN_SHIFT(queue));
496 val |= params->aifs << MT_WMM_AIFSN_SHIFT(queue);
497 mt76_wr(dev, MT_WMM_AIFSN, val);
499 val = mt76_rr(dev, MT_WMM_CWMIN);
500 val &= ~(MT_WMM_CWMIN_MASK << MT_WMM_CWMIN_SHIFT(queue));
501 val |= cw_min << MT_WMM_CWMIN_SHIFT(queue);
502 mt76_wr(dev, MT_WMM_CWMIN, val);
504 val = mt76_rr(dev, MT_WMM_CWMAX(queue));
505 val &= ~(MT_WMM_CWMAX_MASK << MT_WMM_CWMAX_SHIFT(queue));
506 val |= cw_max << MT_WMM_CWMAX_SHIFT(queue);
507 mt76_wr(dev, MT_WMM_CWMAX(queue), val);
509 mt7603_mac_start(dev);
510 mutex_unlock(&dev->mt76.mutex);
516 mt7603_sw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
519 struct mt7603_dev *dev = hw->priv;
521 set_bit(MT76_SCANNING, &dev->mt76.state);
522 mt7603_beacon_set_timer(dev, -1, 0);
526 mt7603_sw_scan_complete(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
528 struct mt7603_dev *dev = hw->priv;
530 clear_bit(MT76_SCANNING, &dev->mt76.state);
531 mt7603_beacon_set_timer(dev, -1, dev->beacon_int);
535 mt7603_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
536 u32 queues, bool drop)
541 mt7603_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
542 struct ieee80211_ampdu_params *params)
544 enum ieee80211_ampdu_mlme_action action = params->action;
545 struct mt7603_dev *dev = hw->priv;
546 struct ieee80211_sta *sta = params->sta;
547 struct ieee80211_txq *txq = sta->txq[params->tid];
548 struct mt7603_sta *msta = (struct mt7603_sta *)sta->drv_priv;
549 u16 tid = params->tid;
550 u16 *ssn = ¶ms->ssn;
551 u8 ba_size = params->buf_size;
552 struct mt76_txq *mtxq;
557 mtxq = (struct mt76_txq *)txq->drv_priv;
560 case IEEE80211_AMPDU_RX_START:
561 mt76_rx_aggr_start(&dev->mt76, &msta->wcid, tid, *ssn,
563 mt7603_mac_rx_ba_reset(dev, sta->addr, tid);
565 case IEEE80211_AMPDU_RX_STOP:
566 mt76_rx_aggr_stop(&dev->mt76, &msta->wcid, tid);
568 case IEEE80211_AMPDU_TX_OPERATIONAL:
570 mtxq->send_bar = false;
571 mt7603_mac_tx_ba_reset(dev, msta->wcid.idx, tid, *ssn, ba_size);
573 case IEEE80211_AMPDU_TX_STOP_FLUSH:
574 case IEEE80211_AMPDU_TX_STOP_FLUSH_CONT:
576 ieee80211_send_bar(vif, sta->addr, tid, mtxq->agg_ssn);
577 mt7603_mac_tx_ba_reset(dev, msta->wcid.idx, tid, *ssn, -1);
579 case IEEE80211_AMPDU_TX_START:
580 mtxq->agg_ssn = *ssn << 4;
581 ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid);
583 case IEEE80211_AMPDU_TX_STOP_CONT:
585 mt7603_mac_tx_ba_reset(dev, msta->wcid.idx, tid, *ssn, -1);
586 ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid);
594 mt7603_sta_rate_tbl_update(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
595 struct ieee80211_sta *sta)
597 struct mt7603_dev *dev = hw->priv;
598 struct mt7603_sta *msta = (struct mt7603_sta *)sta->drv_priv;
599 struct ieee80211_sta_rates *sta_rates = rcu_dereference(sta->rates);
602 spin_lock_bh(&dev->mt76.lock);
603 for (i = 0; i < ARRAY_SIZE(msta->rates); i++) {
604 msta->rates[i].idx = sta_rates->rate[i].idx;
605 msta->rates[i].count = sta_rates->rate[i].count;
606 msta->rates[i].flags = sta_rates->rate[i].flags;
608 if (msta->rates[i].idx < 0 || !msta->rates[i].count)
612 mt7603_wtbl_set_rates(dev, msta, NULL, msta->rates);
613 msta->rate_probe = false;
614 mt7603_wtbl_set_smps(dev, msta,
615 sta->smps_mode == IEEE80211_SMPS_DYNAMIC);
616 spin_unlock_bh(&dev->mt76.lock);
620 mt7603_set_coverage_class(struct ieee80211_hw *hw, s16 coverage_class)
622 struct mt7603_dev *dev = hw->priv;
624 dev->coverage_class = coverage_class;
625 mt7603_mac_set_timing(dev);
628 static void mt7603_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control,
631 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
632 struct ieee80211_vif *vif = info->control.vif;
633 struct mt7603_dev *dev = hw->priv;
634 struct mt76_wcid *wcid = &dev->global_sta.wcid;
637 struct mt7603_sta *msta;
639 msta = (struct mt7603_sta *)control->sta->drv_priv;
642 struct mt7603_vif *mvif;
644 mvif = (struct mt7603_vif *)vif->drv_priv;
645 wcid = &mvif->sta.wcid;
648 mt76_tx(&dev->mt76, control->sta, wcid, skb);
652 mt7603_set_tim(struct ieee80211_hw *hw, struct ieee80211_sta *sta, bool set)
657 const struct ieee80211_ops mt7603_ops = {
659 .start = mt7603_start,
661 .add_interface = mt7603_add_interface,
662 .remove_interface = mt7603_remove_interface,
663 .config = mt7603_config,
664 .configure_filter = mt7603_configure_filter,
665 .bss_info_changed = mt7603_bss_info_changed,
666 .sta_state = mt76_sta_state,
667 .set_key = mt7603_set_key,
668 .conf_tx = mt7603_conf_tx,
669 .sw_scan_start = mt7603_sw_scan,
670 .sw_scan_complete = mt7603_sw_scan_complete,
671 .flush = mt7603_flush,
672 .ampdu_action = mt7603_ampdu_action,
673 .get_txpower = mt76_get_txpower,
674 .wake_tx_queue = mt76_wake_tx_queue,
675 .sta_rate_tbl_update = mt7603_sta_rate_tbl_update,
676 .release_buffered_frames = mt7603_release_buffered_frames,
677 .set_coverage_class = mt7603_set_coverage_class,
678 .set_tim = mt7603_set_tim,
679 .get_survey = mt76_get_survey,
682 MODULE_LICENSE("Dual BSD/GPL");
684 static int __init mt7603_init(void)
688 ret = platform_driver_register(&mt76_wmac_driver);
693 ret = pci_register_driver(&mt7603_pci_driver);
695 platform_driver_unregister(&mt76_wmac_driver);
700 static void __exit mt7603_exit(void)
703 pci_unregister_driver(&mt7603_pci_driver);
705 platform_driver_unregister(&mt76_wmac_driver);
708 module_init(mt7603_init);
709 module_exit(mt7603_exit);