You are not logged in.
Hi,
In 802.11 reference design, I don't understand how call back functions in the main file wlan-mac-ap are called?
In other words, it is not clear when a mpdu is received how these functions are notified?
Thanks
Offline
The mpdu_rx_process() function is hooked up to the framework as a callback in the main() function on line 158 of wlan_mac_ap.c. Under the hood, in the MAC High Framework, the wlan_mac_high_set_mpdu_rx_callback() function assigns the pointer to the mpdu_rx_process() function to a global variable called mpdu_rx_callback.
Finally, the mpdu_rx_callback is actually called whenever the MAC High Framework gets an inter-processor message from the low-level MAC saying that a MPDU is received. This occurs on line line 1473 of wlan_mac_high.c.
Offline
Many thanks for your reply.
You mean each of wlan_mac_high and wlan_mac_low are run as process and the connection between them is handled by message passing?
Offline
The 802.11 reference design integrates two MicroBlaze processors, CPU_High and CPU_Low. Each processor runs its own application. Neither processor uses an OS - both are "bare metal" applications written in C. The main() for CPU_High is in wlan_mac_high_ap.c or wlan_mac_high_sta.c (for AP and STA roles, respectively). The main() for CPU_Low is in wlan_mac_low_dcf.c. The other wlan_mac_high_* and wlan_mac_low_* source files are support code for the high- and low-level MAC functions. The two MicroBlaze processors communicate via the IPC mailbox core. The two processors are also connected to a common AXI interconnect and share access to some memory-mapped peripherals, primarily the wireless packet buffers.
Offline
Thanks for your reply.
My other question is that why in the ethernet-receive function poll-tx-queues has been called?
It seems to me that this function should be called when CPU-low sends a ready for new packet message.
Offline
My other question is that why in the ethernet-receive function poll-tx-queues has been called?
The framework polls the wireless Tx queues when:
1) The lower MAC accepts a new packet for transmission, indicating one of the ping/pong buffers is free
or
2) Any new packet is enqueued in any wireless Tx queue
Condition (2) handles the case of an idle node that enqueues a packet. If only condition (1) was polled, this idle -> Tx behavior wouldn't work.
Offline
Thanks.
in order to send ethernet packets, it seems to option we have:
using wlan_mpdu_eth_send function or wlan_eth_dma_send
what is the difference between these two functions?
Offline
These functions have lots of inline documentation:
wlan_mac_eth_util.c :: wlan_mpdu_eth_send
wlan_mac_eth_util.c :: wlan_eth_dma_send
Offline
Thanks.
CPU high receives two types of interrupts: one from ethernet which is handled by eth-rx-interrupt-handler and the other which is processed by wlan-mac-high-ipc-rx, am I right?
On the other hand, periodic events should also be handled. My question is that how these different tasks are managed by CPU-high and which part of the code is related to this.
Offline
There are five interrupt sources in CPU High:
-ETH_A DMA - receptions on Ethernet port A
-IPC mailbox - reception of messages from CPU Low
-GPIO - push buttons
-UART - character reception on USB-UART
-Timer - periodic timer
These interrupts are connected to the interrupt controller in wlan_mac_high_interrupt_init and wlan_mac_ipc_util.c.
Offline