summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/iw
diff options
context:
space:
mode:
authorChanghyeok Bae <changhyeok.bae@gmail.com>2019-04-11 21:26:31 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-04-16 11:10:01 +0100
commit98143681efc76582f5a0b25212c6630824c71f65 (patch)
treeb71e665e37f8baeec108195611fc5a31893ef604 /meta/recipes-connectivity/iw
parent24667b824668bf18734ac970527eb0b0bf362504 (diff)
downloadpoky-98143681efc76582f5a0b25212c6630824c71f65.tar.gz
iw: upgrade 4.14 -> 5.0.1
(From OE-Core rev: e1bc9b8d25365fbf3e5f7546c8dd2db7bef704b2) Signed-off-by: Changhyeok Bae <changhyeok.bae@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/iw')
-rw-r--r--meta/recipes-connectivity/iw/iw/0001-connect-fix-parsing-of-WEP-keys.patch194
-rw-r--r--meta/recipes-connectivity/iw/iw/separate-objdir.patch27
-rw-r--r--meta/recipes-connectivity/iw/iw_5.0.1.bb (renamed from meta/recipes-connectivity/iw/iw_4.14.bb)5
3 files changed, 19 insertions, 207 deletions
diff --git a/meta/recipes-connectivity/iw/iw/0001-connect-fix-parsing-of-WEP-keys.patch b/meta/recipes-connectivity/iw/iw/0001-connect-fix-parsing-of-WEP-keys.patch
deleted file mode 100644
index 8cf8f7ab38..0000000000
--- a/meta/recipes-connectivity/iw/iw/0001-connect-fix-parsing-of-WEP-keys.patch
+++ /dev/null
@@ -1,194 +0,0 @@
1From 2a6be4166fd718be0694fe8a6e3f1013c125dee2 Mon Sep 17 00:00:00 2001
2From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
3Date: Tue, 12 Jun 2018 09:01:56 +0300
4Subject: [PATCH] connect: fix parsing of WEP keys
5
6The introduction of MFP options added a bug that causes a
7segmentation fault when parsing WEP keys.
8Fix that.
9
10Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
11Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12
13Upstream-Status: Backport
14[https://git.kernel.org/pub/scm/linux/kernel/git/jberg/iw.git/commit/?id=0e39f109c4b8155697a12ef090b59cdb304c8c44]
15Signed-off-by: Liu Haitao <haitao.liu@windriver.com>
16---
17 ap.c | 2 +-
18 connect.c | 7 ++-----
19 ibss.c | 2 +-
20 iw.h | 3 ++-
21 util.c | 36 ++++++++++++++++++------------------
22 5 files changed, 24 insertions(+), 26 deletions(-)
23
24diff --git a/ap.c b/ap.c
25index 4bab5b9..dcce402 100644
26--- a/ap.c
27+++ b/ap.c
28@@ -116,7 +116,7 @@ static int handle_start_ap(struct nl80211_state *state,
29 argv++;
30 argc--;
31
32- return parse_keys(msg, argv, argc);
33+ return parse_keys(msg, &argv, &argc);
34 nla_put_failure:
35 return -ENOSPC;
36 }
37diff --git a/connect.c b/connect.c
38index 339fc73..4a847a1 100644
39--- a/connect.c
40+++ b/connect.c
41@@ -54,13 +54,10 @@ static int iw_conn(struct nl80211_state *state,
42 argv++;
43 argc--;
44
45- ret = parse_keys(msg, argv, argc);
46+ ret = parse_keys(msg, &argv, &argc);
47 if (ret)
48 return ret;
49
50- argc -= 4;
51- argv += 4;
52-
53 if (!argc)
54 return 0;
55
56@@ -228,7 +225,7 @@ static int iw_auth(struct nl80211_state *state,
57 argv++;
58 argc--;
59
60- return parse_keys(msg, argv, argc);
61+ return parse_keys(msg, &argv, &argc);
62 nla_put_failure:
63 return -ENOSPC;
64 }
65diff --git a/ibss.c b/ibss.c
66index 84f1e95..d77fc92 100644
67--- a/ibss.c
68+++ b/ibss.c
69@@ -115,7 +115,7 @@ static int join_ibss(struct nl80211_state *state,
70 argv++;
71 argc--;
72
73- return parse_keys(msg, argv, argc);
74+ return parse_keys(msg, &argv, &argc);
75 nla_put_failure:
76 return -ENOSPC;
77 }
78diff --git a/iw.h b/iw.h
79index ee7ca20..8767ed3 100644
80--- a/iw.h
81+++ b/iw.h
82@@ -180,7 +180,8 @@ int parse_hex_mask(char *hexmask, unsigned char **result, size_t *result_len,
83 unsigned char **mask);
84 unsigned char *parse_hex(char *hex, size_t *outlen);
85
86-int parse_keys(struct nl_msg *msg, char **argv, int argc);
87+
88+int parse_keys(struct nl_msg *msg, char **argv[], int *argc);
89 int parse_freqchan(struct chandef *chandef, bool chan, int argc, char **argv, int *parsed);
90 enum nl80211_chan_width str_to_bw(const char *str);
91 int put_chandef(struct nl_msg *msg, struct chandef *chandef);
92diff --git a/util.c b/util.c
93index 6e0ddff..122c019 100644
94--- a/util.c
95+++ b/util.c
96@@ -417,23 +417,23 @@ static int parse_cipher_suite(const char *cipher_str)
97 return -EINVAL;
98 }
99
100-int parse_keys(struct nl_msg *msg, char **argv, int argc)
101+int parse_keys(struct nl_msg *msg, char **argv[], int *argc)
102 {
103 struct nlattr *keys;
104 int i = 0;
105 bool have_default = false;
106- char *arg = *argv;
107+ char *arg = **argv;
108 char keybuf[13];
109 int pos = 0;
110
111- if (!argc)
112+ if (!*argc)
113 return 1;
114
115 if (!memcmp(&arg[pos], "psk", 3)) {
116 char psk_keybuf[32];
117 int cipher_suite, akm_suite;
118
119- if (argc < 4)
120+ if (*argc < 4)
121 goto explain;
122
123 pos+=3;
124@@ -451,9 +451,9 @@ int parse_keys(struct nl_msg *msg, char **argv, int argc)
125 NLA_PUT(msg, NL80211_ATTR_PMK, 32, psk_keybuf);
126 NLA_PUT_U32(msg, NL80211_ATTR_AUTH_TYPE, NL80211_AUTHTYPE_OPEN_SYSTEM);
127
128- argv++;
129- argc--;
130- arg = *argv;
131+ *argv += 1;
132+ *argc -= 1;
133+ arg = **argv;
134
135 akm_suite = parse_akm_suite(arg);
136 if (akm_suite < 0)
137@@ -461,9 +461,9 @@ int parse_keys(struct nl_msg *msg, char **argv, int argc)
138
139 NLA_PUT_U32(msg, NL80211_ATTR_AKM_SUITES, akm_suite);
140
141- argv++;
142- argc--;
143- arg = *argv;
144+ *argv += 1;
145+ *argc -= 1;
146+ arg = **argv;
147
148 cipher_suite = parse_cipher_suite(arg);
149 if (cipher_suite < 0)
150@@ -471,9 +471,9 @@ int parse_keys(struct nl_msg *msg, char **argv, int argc)
151
152 NLA_PUT_U32(msg, NL80211_ATTR_CIPHER_SUITES_PAIRWISE, cipher_suite);
153
154- argv++;
155- argc--;
156- arg = *argv;
157+ *argv += 1;
158+ *argc -= 1;
159+ arg = **argv;
160
161 cipher_suite = parse_cipher_suite(arg);
162 if (cipher_suite < 0)
163@@ -495,7 +495,7 @@ int parse_keys(struct nl_msg *msg, char **argv, int argc)
164 struct nlattr *key = nla_nest_start(msg, ++i);
165 char *keydata;
166
167- arg = *argv;
168+ arg = **argv;
169 pos = 0;
170
171 if (!key)
172@@ -537,15 +537,15 @@ int parse_keys(struct nl_msg *msg, char **argv, int argc)
173
174 NLA_PUT(msg, NL80211_KEY_DATA, keylen, keydata);
175
176- argv++;
177- argc--;
178+ *argv += 1;
179+ *argc -= 1;
180
181 /* one key should be TX key */
182- if (!have_default && !argc)
183+ if (!have_default && !*argc)
184 NLA_PUT_FLAG(msg, NL80211_KEY_DEFAULT);
185
186 nla_nest_end(msg, key);
187- } while (argc);
188+ } while (*argc);
189
190 nla_nest_end(msg, keys);
191
192--
1932.17.1
194
diff --git a/meta/recipes-connectivity/iw/iw/separate-objdir.patch b/meta/recipes-connectivity/iw/iw/separate-objdir.patch
index 0ea6a52789..eb01a5a14e 100644
--- a/meta/recipes-connectivity/iw/iw/separate-objdir.patch
+++ b/meta/recipes-connectivity/iw/iw/separate-objdir.patch
@@ -7,29 +7,36 @@ Upstream-Status: Pending
7Signed-off-by: Christopher Larson <chris_larson@mentor.com> 7Signed-off-by: Christopher Larson <chris_larson@mentor.com>
8Signed-off-by: Maxin B. John <maxin.john@intel.com> 8Signed-off-by: Maxin B. John <maxin.john@intel.com>
9--- 9---
10diff -Naur iw-4.3-origin/Makefile iw-4.3/Makefile 10 Makefile | 8 ++++++--
11--- iw-4.3-origin/Makefile 2015-11-20 16:37:58.752077287 +0200 11 1 file changed, 6 insertions(+), 2 deletions(-)
12+++ iw-4.3/Makefile 2015-11-20 16:57:15.510615815 +0200 12
13@@ -1,5 +1,7 @@ 13diff --git a/Makefile b/Makefile
14index 33aaf6a..9030796 100644
15--- a/Makefile
16+++ b/Makefile
17@@ -1,5 +1,9 @@
14 MAKEFLAGS += --no-print-directory 18 MAKEFLAGS += --no-print-directory
15- 19
16+SRCDIR ?= $(dir $(lastword $(MAKEFILE_LIST))) 20+SRCDIR ?= $(dir $(lastword $(MAKEFILE_LIST)))
17+OBJDIR ?= $(PWD) 21+OBJDIR ?= $(PWD)
18+VPATH = $(SRCDIR) 22+VPATH = $(SRCDIR)
23+
19 PREFIX ?= /usr 24 PREFIX ?= /usr
20 SBINDIR ?= $(PREFIX)/sbin 25 SBINDIR ?= $(PREFIX)/sbin
21 MANDIR ?= $(PREFIX)/share/man 26 MANDIR ?= $(PREFIX)/share/man
22@@ -95,11 +97,11 @@ 27@@ -103,11 +107,11 @@ VERSION_OBJS := $(filter-out version.o, $(OBJS))
23 version.c: version.sh $(patsubst %.o,%.c,$(VERSION_OBJS)) nl80211.h iw.h Makefile \ 28 version.c: version.sh $(patsubst %.o,%.c,$(VERSION_OBJS)) nl80211.h iw.h Makefile \
24 $(wildcard .git/index .git/refs/tags) 29 $(wildcard .git/index .git/refs/tags)
25 @$(NQ) ' GEN ' $@ 30 @$(NQ) ' GEN ' $@
26- $(Q)./version.sh $@ 31- $(Q)./version.sh $@
27+ $(Q)cd $(SRCDIR) && ./version.sh $(OBJDIR)/$@ 32+ $(Q)cd $(SRCDIR) && ./version.sh $(OBJDIR)/$@
28 33
29 %.o: %.c iw.h nl80211.h 34 %.o: %.c iw.h nl80211.h
30 @$(NQ) ' CC ' $@ 35 @$(NQ) ' CC ' $@
31- $(Q)$(CC) $(CFLAGS) -c -o $@ $< 36- $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
32+ $(Q)$(CC) -I$(SRCDIR) $(CFLAGS) -c -o $@ $< 37+ $(Q)$(CC) -I$(SRCDIR) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
33 38
34 ifeq ($(IW_ANDROID_BUILD),) 39 ifeq ($(IW_ANDROID_BUILD),)
35 iw: $(OBJS) 40 iw: $(OBJS)
41--
422.20.1 (Apple Git-117)
diff --git a/meta/recipes-connectivity/iw/iw_4.14.bb b/meta/recipes-connectivity/iw/iw_5.0.1.bb
index f414a4b1dc..e127963513 100644
--- a/meta/recipes-connectivity/iw/iw_4.14.bb
+++ b/meta/recipes-connectivity/iw/iw_5.0.1.bb
@@ -12,11 +12,10 @@ DEPENDS = "libnl"
12SRC_URI = "http://www.kernel.org/pub/software/network/iw/${BP}.tar.gz \ 12SRC_URI = "http://www.kernel.org/pub/software/network/iw/${BP}.tar.gz \
13 file://0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch \ 13 file://0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch \
14 file://separate-objdir.patch \ 14 file://separate-objdir.patch \
15 file://0001-connect-fix-parsing-of-WEP-keys.patch \
16" 15"
17 16
18SRC_URI[md5sum] = "2067516ca9940fdb8c091ee3250da374" 17SRC_URI[md5sum] = "a0a17ab1b20132c716bba9a4f9974ba6"
19SRC_URI[sha256sum] = "a0c3aad6ff52234d03a2522ba2eba570e36abb3e60dc29bf0b1ce88dd725d6d4" 18SRC_URI[sha256sum] = "36fc7592dde7bec934df83cd53ef1f2c08ceec5cd58d07eb8f71cc6e8464013c"
20 19
21inherit pkgconfig 20inherit pkgconfig
22 21