developer | 8bff647 | 2023-07-17 11:11:44 +0800 | [diff] [blame^] | 1 | From ece45354ac0191c2474b3f57cdfc26060db9efec Mon Sep 17 00:00:00 2001 |
developer | f8871e8 | 2023-03-08 17:22:32 +0800 | [diff] [blame] | 2 | From: "himanshu.goyal" <himanshu.goyal@mediatek.com> |
developer | 505c943 | 2023-05-12 18:58:17 +0800 | [diff] [blame] | 3 | Date: Fri, 3 Mar 2023 12:45:42 +0800 |
developer | 8bff647 | 2023-07-17 11:11:44 +0800 | [diff] [blame^] | 4 | Subject: [PATCH 19/32] hostapd: mtk: Mark DFS channel as available for CSA. |
developer | f8871e8 | 2023-03-08 17:22:32 +0800 | [diff] [blame] | 5 | |
| 6 | --- |
| 7 | hostapd/ctrl_iface.c | 10 ++++++++++ |
| 8 | hostapd/hostapd_cli.c | 2 +- |
| 9 | src/ap/ctrl_iface_ap.c | 1 + |
| 10 | 3 files changed, 12 insertions(+), 1 deletion(-) |
| 11 | |
| 12 | diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c |
developer | 8bff647 | 2023-07-17 11:11:44 +0800 | [diff] [blame^] | 13 | index f89bb58f1..bad9790ca 100644 |
developer | f8871e8 | 2023-03-08 17:22:32 +0800 | [diff] [blame] | 14 | --- a/hostapd/ctrl_iface.c |
| 15 | +++ b/hostapd/ctrl_iface.c |
developer | 8bff647 | 2023-07-17 11:11:44 +0800 | [diff] [blame^] | 16 | @@ -2815,6 +2815,16 @@ static int hostapd_ctrl_iface_chan_switch(struct hostapd_iface *iface, |
| 17 | settings.freq_params.eht_enabled = iface->conf->ieee80211be; |
developer | f8871e8 | 2023-03-08 17:22:32 +0800 | [diff] [blame] | 18 | } |
| 19 | |
| 20 | + if (settings.freq_params.radar_background) { |
| 21 | + hostapd_dfs_sta_update_state(iface, |
| 22 | + settings.freq_params.freq, |
| 23 | + settings.freq_params.ht_enabled, |
| 24 | + settings.freq_params.sec_channel_offset, |
| 25 | + bandwidth, settings.freq_params.center_freq1, |
| 26 | + settings.freq_params.center_freq2, |
| 27 | + HOSTAPD_CHAN_DFS_AVAILABLE); |
| 28 | + } |
| 29 | + |
| 30 | if (settings.freq_params.center_freq1) |
| 31 | dfs_range += hostapd_is_dfs_overlap( |
| 32 | iface, bandwidth, settings.freq_params.center_freq1); |
| 33 | diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c |
developer | 8bff647 | 2023-07-17 11:11:44 +0800 | [diff] [blame^] | 34 | index d59373062..0a374be8e 100644 |
developer | f8871e8 | 2023-03-08 17:22:32 +0800 | [diff] [blame] | 35 | --- a/hostapd/hostapd_cli.c |
| 36 | +++ b/hostapd/hostapd_cli.c |
developer | 505c943 | 2023-05-12 18:58:17 +0800 | [diff] [blame] | 37 | @@ -1715,7 +1715,7 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = { |
developer | f8871e8 | 2023-03-08 17:22:32 +0800 | [diff] [blame] | 38 | "<addr> = send QoS Map Configure frame" }, |
| 39 | { "chan_switch", hostapd_cli_cmd_chan_switch, NULL, |
| 40 | "<cs_count> <freq> [sec_channel_offset=] [center_freq1=]\n" |
| 41 | - " [center_freq2=] [bandwidth=] [blocktx] [ht|vht]\n" |
| 42 | + " [center_freq2=] [bandwidth=] [blocktx] [ht|vht] [skip_cac]\n" |
| 43 | " = initiate channel switch announcement" }, |
| 44 | { "hs20_wnm_notif", hostapd_cli_cmd_hs20_wnm_notif, NULL, |
| 45 | "<addr> <url>\n" |
| 46 | diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c |
developer | 8bff647 | 2023-07-17 11:11:44 +0800 | [diff] [blame^] | 47 | index cf1cff447..aab8a4665 100644 |
developer | f8871e8 | 2023-03-08 17:22:32 +0800 | [diff] [blame] | 48 | --- a/src/ap/ctrl_iface_ap.c |
| 49 | +++ b/src/ap/ctrl_iface_ap.c |
developer | 8bff647 | 2023-07-17 11:11:44 +0800 | [diff] [blame^] | 50 | @@ -1014,6 +1014,7 @@ int hostapd_parse_csa_settings(const char *pos, |
developer | f8871e8 | 2023-03-08 17:22:32 +0800 | [diff] [blame] | 51 | settings->freq_params.vht_enabled = !!os_strstr(pos, " vht"); |
| 52 | settings->freq_params.he_enabled = !!os_strstr(pos, " he"); |
| 53 | settings->freq_params.eht_enabled = !!os_strstr(pos, " eht"); |
| 54 | + settings->freq_params.radar_background = !!os_strstr(pos, " skip_cac"); |
| 55 | settings->block_tx = !!os_strstr(pos, " blocktx"); |
| 56 | #undef SET_CSA_SETTING |
developer | 505c943 | 2023-05-12 18:58:17 +0800 | [diff] [blame] | 57 | #undef SET_CSA_SETTING_EXT |
developer | f8871e8 | 2023-03-08 17:22:32 +0800 | [diff] [blame] | 58 | -- |
developer | 8bff647 | 2023-07-17 11:11:44 +0800 | [diff] [blame^] | 59 | 2.39.2 |
developer | f8871e8 | 2023-03-08 17:22:32 +0800 | [diff] [blame] | 60 | |