[Madwifi-cvs] revision 4171 committed
Status: Beta
Brought to you by:
otaku
From: Pavel R. <svn...@ma...> - 2011-10-07 21:32:05
|
Project : madwifi Revision : 4171 Author : proski (Pavel Roskin) Date : 2011-10-07 23:31:51 +0200 (Fri, 07 Oct 2011) Log Message : Eliminate ATH_GET_NETDEV_DEV, it breaks on some CentOS kernels Instead, use sc->sc_bdev to find the physical device. sc->sc_bdev is NULL on AHB and we don't use SET_NETDEV_DEV on AHB anyway, so do it on PCI only. Affected Files: * madwifi/branches/madwifi-0.9.4/ath/if_ath.c updated * madwifi/branches/madwifi-0.9.4/ath/if_athvar.h updated Modified: madwifi/branches/madwifi-0.9.4/ath/if_ath.c =================================================================== --- madwifi/branches/madwifi-0.9.4/ath/if_ath.c 2011-10-07 21:30:59 UTC (rev 4170) +++ madwifi/branches/madwifi-0.9.4/ath/if_ath.c 2011-10-07 21:31:51 UTC (rev 4171) @@ -1207,7 +1207,9 @@ } if (sc->sc_hastsfadd) ath_hal_settsfadjust(sc->sc_ah, sc->sc_stagbeacons); - SET_NETDEV_DEV(dev, ATH_GET_NETDEV_DEV(mdev)); +#ifdef ATH_PCI + SET_NETDEV_DEV(dev, &((struct pci_dev *)sc->sc_bdev)->dev); +#endif /* complete setup */ (void) ieee80211_vap_attach(vap, ieee80211_media_change, ieee80211_media_status); Modified: madwifi/branches/madwifi-0.9.4/ath/if_athvar.h =================================================================== --- madwifi/branches/madwifi-0.9.4/ath/if_athvar.h 2011-10-07 21:30:59 UTC (rev 4170) +++ madwifi/branches/madwifi-0.9.4/ath/if_athvar.h 2011-10-07 21:31:51 UTC (rev 4171) @@ -116,12 +116,6 @@ #define SET_NETDEV_DEV(ndev, pdev) #endif -#ifdef to_net_dev -#define ATH_GET_NETDEV_DEV(ndev) ((ndev)->dev.parent) -#else -#define ATH_GET_NETDEV_DEV(ndev) ((ndev)->class_dev.dev) -#endif - #ifndef NETDEV_TX_OK #define NETDEV_TX_OK 0 #define NETDEV_TX_BUSY 1 |