P2P: DFS offload for the autonomous GO

Enhance the P2P_GROUP_ADD command to support DFS channel with 80 and 160
MHz bandwidth to be used for autonomous GO when using offloaded DFS.

For example, 'P2P_GROUP_ADD freq=5500 max_oper_chwidth=80 ht40 vht'

- Previous behavior: AP fallback to channel 100 using 20 MHz with
  "No VHT higher bandwidth support for the selected channel 100"
- Enhanced behavior: AP starts on channel 100 using 80 MHz with
  "VHT center channel 106 for 80 or 80+80 MHz bandwidth"

This functionality is on top of the driver's capability to offload DFS,
which is advertized through WPA_DRIVER_FLAGS_DFS_OFFLOAD.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Hu Wang 2021-07-06 15:30:25 +08:00 committed by Jouni Malinen
parent 6ba665c5c3
commit ce267f4da9
5 changed files with 50 additions and 8 deletions

View file

@ -1531,6 +1531,16 @@ int ieee80211_is_dfs(int freq, const struct hostapd_hw_modes *modes,
}
/*
* 802.11-2020: Table E-4 - Global operating classes
* DFS_50_100_Behavior: 118, 119, 120, 121, 122, 123
*/
int is_dfs_global_op_class(u8 op_class)
{
return (op_class >= 118) && (op_class <= 123);
}
static int is_11b(u8 rate)
{
return rate == 0x02 || rate == 0x04 || rate == 0x0b || rate == 0x16;