On Wed, 15 Mar 2006 18:47:40 +0100, Jiri Benc wrote:
> On Wed, 15 Mar 2006 09:40:52 -0800, Jouni Malinen wrote:
> > This breaks bcm43xx-d80211 build. Do you happen to have a patch to fix
> > it?
> 
> Yes, I do. Sorry for not posting it.
> 
> This is a first part; it's just ugly and quick (but working) fix.

And this is a second part of the fix - it enables hard monitor mode.

Index: dscape/drivers/net/wireless/bcm43xx-d80211/bcm43xx_main.c
===================================================================
--- dscape.orig/drivers/net/wireless/bcm43xx-d80211/bcm43xx_main.c      
2006-03-15 17:29:08.000000000 +0100
+++ dscape/drivers/net/wireless/bcm43xx-d80211/bcm43xx_main.c   2006-03-15 
17:29:17.000000000 +0100
@@ -4582,15 +4582,20 @@ static int bcm43xx_add_interface(struct 
 
        if (bcm->interfaces > 0)
                return -ENOBUFS;
-       if (memcmp(bcm->net_dev->dev_addr, conf->mac_addr, ETH_ALEN) != 0)
-               return -EADDRNOTAVAIL;
-       if (conf->type == IEEE80211_SUB_IF_TYPE_STA)
-               bcm->iw_mode = IW_MODE_INFRA;
-       else if (conf->type == IEEE80211_SUB_IF_TYPE_IBSS)
-               bcm->iw_mode = IW_MODE_ADHOC;
-       else
-               return -EOPNOTSUPP;
+       if (conf->type == IEEE80211_SUB_IF_TYPE_MNTR) {
+               bcm->iw_mode = IW_MODE_MONITOR;
+       } else {
+               if (memcmp(bcm->net_dev->dev_addr, conf->mac_addr, ETH_ALEN) != 
0)
+                       return -EADDRNOTAVAIL;
+               if (conf->type == IEEE80211_SUB_IF_TYPE_STA)
+                       bcm->iw_mode = IW_MODE_INFRA;
+               else if (conf->type == IEEE80211_SUB_IF_TYPE_IBSS)
+                       bcm->iw_mode = IW_MODE_ADHOC;
+               else
+                       return -EOPNOTSUPP;
+       }
        bcm->interfaces++;
+       bcm43xx_set_iwmode(bcm, bcm->iw_mode);
        return 0;
 }
 


-- 
Jiri Benc
SUSE Labs
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to