mt76: introduce struct mt76_phy
[linux-2.6-microblaze.git] / drivers / net / wireless / mediatek / mt76 / mac80211.c
index 73853b4..14e5e1a 100644 (file)
@@ -274,6 +274,7 @@ mt76_alloc_device(struct device *pdev, unsigned int size,
                  const struct mt76_driver_ops *drv_ops)
 {
        struct ieee80211_hw *hw;
+       struct mt76_phy *phy;
        struct mt76_dev *dev;
        int i;
 
@@ -286,6 +287,10 @@ mt76_alloc_device(struct device *pdev, unsigned int size,
        dev->dev = pdev;
        dev->drv = drv_ops;
 
+       phy = &dev->phy;
+       phy->dev = dev;
+       phy->hw = hw;
+
        spin_lock_init(&dev->rx_lock);
        spin_lock_init(&dev->lock);
        spin_lock_init(&dev->cc_lock);