blob: 55077c92f0bc2728c08c7dde5958f76f82aadd9e [file] [log] [blame]
developer0ee5c6b2021-10-21 10:58:48 +08001diff --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
2new file mode 100644
3index 0000000..62057bf
4--- a/package/network/utils/wireless-tools/patches/006-fix-iwconfig-rate-print-format.patch
5+++ b/package/network/utils/wireless-tools/patches/006-fix-iwconfig-rate-print-format.patch
6@@ -0,0 +1,45 @@
7+Index: wireless_tools.29/iwlib.c
8+===================================================================
9+--- wireless_tools.29.orig/iwlib.c 2007-06-30 07:43:31.000000000 +0800
10++++ wireless_tools.29/iwlib.c 2020-09-25 15:35:01.105434143 +0800
11+@@ -1129,7 +1129,7 @@ iw_channel_to_freq(int channel,
12+ void
13+ iw_print_bitrate(char * buffer,
14+ int buflen,
15+- int bitrate)
16++ unsigned long long bitrate)
17+ {
18+ double rate = bitrate;
19+ char scale;
20+--- wireless_tools.29.orig/iwlib.h
21++++ wireless_tools.29.orig/iwlib.h
22+@@ -346,7 +346,7 @@ int
23+ void
24+ iw_print_bitrate(char * buffer,
25+ int buflen,
26+- int bitrate);
27++ unsigned long long bitrate);
28+ /* ---------------------- POWER SUBROUTINES ----------------------- */
29+ int
30+ iw_dbm2mwatt(int in);
31+--- wireless_tools.29.orig/wireless.21.h
32++++ wireless_tools.29.orig/wireless.21.h
33+@@ -669,7 +669,7 @@
34+ */
35+ struct iw_param
36+ {
37+- __s32 value; /* The value of the parameter itself */
38++ __u64 value; /* The value of the parameter itself */
39+ __u8 fixed; /* Hardware should not use auto select */
40+ __u8 disabled; /* Disable the feature */
41+ __u16 flags; /* Various specifc flags (if any) */
42+@@ -1005,7 +1005,7 @@ struct iw_range
43+
44+ /* Rates */
45+ __u8 num_bitrates; /* Number of entries in the list */
46+- __s32 bitrate[IW_MAX_BITRATES]; /* list, in bps */
47++ __u64 bitrate[IW_MAX_BITRATES]; /* list, in bps */
48+
49+ /* RTS threshold */
50+ __s32 min_rts; /* Minimal RTS threshold */
51+