developer | 733e8bd | 2023-10-20 10:49:14 +0800 | [diff] [blame] | 1 | From ed0fd20be0b27d0f3f95819228c87c771a8c3c43 Mon Sep 17 00:00:00 2001 |
developer | 29203b1 | 2023-03-10 19:33:45 +0800 | [diff] [blame] | 2 | From: StanleyYP Wang <StanleyYP.Wang@mediatek.com> |
| 3 | Date: Thu, 2 Mar 2023 10:07:05 +0800 |
developer | 733e8bd | 2023-10-20 10:49:14 +0800 | [diff] [blame] | 4 | Subject: [PATCH] Add support for 5G U-NII-3 & 6G BW320 |
developer | 29203b1 | 2023-03-10 19:33:45 +0800 | [diff] [blame] | 5 | |
| 6 | Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com> |
| 7 | --- |
developer | 733e8bd | 2023-10-20 10:49:14 +0800 | [diff] [blame] | 8 | phy.c | 4 ++-- |
| 9 | util.c | 11 ++++++----- |
| 10 | 2 files changed, 8 insertions(+), 7 deletions(-) |
developer | 29203b1 | 2023-03-10 19:33:45 +0800 | [diff] [blame] | 11 | |
| 12 | diff --git a/phy.c b/phy.c |
| 13 | index 2d489ef..4fa66b7 100644 |
| 14 | --- a/phy.c |
| 15 | +++ b/phy.c |
| 16 | @@ -200,13 +200,13 @@ static int handle_freq(struct nl80211_state *state, struct nl_msg *msg, |
| 17 | |
| 18 | COMMAND(set, freq, |
| 19 | "<freq> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz|160MHz]\n" |
| 20 | - "<control freq> [5|10|20|40|80|80+80|160] [<center1_freq> [<center2_freq>]]", |
| 21 | + "<control freq> [5|10|20|40|80|80+80|160|320] [<center1_freq> [<center2_freq>]]", |
| 22 | NL80211_CMD_SET_WIPHY, 0, CIB_PHY, handle_freq, |
| 23 | "Set frequency/channel the hardware is using, including HT\n" |
| 24 | "configuration."); |
| 25 | COMMAND(set, freq, |
| 26 | "<freq> [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz|160MHz]\n" |
| 27 | - "<control freq> [5|10|20|40|80|80+80|160] [<center1_freq> [<center2_freq>]]", |
| 28 | + "<control freq> [5|10|20|40|80|80+80|160|320] [<center1_freq> [<center2_freq>]]", |
| 29 | NL80211_CMD_SET_WIPHY, 0, CIB_NETDEV, handle_freq, NULL); |
| 30 | |
| 31 | static int handle_chan(struct nl80211_state *state, struct nl_msg *msg, |
| 32 | diff --git a/util.c b/util.c |
developer | 733e8bd | 2023-10-20 10:49:14 +0800 | [diff] [blame] | 33 | index 8a2ba10..7126ce8 100644 |
developer | 29203b1 | 2023-03-10 19:33:45 +0800 | [diff] [blame] | 34 | --- a/util.c |
| 35 | +++ b/util.c |
| 36 | @@ -471,6 +471,7 @@ enum nl80211_chan_width str_to_bw(const char *str) |
| 37 | { .name = "80", .val = NL80211_CHAN_WIDTH_80, }, |
| 38 | { .name = "80+80", .val = NL80211_CHAN_WIDTH_80P80, }, |
| 39 | { .name = "160", .val = NL80211_CHAN_WIDTH_160, }, |
| 40 | + { .name = "320", .val = NL80211_CHAN_WIDTH_320, }, |
| 41 | }; |
| 42 | unsigned int i; |
| 43 | |
developer | 733e8bd | 2023-10-20 10:49:14 +0800 | [diff] [blame] | 44 | @@ -1690,11 +1691,11 @@ int get_cf1(const struct chanmode *chanmode, unsigned long freq) |
| 45 | { |
| 46 | unsigned int cf1 = freq, j; |
| 47 | unsigned int bw80[] = { 5180, 5260, 5500, 5580, 5660, 5745, |
| 48 | - 5955, 6035, 6115, 6195, 6275, 6355, |
| 49 | - 6435, 6515, 6595, 6675, 6755, 6835, |
| 50 | - 6195, 6995 }; |
| 51 | - unsigned int bw160[] = { 5180, 5500, 5955, 6115, 6275, 6435, |
| 52 | - 6595, 6755, 6915 }; |
| 53 | + 5825, 5955, 6035, 6115, 6195, 6275, |
| 54 | + 6355, 6435, 6515, 6595, 6675, 6755, |
| 55 | + 6835, 6915, 6995 }; |
| 56 | + unsigned int bw160[] = { 5180, 5500, 5745, 5955, 6115, 6275, |
| 57 | + 6435, 6595, 6755, 6915 }; |
| 58 | |
| 59 | switch (chanmode->width) { |
| 60 | case NL80211_CHAN_WIDTH_80: |
developer | 29203b1 | 2023-03-10 19:33:45 +0800 | [diff] [blame] | 61 | -- |
| 62 | 2.18.0 |
| 63 | |