Skip to content

Commit

Permalink
prism54: set carrier flags correctly
Browse files Browse the repository at this point in the history
> 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>
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Apr 8, 2008
1 parent 8fe2b65 commit 7b463ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion drivers/net/wireless/prism54/isl_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2081,6 +2081,7 @@ link_changed(struct net_device *ndev, u32 bitrate)
islpci_private *priv = netdev_priv(ndev);

if (bitrate) {
netif_carrier_on(ndev);
if (priv->iw_mode == IW_MODE_INFRA) {
union iwreq_data uwrq;
prism54_get_wap(ndev, NULL, (struct sockaddr *) &uwrq,
Expand All @@ -2089,8 +2090,10 @@ link_changed(struct net_device *ndev, u32 bitrate)
} else
send_simple_event(netdev_priv(ndev),
"Link established");
} else
} else {
netif_carrier_off(ndev);
send_simple_event(netdev_priv(ndev), "Link lost");
}
}

/* Beacon/ProbeResp payload header */
Expand Down
4 changes: 3 additions & 1 deletion drivers/net/wireless/prism54/islpci_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,9 @@ islpci_open(struct net_device *ndev)
}

netif_start_queue(ndev);
/* netif_mark_up( ndev ); */

/* Turn off carrier unless we know we have associated */
netif_carrier_off(ndev);

return 0;
}
Expand Down

0 comments on commit 7b463ce

Please sign in to comment.