]> err.no Git - linux-2.6/commitdiff
wireless: Create 'device' symlink in sysfs
authorMasakazu Mokuno <mokuno@sm.sony.co.jp>
Wed, 14 May 2008 05:16:50 +0000 (14:16 +0900)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 16 May 2008 21:15:10 +0000 (17:15 -0400)
Some network interfaces of the wireless drivers lack the 'device'
symlink in sysfs.
This patch lets the drivers create the links.

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/airo.c
drivers/net/wireless/ipw2200.c
drivers/net/wireless/libertas/main.c

index efb7444a26ae6c42c03fb59ddabdc7bc2f410d9c..4e1c690ff45f104c4faf60c0162e6cac7ef7f02d 100644 (file)
@@ -2668,6 +2668,7 @@ static struct net_device *init_wifidev(struct airo_info *ai,
        dev->irq = ethdev->irq;
        dev->base_addr = ethdev->base_addr;
        dev->wireless_data = ethdev->wireless_data;
+       SET_NETDEV_DEV(dev, ethdev->dev.parent);
        memcpy(dev->dev_addr, ethdev->dev_addr, dev->addr_len);
        err = register_netdev(dev);
        if (err<0) {
index fa87c5c2ae0bf9d8fe1937965dc09750387f52ba..d74c061994ae02a37c73a97fc7f8d79b665b343f 100644 (file)
@@ -11584,6 +11584,7 @@ static int ipw_prom_alloc(struct ipw_priv *priv)
        priv->prom_net_dev->hard_start_xmit = ipw_prom_hard_start_xmit;
 
        priv->prom_priv->ieee->iw_mode = IW_MODE_MONITOR;
+       SET_NETDEV_DEV(priv->prom_net_dev, &priv->pci_dev->dev);
 
        rc = register_netdev(priv->prom_net_dev);
        if (rc) {
index bb08f0b86c6b00d46c4fddc573e9622f200ea88e..e1f0660685909a4f9de635d355050617c9c1e0a1 100644 (file)
@@ -1565,6 +1565,7 @@ static int lbs_add_rtap(struct lbs_private *priv)
        rtap_dev->hard_start_xmit = lbs_rtap_hard_start_xmit;
        rtap_dev->set_multicast_list = lbs_set_multicast_list;
        rtap_dev->priv = priv;
+       SET_NETDEV_DEV(rtap_dev, priv->dev->dev.parent);
 
        ret = register_netdev(rtap_dev);
        if (ret) {