diff options
author | Luis R. Rodriguez <mcgrof@gmail.com> | 2008-04-01 15:17:36 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-04-08 15:05:57 -0400 |
commit | 7b463ced635231dd1d4ca6d8b1d93f9353b9dc3a (patch) | |
tree | 04d46966ee9fcb79943a1735da2521546e6de1e4 | |
parent | 8fe2b65a18e49bfde56a59ed4ab3fc7aa0c2f325 (diff) |
prism54: set carrier flags correctly
> prism54 should set the carrier flags correctly when it thinks the
> link can be used.
Agreed, so sure, this is OK but I rather we turn the carrier on
or off *before* sending an event, like this.
Signed-off-by: Roy Marples <uberlord@gentoo.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/prism54/isl_ioctl.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/prism54/islpci_dev.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c index 2e25e190f334..e5b3c282009c 100644 --- a/drivers/net/wireless/prism54/isl_ioctl.c +++ b/drivers/net/wireless/prism54/isl_ioctl.c | |||
@@ -2081,6 +2081,7 @@ link_changed(struct net_device *ndev, u32 bitrate) | |||
2081 | islpci_private *priv = netdev_priv(ndev); | 2081 | islpci_private *priv = netdev_priv(ndev); |
2082 | 2082 | ||
2083 | if (bitrate) { | 2083 | if (bitrate) { |
2084 | netif_carrier_on(ndev); | ||
2084 | if (priv->iw_mode == IW_MODE_INFRA) { | 2085 | if (priv->iw_mode == IW_MODE_INFRA) { |
2085 | union iwreq_data uwrq; | 2086 | union iwreq_data uwrq; |
2086 | prism54_get_wap(ndev, NULL, (struct sockaddr *) &uwrq, | 2087 | prism54_get_wap(ndev, NULL, (struct sockaddr *) &uwrq, |
@@ -2089,8 +2090,10 @@ link_changed(struct net_device *ndev, u32 bitrate) | |||
2089 | } else | 2090 | } else |
2090 | send_simple_event(netdev_priv(ndev), | 2091 | send_simple_event(netdev_priv(ndev), |
2091 | "Link established"); | 2092 | "Link established"); |
2092 | } else | 2093 | } else { |
2094 | netif_carrier_off(ndev); | ||
2093 | send_simple_event(netdev_priv(ndev), "Link lost"); | 2095 | send_simple_event(netdev_priv(ndev), "Link lost"); |
2096 | } | ||
2094 | } | 2097 | } |
2095 | 2098 | ||
2096 | /* Beacon/ProbeResp payload header */ | 2099 | /* Beacon/ProbeResp payload header */ |
diff --git a/drivers/net/wireless/prism54/islpci_dev.c b/drivers/net/wireless/prism54/islpci_dev.c index eb7c1c6bcd8a..04c2638d75ad 100644 --- a/drivers/net/wireless/prism54/islpci_dev.c +++ b/drivers/net/wireless/prism54/islpci_dev.c | |||
@@ -387,7 +387,9 @@ islpci_open(struct net_device *ndev) | |||
387 | } | 387 | } |
388 | 388 | ||
389 | netif_start_queue(ndev); | 389 | netif_start_queue(ndev); |
390 | /* netif_mark_up( ndev ); */ | 390 | |
391 | /* Turn off carrier unless we know we have associated */ | ||
392 | netif_carrier_off(ndev); | ||
391 | 393 | ||
392 | return 0; | 394 | return 0; |
393 | } | 395 | } |