]> err.no Git - linux-2.6/blobdiff - drivers/net/wireless/prism54/islpci_dev.c
Merge branches 'at91', 'dyntick', 'ep93xx', 'iop', 'ixp', 'misc', 'orion', 'omap...
[linux-2.6] / drivers / net / wireless / prism54 / islpci_dev.c
index eb7c1c6bcd8a7564b1216a399b356b054f24babb..9196825ed1b52539d92aad7bfa7de1db7c88529d 100644 (file)
@@ -387,7 +387,16 @@ islpci_open(struct net_device *ndev)
        }
 
        netif_start_queue(ndev);
-/*      netif_mark_up( ndev ); */
+
+       /* Turn off carrier if in STA or Ad-hoc mode. It will be turned on
+        * once the firmware receives a trap of being associated
+        * (GEN_OID_LINKSTATE). In other modes (AP or WDS or monitor) we
+        * should just leave the carrier on as its expected the firmware
+        * won't send us a trigger. */
+       if (priv->iw_mode == IW_MODE_INFRA || priv->iw_mode == IW_MODE_ADHOC)
+               netif_carrier_off(ndev);
+       else
+               netif_carrier_on(ndev);
 
        return 0;
 }