gl-infra-builder-FUjr/patches-mt798x/1002-wireless-tools-fix-iwconfig-rate-print-format.patch
Jianhui Zhao 15eee0e27c gl-mt6000: new device
```
python3 setup.py -c configs/config-mt798x.yml
cd mt798x
./scripts/gen_config.py target_mt7986_gl-mt6000 glinet_mt7986_wifi glinet_mt6000
make -j $(nproc)

```

Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
2023-05-19 11:29:32 +08:00

66 lines
2.3 KiB
Diff

From 96bf38ef65b9f6385846384b8b9e2469d4f37ebd Mon Sep 17 00:00:00 2001
From: Jianhui Zhao <jianhui.zhao@gl-inet.com>
Date: Wed, 17 May 2023 11:56:43 +0800
Subject: [PATCH 6/9] wireless-tools: fix iwconfig rate print format
Signed-off-by: Jianhui Zhao <jianhui.zhao@gl-inet.com>
---
.../006-fix-iwconfig-rate-print-format.patch | 45 +++++++++++++++++++
1 file changed, 45 insertions(+)
create mode 100644 package/network/utils/wireless-tools/patches/006-fix-iwconfig-rate-print-format.patch
diff --git a/package/network/utils/wireless-tools/patches/006-fix-iwconfig-rate-print-format.patch b/package/network/utils/wireless-tools/patches/006-fix-iwconfig-rate-print-format.patch
new file mode 100644
index 0000000000..2a11adf0a1
--- /dev/null
+++ b/package/network/utils/wireless-tools/patches/006-fix-iwconfig-rate-print-format.patch
@@ -0,0 +1,45 @@
+Index: wireless_tools.29/iwlib.c
+===================================================================
+--- wireless_tools.29.orig/iwlib.c 2007-06-30 07:43:31.000000000 +0800
++++ wireless_tools.29/iwlib.c 2020-09-25 15:35:01.105434143 +0800
+@@ -1129,7 +1129,7 @@ iw_channel_to_freq(int channel,
+ void
+ iw_print_bitrate(char * buffer,
+ int buflen,
+- int bitrate)
++ unsigned long long bitrate)
+ {
+ double rate = bitrate;
+ char scale;
+--- wireless_tools.29.orig/iwlib.h
++++ wireless_tools.29.orig/iwlib.h
+@@ -346,7 +346,7 @@ int
+ void
+ iw_print_bitrate(char * buffer,
+ int buflen,
+- int bitrate);
++ unsigned long long bitrate);
+ /* ---------------------- POWER SUBROUTINES ----------------------- */
+ int
+ iw_dbm2mwatt(int in);
+--- wireless_tools.29.orig/wireless.21.h
++++ wireless_tools.29.orig/wireless.21.h
+@@ -669,7 +669,7 @@
+ */
+ struct iw_param
+ {
+- __s32 value; /* The value of the parameter itself */
++ __u64 value; /* The value of the parameter itself */
+ __u8 fixed; /* Hardware should not use auto select */
+ __u8 disabled; /* Disable the feature */
+ __u16 flags; /* Various specifc flags (if any) */
+@@ -1005,7 +1005,7 @@ struct iw_range
+
+ /* Rates */
+ __u8 num_bitrates; /* Number of entries in the list */
+- __s32 bitrate[IW_MAX_BITRATES]; /* list, in bps */
++ __u64 bitrate[IW_MAX_BITRATES]; /* list, in bps */
+
+ /* RTS threshold */
+ __s32 min_rts; /* Minimal RTS threshold */
+
--
2.34.1