mt76: introduce struct mt76_phy

This is preparation for supporting multiple wiphys per device to support the
concurrent dual-band feature of MT7615D

On the first wiphy, hw->priv will point to struct mt76_dev, which contains a
struct mt76_phy at the start. For the secondary wiphy, hw->priv will point
to a mt76_phy encapsulated in a driver specific struct

To simplify access to struct mt76_phy members from drivers, the driver specific
device struct is changed to add a union of struct mt76_dev and struct mt76_phy
as the first element

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2019-11-20 12:54:17 +01:00
parent af83ee8de9
commit 6493e234b4
5 changed files with 26 additions and 4 deletions
+4 -1
View File
@@ -98,7 +98,10 @@ enum mt7603_reset_cause {
};
struct mt7603_dev {
struct mt76_dev mt76; /* must be first */
union { /* must be first */
struct mt76_dev mt76;
struct mt76_phy mphy;
};
const struct mt76_bus_ops *bus_ops;