mhf ( u8 idx, u16 sel, u16 val, u8 bands)
- Initialize array addr with values 0x5E, 0x60, 0x62, 0x78, 0xD4
- Create a struct wlcband (defined below) named band
- If bands is 0 or 3
set band to band
- Else if bands is 1
Set band to bandstate[1]
- Else if bands is 2
Set band to bandstate[0]
- Otherwise
- Issue warning and set band to NULL
- If band is not NULL
Set tmp to band->mhfs[idx]
Maskset band->mhfs[idx] to band->mhfs[idx] with mask ~(sel) and set with val
If the interface is up AND band->mhfs[idx] is not equal to tmp AND band equals band
Write band->mhfs[idx] to Shared Memory Address addr[idx]
- If bands is 3
struct wlcband {int bandtype; u32 bandunit; u16 mhfs[3]; }