[Madwifi-devel] RE: Why does ath0 need to be UP to associate with an AP?
Status: Beta
Brought to you by:
otaku
From: Stephane L. <ste...@co...> - 2003-08-26 13:54:37
|
This little patch below should cause a disassociate when the interface is put down. As an added bonus, the ath_pci module now detaches properly when it is removed (it used to hang the system before). Stephane --- driver/if_ath.c Fri Aug 22 10:17:24 2003 +++ driver-new/if_ath.c Fri Aug 22 12:13:54 2003 @@ -231,6 +231,7 @@ ether_setup(dev); dev->open = ath_init; + dev->stop = ath_stop; dev->hard_start_xmit = ath_hardstart; dev->tx_timeout = ath_tx_timeout; dev->watchdog_timeo = 5 * HZ; /* XXX */ > From: William S. Kish <wskish@ya...> > I guess this depends on one's interpretation of what it means for a network > interface to be 'UP'. I think a purist might argue than an interface > shouldn't be doing anything until it is 'UP'. > > One advantage of only associating in the 'UP' state is that it allows user > control over the association -- for example 'ifconfig ath0 down && ifconfig > ath0 up' can be used to force a reassociation. Aside from consistent > behavior with other wireless drivers, are there other benefits from having > an interface associate before it is up? > > (My example actually exposes an apparent inconsistency in the current code: > 'ifconfig down' doesn't seem to force a disassociation; only when followed > by 'ifconfig up' does it cause a reassocation. Still useful but not quite > the semantics I would expect.) > > -Bill > |