On Thu, 20 May 1999, Sugat Jain wrote:
> My problem right now is an implementation one: When a received packet is to
> be handed over to the linux part for processing by higher layers, when a
Yes, this is the problem to which I knew no satisfactory answer. What is
needed is a "bottom half" for RT interrupt. So, when your RT-ISR sees a
normal packet to be passed through netif_rx it can set some flag and exit.
I think that the following hack could do the job (please tell me if it
works) (warning: highly schematic):
init_module() {
...
allocate memory for RT buffers;
request_RTirq(WAVELAN_IRQ, wavelan_rt_isr);
request_irq(WAVELAN_IRQ, wavelan_soft_isr,0,"wavelan_soft",NULL);
register periodic RT task sending packets;
...
}
wavelan_rt_isr(...) {
check the cause if the interrupt;
get the data out to static buffer;
if(special_RT_packet) {
handle_RT_packet; /*this can send the reply in real time*/
make the card happy;
return; /* or may be continue to let the kernel see that ?*/
}
save status in dev->priv->isr_status;
SFREQ |= MASK(WAVELAN_IRQ); /* analog of "mark_bh" */
return;
}
wavelan_soft_isr(...) {
check dev->priv->isr_status;
allocate skb;
copy data from static buffer to skb;
netif_rx(skb);
return;
}
I would be grateful for any comments from RTL gurus whether it is going to
work? Is it possible to use "logical" IRQ from 16 to 31 in request_irq?
> packet to be sent has to be transferred to the RT part is there any clean way
> to access the Fifos from kernel space.
Sending is not a problem: if you send from normal kernel priority it is not
RT any more - you may just use s_cli to be sure it does not get delayed any
more - but then you block timer and all the other interupts - you just need
to decide what has priority in any given situation. If you send from RT
task (e.g. your RT periodic task) just call your transmit routine. Of course
wavelan_rt_isr should understand transmit interrupts as well and take
appropiate actions (set dev->priv->isr_status and wake wavelan_soft_isr to
handle the rest?).
> I am using the Lucent Wavelan/PCMCIA 2.4ghz comm. adaptor.
wavelan_cs.c driver ?
Regards,
--
Tomasz Motylewski
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/