Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 54bc1ff1 authored by Paul Stewart's avatar Paul Stewart Committed by Greg Kroah-Hartman
Browse files

staging: gdm72xx: Set up parent link in sysfs for gdm72xx devices



This patch uses SET_NETDEV_DEV to set up a 'device' parent link in sysfs
(e.g. /sys/class/net/wm0/device) for a gdm72xx device.

Signed-off-by: default avatarPaul Stewart <pstew@chromium.org>
Signed-off-by: default avatarBen Chan <benchan@chromium.org>
Cc: Sage Ahn <syahn@gctsemi.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3080b838
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -618,7 +618,7 @@ static void gdm_sdio_irq(struct sdio_func *func)
done:
	sdio_writeb(func, 0x00, 0x10, &ret);	/* PCRRT */
	if (!phy_dev->netdev)
		register_wimax_device(phy_dev);
		register_wimax_device(phy_dev, &func->dev);
}

static int gdm_sdio_receive(void *priv_dev,
+1 −1
Original line number Diff line number Diff line
@@ -624,7 +624,7 @@ static int gdm_usb_probe(struct usb_interface *intf,
	INIT_WORK(&udev->pm_ws, do_pm_control);
#endif /* CONFIG_WIMAX_GDM72XX_USB_PM */

	ret = register_wimax_device(phy_dev);
	ret = register_wimax_device(phy_dev, &intf->dev);

out:
	if (ret) {
+2 −1
Original line number Diff line number Diff line
@@ -943,7 +943,7 @@ static struct net_device_ops gdm_netdev_ops = {
	.ndo_do_ioctl			= gdm_wimax_ioctl,
};

int register_wimax_device(struct phy_dev *phy_dev)
int register_wimax_device(struct phy_dev *phy_dev, struct device *pdev)
{
	struct nic *nic = NULL;
	struct net_device *dev;
@@ -957,6 +957,7 @@ int register_wimax_device(struct phy_dev *phy_dev)
		return -ENOMEM;
	}

	SET_NETDEV_DEV(dev, pdev);
	dev->mtu = 1400;
	dev->netdev_ops = &gdm_netdev_ops;
	dev->flags &= ~IFF_MULTICAST;
+1 −1
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@ struct nic {

/*#define LOOPBACK_TEST */

extern int register_wimax_device(struct phy_dev *phy_dev);
extern int register_wimax_device(struct phy_dev *phy_dev, struct device *pdev);
extern int gdm_wimax_send_tx(struct sk_buff *skb, struct net_device *dev);
extern void unregister_wimax_device(struct phy_dev *phy_dev);