Hi, i think, it's not the best way to use a sysctl to set the channel, because you can not control which packets are sent on which channel, since you have several queues. Example: you have packet a and b , you want to sent packet a on channel 1 and b on 2. How do you want to control that the new channel is set between these two packets ? Of course, you can delay packet b until the new channel is set, but that has no good performance. I think it better to set the channel using an annotation on the packet. You can extend the ath-header (use AthdescEncap) with an extra field for the channel, which should used for the packet. In the madwifi-driver (e.g. in ieee80211_output.c), you check for the encap-type, the field in the header and the channel and switch to the new channel ( struct ieee80211com includes pointer to the channel-switch-function: ic_set_channel). The problem here is, that you have to sent a packet to switch the channel, but therefor it is precise. To switch the channel without transmitting a packet, you can generate a packet which just initiates the changing the channel, but which is discard by the driver afterwards. According to the channel you can mark such kind of packets using an extention to the ath-header. I use this solution and it works well.
Regards, Robert >Hi, > >Can someone please advise me how to write something in /proc/sys in a click >event? I need to change the channel in MadWifi upon reception of a control >packet. I am planning on writing a sysctl handler in madwifi to change the >channel upon request, and I need to trigger it using Click. If someone has a >better suggestion to do this - I'll be glad to know! > >Thanks for your help and time. > >Ashish _______________________________________________ click mailing list [email protected] https://amsterdam.lcs.mit.edu/mailman/listinfo/click
