bool Phy Interference ( int mode, bool init)
- If init is true
Set interference_mode_crs_time to 0
Set crsglitch_prev to 0
- If this is a G PHY or this is an N PHY operating at 2 GHz
- If mode equals 0
If cur_interference_mode is 2 or 3
- If this is an LP PHY
Call LP PHY ACI with argument 0
- Else if this is an N PHY
Call N PHY ACI Control with ( 0, 0 ) as arguments
- Otherwise
Call G PHY ACI Control with 0 as argument
Set aci_state to 0
- If this is an LP PHY
Else if cur_interference_mode is 1
- If this is an N PHY
- This is an error condition.
- Otherwise
Set interference_mode_crs to 0
Call G PHY Interference NW Lan Set with 0 as argument
- If this is an N PHY
- Otherwise
- If mode is 1
- If this is an LP PHY
- This is an error condition.
- Else if this is an N PHY
- This is an error condition.
- Otherwise
Set interference_mode_crs to 1
Call G PHY Interference NW Lan Set with 1 as argument
- If this is an LP PHY
- If mode is 3
Set bit 4 in aci_state
If mode is 2 OR (mode is 3 AND ((aci_state AND 2) is zero AND this is not an N PHY))
- If this is an LP PHY
Call LP PHY ACI with argument 1
- Else if this is an N PHY
Call N PHY ACI Control with arguments ( 1, 3 )
- Otherwise
Call G PHY ACI Control with argument 1
- If this is an LP PHY
- If mode is 1
- If mode equals 0
Set cur_interference_mode to mode
- Return 1