Always set the correct network device type
authormentor <mentor@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Wed, 14 Nov 2007 20:47:56 +0000 (20:47 +0000)
committermentor <mentor@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Wed, 14 Nov 2007 20:47:56 +0000 (20:47 +0000)
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2850 0192ed92-7a03-0410-a25b-9323aeb14dbd

ath/if_ath.c
ath/if_ath_pci.c

index 288966a4b8afbc5dd4d18bd953dfff141316bd10..633006ae72365c15391927e315eb330e126a0409 100644 (file)
@@ -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) &&
index 45a833ce04e934de276a4dbf5d8dfa18c5cb7ca1..9c704bcfc07211dc2d04cca88877b5c1710a948e 100644 (file)
@@ -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);