From de3fb8a58e393589c7d6a6aab0aab783104ca246 Mon Sep 17 00:00:00 2001 From: mentor Date: Wed, 14 Nov 2007 20:47:56 +0000 Subject: [PATCH] Always set the correct network device type git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2850 0192ed92-7a03-0410-a25b-9323aeb14dbd --- ath/if_ath.c | 7 ++++--- ath/if_ath_pci.c | 4 ---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/ath/if_ath.c b/ath/if_ath.c index 288966a..633006a 100644 --- a/ath/if_ath.c +++ b/ath/if_ath.c @@ -707,6 +707,8 @@ ath_attach(u_int16_t devid, struct net_device *dev, HAL_BUS_TAG tag) dev->hard_header_len += ATH_FF_MAX_HDR; #endif #endif + dev->type = ARPHRD_IEEE80211 + ic->ic_dev = dev; ic->ic_mgtstart = ath_mgtstart; ic->ic_init = ath_init; @@ -1126,10 +1128,9 @@ ath_vap_create(struct ieee80211com *ic, const char *name, if (sc->sc_rc->ops->dynamic_proc_register) sc->sc_rc->ops->dynamic_proc_register(vap); - /* - * Change the interface type for monitor mode. - */ + dev->type = ARPHRD_IEEE80211; if (opmode == IEEE80211_M_MONITOR) + /* Use RadioTAP interface type for monitor mode. */ dev->type = ARPHRD_IEEE80211_RADIOTAP; if ((flags & IEEE80211_CLONE_BSSID) && diff --git a/ath/if_ath_pci.c b/ath/if_ath_pci.c index 45a833c..9c704bc 100644 --- a/ath/if_ath_pci.c +++ b/ath/if_ath_pci.c @@ -197,10 +197,6 @@ ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) sc->aps_sc.sc_invalid = 1; dev->irq = pdev->irq; - /* - * Don't leave arp type as ARPHRD_ETHER as this is no eth device - */ - dev->type = ARPHRD_IEEE80211; SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, &pdev->dev); -- 2.35.1