WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2014-Jun-19 16:17:50

kimia
Member
Registered: 2014-Jun-19
Posts: 5

wlan_mac_ap

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

 

#2 2014-Jun-20 15:50:14

chunter
Administrator
From: Mango Communications
Registered: 2006-Aug-24
Posts: 1212

Re: wlan_mac_ap

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

 

#3 2014-Jun-20 20:03:29

kimia
Member
Registered: 2014-Jun-19
Posts: 5

Re: wlan_mac_ap

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

 

#4 2014-Jun-20 21:09:09

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: wlan_mac_ap

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

 

#5 2014-Jun-23 21:39:34

kimia
Member
Registered: 2014-Jun-19
Posts: 5

Re: wlan_mac_ap

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

 

#6 2014-Jun-23 22:23:56

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: wlan_mac_ap

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

 

#7 2014-Jun-25 17:10:56

kimia
Member
Registered: 2014-Jun-19
Posts: 5

Re: wlan_mac_ap

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

 

#8 2014-Jun-25 21:26:31

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: wlan_mac_ap

Offline

 

#9 2014-Jun-25 22:52:03

kimia
Member
Registered: 2014-Jun-19
Posts: 5

Re: wlan_mac_ap

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

 

#10 2014-Jun-26 03:10:54

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: wlan_mac_ap

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

 

Board footer