sysprog21 / vwifi

A virtual wireless device driver for Linux
MIT License
205 stars 39 forks source link

Simulate an interrupt on transmission finished or reception #22

Closed rickywu0421 closed 2 years ago

rickywu0421 commented 2 years ago

A real driver would handle an interrupt when tx finished and rx. I think we could simulate an interrupt by writing an interrupt handler, which will be called at the end of owl_ndo_start_xmit.

I have two ideas about how to write the interrupt handler:

  1. implement single interrupt handler, which will handle the tx finished and rx. The handler can identify whether it is called on tx finished or rx by passing a flag to this handler as an parameter.
  2. implement two interrupt handler. One for tx finished, one for rx.

I'm not sure which one is a better way to implement an interrupt handler.