71 | | ''' Different Channels on RF A/B ''': the reference code tunes all RF interfaces to the same center frequency any time the MAC application requests a new channel. The RF interfaces are tuned in the {{{wlan_mac_low_set_radio_channel(u32 channel)}}} function in {{{wlan_mac_low.c}}}. The {{{channel}}} argument is an 802.11 channel index. This function also enables/disables the Rx PHY DSSS receiver when tuned to a 5 GHz channel, as DSSS transmissions only occur in 2.4 GHz channels. |
| 73 | '''Keep Rx RF Interface Enabled'''[[BR]] |
| 74 | The reference code disables the Rx circuits on every RF interface when any interface is currently transmitting. For FDD the Rx interface must be configued to say in Rx mode independent of the Tx state of another interface. This is achieved by modifying the framework's {{{wlan_rx_config_ant_mode()}}} function in {{{wlan_phy_util.c}}}. Changes are required to 5 lines (add 3 lines, comment-out 2 lines), identified by the inline comments below: |
| 75 | |
| 76 | {{{#!c |
| 77 | |
| 78 | ... |
| 79 | // Disable PHY control of all RF interfaces - selected interfaces to re-enabled below |
| 80 | radio_controller_setCtrlSource(RC_BASEADDR, RC_ALL_RF, RC_REG0_RXEN_CTRLSRC, RC_CTRLSRC_REG); |
| 81 | |
| 82 | // Disable all RF interfaces that are already software-controlled |
| 83 | radio_controller_TxRxDisable(RC_BASEADDR, RC_ALL_RF); // FDD-NoMAC |
| 84 | |
| 85 | switch (ant_mode) { |
| 86 | case RX_ANTMODE_SISO_ANTA: |
| 87 | REG_SET_BITS(WLAN_RX_REG_CFG, WLAN_RX_REG_CFG_PKT_DET_EN_ANT_A); |
| 88 | wlan_phy_select_rx_antenna(RX_ANTMODE_SISO_ANTA); |
| 89 | //radio_controller_setCtrlSource(RC_BASEADDR, RC_RFA, RC_REG0_RXEN_CTRLSRC, RC_CTRLSRC_HW); // ref code |
| 90 | radio_controller_RxEnable(RC_BASEADDR, RC_RFA); // FDD-NoMAC |
| 91 | wlan_agc_config(RX_ANTMODE_SISO_ANTA); |
| 92 | break; |
| 93 | |
| 94 | case RX_ANTMODE_SISO_ANTB: |
| 95 | REG_SET_BITS(WLAN_RX_REG_CFG, WLAN_RX_REG_CFG_PKT_DET_EN_ANT_B); |
| 96 | wlan_phy_select_rx_antenna(RX_ANTMODE_SISO_ANTB); |
| 97 | //radio_controller_setCtrlSource(RC_BASEADDR, RC_RFB, RC_REG0_RXEN_CTRLSRC, RC_CTRLSRC_HW); // ref code |
| 98 | radio_controller_RxEnable(RC_BASEADDR, RC_RFB); // FDD-NoMAC |
| 99 | wlan_agc_config(RX_ANTMODE_SISO_ANTB); |
| 100 | break; |
| 101 | ... |
| 102 | }}} |
| 103 | |
| 104 | |
| 105 | '''Different Channels on RF A/B'''[[BR]] |
| 106 | The reference code tunes all RF interfaces to the same center frequency any time the MAC application requests a new channel. The RF interfaces are tuned in the {{{wlan_mac_low_set_radio_channel(u32 channel)}}} function in {{{wlan_mac_low.c}}}. The {{{channel}}} argument is an 802.11 channel index. This function also enables/disables the Rx PHY DSSS receiver when tuned to a 5 GHz channel, as DSSS transmissions only occur in 2.4 GHz channels. |