提交 7b463ced 编写于 作者: L Luis R. Rodriguez 提交者: John W. Linville

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: NRoy Marples <uberlord@gentoo.org>
Signed-off-by: NLuis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 8fe2b65a
...@@ -2081,6 +2081,7 @@ link_changed(struct net_device *ndev, u32 bitrate) ...@@ -2081,6 +2081,7 @@ link_changed(struct net_device *ndev, u32 bitrate)
islpci_private *priv = netdev_priv(ndev); islpci_private *priv = netdev_priv(ndev);
if (bitrate) { if (bitrate) {
netif_carrier_on(ndev);
if (priv->iw_mode == IW_MODE_INFRA) { if (priv->iw_mode == IW_MODE_INFRA) {
union iwreq_data uwrq; union iwreq_data uwrq;
prism54_get_wap(ndev, NULL, (struct sockaddr *) &uwrq, prism54_get_wap(ndev, NULL, (struct sockaddr *) &uwrq,
...@@ -2089,8 +2090,10 @@ link_changed(struct net_device *ndev, u32 bitrate) ...@@ -2089,8 +2090,10 @@ link_changed(struct net_device *ndev, u32 bitrate)
} else } else
send_simple_event(netdev_priv(ndev), send_simple_event(netdev_priv(ndev),
"Link established"); "Link established");
} else } else {
netif_carrier_off(ndev);
send_simple_event(netdev_priv(ndev), "Link lost"); send_simple_event(netdev_priv(ndev), "Link lost");
}
} }
/* Beacon/ProbeResp payload header */ /* Beacon/ProbeResp payload header */
......
...@@ -387,7 +387,9 @@ islpci_open(struct net_device *ndev) ...@@ -387,7 +387,9 @@ islpci_open(struct net_device *ndev)
} }
netif_start_queue(ndev); netif_start_queue(ndev);
/* netif_mark_up( ndev ); */
/* Turn off carrier unless we know we have associated */
netif_carrier_off(ndev);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册