b3bb30067ac73cf3b9cf58592c96ae41cc6de98d
[openwrt.git] / package / madwifi / patches / 434-name-alloc-fix.patch
1 diff -ur madwifi-trunk-r3314/ath/if_ath_ahb.c madwifi-trunk-r3314.patched/ath/if_ath_ahb.c
2 --- madwifi-trunk-r3314/ath/if_ath_ahb.c        2009-05-17 22:16:05.000000000 +0300
3 +++ madwifi-trunk-r3314.patched/ath/if_ath_ahb.c        2009-05-17 22:15:47.000000000 +0300
4 @@ -376,6 +376,11 @@
5         SET_MODULE_OWNER(dev);
6         sclist[wlanNum] = sc;
7  
8 +       if (dev_alloc_name(dev, dev->name) < 0) {
9 +               printk(KERN_ERR "%s: cannot allocate name\n", dev_info);
10 +               goto bad3;
11 +       }
12 +
13         switch (wlanNum) {
14         case AR531X_WLAN0_NUM:
15                 if (((devid & AR5315_REV_MAJ_M) == AR5315_REV_MAJ) ||
16 diff -ur madwifi-trunk-r3314/ath/if_ath_pci.c madwifi-trunk-r3314.patched/ath/if_ath_pci.c
17 --- madwifi-trunk-r3314/ath/if_ath_pci.c        2009-05-17 22:16:05.000000000 +0300
18 +++ madwifi-trunk-r3314.patched/ath/if_ath_pci.c        2009-05-17 22:15:47.000000000 +0300
19 @@ -209,6 +209,11 @@
20          */
21         sc->aps_sc.sc_invalid = 1;
22  
23 +       if (dev_alloc_name(dev, dev->name) < 0) {
24 +               printk(KERN_ERR "%s: cannot allocate name\n", dev_info);
25 +               goto bad3;
26 +       }
27 +
28         dev->irq = pdev->irq;
29  
30         SET_MODULE_OWNER(dev);