Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Luis R. Rodriguez and committed by
John W. Linville
7b463ced 8fe2b65a

+7 -2
+4 -1
drivers/net/wireless/prism54/isl_ioctl.c
··· 2081 2081 islpci_private *priv = netdev_priv(ndev); 2082 2082 2083 2083 if (bitrate) { 2084 + netif_carrier_on(ndev); 2084 2085 if (priv->iw_mode == IW_MODE_INFRA) { 2085 2086 union iwreq_data uwrq; 2086 2087 prism54_get_wap(ndev, NULL, (struct sockaddr *) &uwrq, ··· 2090 2089 } else 2091 2090 send_simple_event(netdev_priv(ndev), 2092 2091 "Link established"); 2093 - } else 2092 + } else { 2093 + netif_carrier_off(ndev); 2094 2094 send_simple_event(netdev_priv(ndev), "Link lost"); 2095 + } 2095 2096 } 2096 2097 2097 2098 /* Beacon/ProbeResp payload header */
+3 -1
drivers/net/wireless/prism54/islpci_dev.c
··· 387 387 } 388 388 389 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 394 return 0; 393 395 }