| 142 | |
| 143 | MPDU reception is considerably simpler than transmission. The DCF software is responsible for polling the PHY Rx by calling the {{{wlan_mac_low_poll_frame_rx()}}} function in the MAC Low Framework. |
| 144 | |
| 145 | '''P1:''' |
| 146 | |
| 147 | The {{{wlan_mac_low_poll_frame_rx()}}} function reads the status registers from the PHY and converts that information into a {{{phy_rx_details}}} structure that contains the following: |
| 148 | * the PHY mode that was used (i.e. OFDM or DSSS) |
| 149 | * the PHY rate that was used |
| 150 | * the frame length decoded from the SIGNAL field |
| 151 | |
| 152 | If the reception is valid and supported, the framework calls the {{{frame_rx_callback}}} function. |
| 153 | |
| 154 | Pseudocode: |
| 155 | {{{ |
| 156 | read the MAC status register |
| 157 | |
| 158 | if( the Rx PHY is currently active OR the PHY is blocked after a reception ) |
| 159 | if( the PHY is using the DSSS subsystem ) |
| 160 | update the phy_rx_details struct to reflect the DSSS mode and rate |
| 161 | call frame_rx_callback() |
| 162 | else |
| 163 | wait for valid OFDM Rx params from the PHY |
| 164 | if( params indicate a supported mode ) |
| 165 | update the phy_rx_details with Rx params |
| 166 | call frame_rx_callback() |
| 167 | |
| 168 | return status_variable the return of the call to frame_rx_callback() |
| 169 | |
| 170 | }}} |
| 171 | |
| 172 | ---- |
| 173 | |
| 174 | In the DCF, the {{{frame_rx_callback()}}} is attached to the {{{frame_receive()}}} function. In the above MPDU transmission state, we have already seen some executions of this function to deal with the receptions of ACK and CTS frames. Independently of these actions, the {{{frame_receive()}}} function needs to pass receptions up to CPU_HIGH |