Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I make the "interrupt function" to be called before receiving entire frame? #140

Open
makesens86 opened this issue Mar 6, 2018 · 7 comments

Comments

@makesens86
Copy link

I want to make an AP (using hostapd) to transmit a buffered frame when the AP receives a beacon frame from other APs. (More specifically, during the beacon transmission periods, not after receiving)
Now, I am trying to implement the functionality in the "ath_intr" in firmware source code.
But when I checked the receiving buffer memory in "ath_intr" function, it seems that entire frame is already received in the receiving buffer. Can I make the interrupt function to be called right after the AP starts receiving a frame, i.e., after receiving PHY or MAC header?
or
Which function calls "ath_intr"? Is it implemented in hardware ROM? I can't find where "ath_intr" is called. Any comments or advice will be helpful to me and I will appreciate for your help.
Thank you very much!

@olerem
Copy link
Contributor

olerem commented Mar 6, 2018

target_firmware/magpie_fw_dev/target/init/init.c
wlan_task
wlan_pci_isr
g_wlan_intr
adf_os_setup_intr
ath_intr

@makesens86
Copy link
Author

makesens86 commented Mar 9, 2018

@olerem Thank you very much. It helped me to understand how the function (ath_intr) is called.

For others,
In wlan_task(), there is a infinite loop, which calls wlan_pci_isr() periodically (maybe microseconds level).
Then, ath_intr() is called, and depending on the type of interrupts, each tasklet function (i.e., ath_tgt_rx_tasklet()) is called.

@erikarn
Copy link
Collaborator

erikarn commented Mar 9, 2018 via email

@makesens86
Copy link
Author

@erikarn Hi Adrian,
What do you mean with 'TDMA'? I am trying to make an AP to utilize air-time for its data transmission during adjacent AP's beacon transmission periods. Currently, I am working on making an AP to monitor receive buffer to check whether the received frame is transmitted from target AP.

Hyunjoong,

@erikarn
Copy link
Collaborator

erikarn commented Mar 9, 2018 via email

@makesens86
Copy link
Author

@erikarn
Thanks for your comments.

By the way, I found the way to access receive buffer before the hardware complete the DMA of the current frame. As ath_intr() function is periodically called, and if there is no pending interrupt, it does nothing. But at that point, I could still access the receive buffer memory to monitor it. Since the ath_intr() is called every few microseconds, i think this method can be used to check the receive buffer (almost) in real-time.

@erikarn
Copy link
Collaborator

erikarn commented Mar 12, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants