aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEliad Peller2013-10-20 04:13:15 -0500
committerEliad Peller2013-10-20 05:11:23 -0500
commitc2dfcf736ee4f06fa86617f0e768c126182c8983 (patch)
tree04f415e5618acb75bec819f7f02ff4f2c2218713
parentc95ded2884f07afbbe4f5af085ec7692cfde7d7d (diff)
downloadcompat-wireless-upstream_312_32.tar.gz
compat-wireless-upstream_312_32.tar.xz
compat-wireless-upstream_312_32.zip
add missing sndportid backportol_r8.a8.04_32upstream_312_32
the 0005-netlink-portid patch had to be updated Signed-off-by: Eliad Peller <eliad@wizery.com>
-rw-r--r--patches/collateral-evolutions/network/0005-netlink-portid.patch111
1 files changed, 62 insertions, 49 deletions
diff --git a/patches/collateral-evolutions/network/0005-netlink-portid.patch b/patches/collateral-evolutions/network/0005-netlink-portid.patch
index a5412be..c0af62f 100644
--- a/patches/collateral-evolutions/network/0005-netlink-portid.patch
+++ b/patches/collateral-evolutions/network/0005-netlink-portid.patch
@@ -40,9 +40,11 @@ this file then I suspect we can extract SMPL out of it
40and use it to backport further collateral evolutions like 40and use it to backport further collateral evolutions like
41this one should other drivers / subsystem need this change. 41this one should other drivers / subsystem need this change.
42 42
43--- a/drivers/net/wireless/mac80211_hwsim.c 43Index: compat-drivers/drivers/net/wireless/mac80211_hwsim.c
44+++ b/drivers/net/wireless/mac80211_hwsim.c 44===================================================================
45@@ -2019,10 +2019,10 @@ static int hwsim_register_received_nl(st 45--- compat-drivers.orig/drivers/net/wireless/mac80211_hwsim.c 2013-10-20 12:56:07.998579174 +0300
46+++ compat-drivers/drivers/net/wireless/mac80211_hwsim.c 2013-10-20 12:56:07.986579174 +0300
47@@ -2064,10 +2064,10 @@
46 if (info == NULL) 48 if (info == NULL)
47 goto out; 49 goto out;
48 50
@@ -55,7 +57,7 @@ this one should other drivers / subsystem need this change.
55 57
56 return 0; 58 return 0;
57 out: 59 out:
58@@ -2059,7 +2059,7 @@ static int mac80211_hwsim_netlink_notify 60@@ -2104,7 +2104,7 @@
59 if (state != NETLINK_URELEASE) 61 if (state != NETLINK_URELEASE)
60 return NOTIFY_DONE; 62 return NOTIFY_DONE;
61 63
@@ -64,18 +66,20 @@ this one should other drivers / subsystem need this change.
64 printk(KERN_INFO "mac80211_hwsim: wmediumd released netlink" 66 printk(KERN_INFO "mac80211_hwsim: wmediumd released netlink"
65 " socket, switching to perfect channel medium\n"); 67 " socket, switching to perfect channel medium\n");
66 wmediumd_portid = 0; 68 wmediumd_portid = 0;
67--- a/net/wireless/nl80211.c 69Index: compat-drivers/net/wireless/nl80211.c
68+++ b/net/wireless/nl80211.c 70===================================================================
69@@ -1593,7 +1593,7 @@ static int nl80211_dump_wiphy(struct sk_ 71--- compat-drivers.orig/net/wireless/nl80211.c 2013-10-20 12:56:07.998579174 +0300
72+++ compat-drivers/net/wireless/nl80211.c 2013-10-20 12:57:38.546581725 +0300
73@@ -1642,7 +1642,7 @@
70 /* attempt to fit multiple wiphy data chunks into the skb */ 74 /* attempt to fit multiple wiphy data chunks into the skb */
71 do { 75 do {
72 ret = nl80211_send_wiphy(dev, skb, 76 ret = nl80211_send_wiphy(dev, skb,
73- NETLINK_CB(cb->skb).portid, 77- NETLINK_CB(cb->skb).portid,
74+ NETLINK_CB_PORTID(cb->skb), 78+ NETLINK_CB_PORTID(cb->skb),
75 cb->nlh->nlmsg_seq, 79 cb->nlh->nlmsg_seq,
76 NLM_F_MULTI, 80 NLM_F_MULTI, state);
77 split, &cb->args[1], 81 if (ret < 0) {
78@@ -1642,7 +1642,7 @@ static int nl80211_get_wiphy(struct sk_b 82@@ -1695,7 +1695,7 @@
79 if (!msg) 83 if (!msg)
80 return -ENOMEM; 84 return -ENOMEM;
81 85
@@ -84,7 +88,7 @@ this one should other drivers / subsystem need this change.
84 &state) < 0) { 88 &state) < 0) {
85 nlmsg_free(msg); 89 nlmsg_free(msg);
86 return -ENOBUFS; 90 return -ENOBUFS;
87@@ -2222,7 +2222,7 @@ static int nl80211_dump_interface(struct 91@@ -2270,7 +2270,7 @@
88 if_idx++; 92 if_idx++;
89 continue; 93 continue;
90 } 94 }
@@ -92,8 +96,8 @@ this one should other drivers / subsystem need this change.
92+ if (nl80211_send_iface(skb, NETLINK_CB_PORTID(cb->skb), 96+ if (nl80211_send_iface(skb, NETLINK_CB_PORTID(cb->skb),
93 cb->nlh->nlmsg_seq, NLM_F_MULTI, 97 cb->nlh->nlmsg_seq, NLM_F_MULTI,
94 rdev, wdev) < 0) { 98 rdev, wdev) < 0) {
95 mutex_unlock(&rdev->devlist_mtx); 99 goto out;
96@@ -2253,7 +2253,7 @@ static int nl80211_get_interface(struct 100@@ -2299,7 +2299,7 @@
97 if (!msg) 101 if (!msg)
98 return -ENOMEM; 102 return -ENOMEM;
99 103
@@ -102,7 +106,7 @@ this one should other drivers / subsystem need this change.
102 dev, wdev) < 0) { 106 dev, wdev) < 0) {
103 nlmsg_free(msg); 107 nlmsg_free(msg);
104 return -ENOBUFS; 108 return -ENOBUFS;
105@@ -2478,7 +2478,7 @@ static int nl80211_new_interface(struct 109@@ -2532,7 +2532,7 @@
106 break; 110 break;
107 } 111 }
108 112
@@ -111,25 +115,25 @@ this one should other drivers / subsystem need this change.
111 rdev, wdev) < 0) { 115 rdev, wdev) < 0) {
112 nlmsg_free(msg); 116 nlmsg_free(msg);
113 return -ENOBUFS; 117 return -ENOBUFS;
114@@ -2613,7 +2613,7 @@ static int nl80211_get_key(struct sk_buf 118@@ -2667,7 +2667,7 @@
115 if (!msg) 119 if (!msg)
116 return -ENOMEM; 120 return -ENOMEM;
117 121
118- hdr = nl80211hdr_put(msg, info->snd_portid, info->snd_seq, 0, 122- hdr = nl80211hdr_put(msg, info->snd_portid, info->snd_seq, 0,
119+ hdr = nl80211hdr_put(msg, genl_info_snd_portid(info), info->snd_seq, 0, 123+ hdr = nl80211hdr_put(msg, genl_info_snd_portid(info), info->snd_seq, 0,
120 NL80211_CMD_NEW_KEY); 124 NL80211_CMD_NEW_KEY);
121 if (IS_ERR(hdr)) 125 if (!hdr)
122 return PTR_ERR(hdr); 126 return -ENOBUFS;
123@@ -3549,7 +3549,7 @@ static int nl80211_dump_station(struct s 127@@ -3636,7 +3636,7 @@
124 goto out_err; 128 goto out_err;
125 129
126 if (nl80211_send_station(skb, 130 if (nl80211_send_station(skb,
127- NETLINK_CB(cb->skb).portid, 131- NETLINK_CB(cb->skb).portid,
128+ NETLINK_CB_PORTID(cb->skb), 132+ NETLINK_CB_PORTID(cb->skb),
129 cb->nlh->nlmsg_seq, NLM_F_MULTI, 133 cb->nlh->nlmsg_seq, NLM_F_MULTI,
130 dev, netdev, mac_addr, 134 dev, wdev->netdev, mac_addr,
131 &sinfo) < 0) 135 &sinfo) < 0)
132@@ -3595,7 +3595,7 @@ static int nl80211_get_station(struct sk 136@@ -3682,7 +3682,7 @@
133 if (!msg) 137 if (!msg)
134 return -ENOMEM; 138 return -ENOMEM;
135 139
@@ -138,16 +142,16 @@ this one should other drivers / subsystem need this change.
138 rdev, dev, mac_addr, &sinfo) < 0) { 142 rdev, dev, mac_addr, &sinfo) < 0) {
139 nlmsg_free(msg); 143 nlmsg_free(msg);
140 return -ENOBUFS; 144 return -ENOBUFS;
141@@ -4195,7 +4195,7 @@ static int nl80211_dump_mpath(struct sk_ 145@@ -4290,7 +4290,7 @@
142 if (err) 146 if (err)
143 goto out_err; 147 goto out_err;
144 148
145- if (nl80211_send_mpath(skb, NETLINK_CB(cb->skb).portid, 149- if (nl80211_send_mpath(skb, NETLINK_CB(cb->skb).portid,
146+ if (nl80211_send_mpath(skb, NETLINK_CB_PORTID(cb->skb), 150+ if (nl80211_send_mpath(skb, NETLINK_CB_PORTID(cb->skb),
147 cb->nlh->nlmsg_seq, NLM_F_MULTI, 151 cb->nlh->nlmsg_seq, NLM_F_MULTI,
148 netdev, dst, next_hop, 152 wdev->netdev, dst, next_hop,
149 &pinfo) < 0) 153 &pinfo) < 0)
150@@ -4244,7 +4244,7 @@ static int nl80211_get_mpath(struct sk_b 154@@ -4339,7 +4339,7 @@
151 if (!msg) 155 if (!msg)
152 return -ENOMEM; 156 return -ENOMEM;
153 157
@@ -156,7 +160,7 @@ this one should other drivers / subsystem need this change.
156 dev, dst, next_hop, &pinfo) < 0) { 160 dev, dst, next_hop, &pinfo) < 0) {
157 nlmsg_free(msg); 161 nlmsg_free(msg);
158 return -ENOBUFS; 162 return -ENOBUFS;
159@@ -4508,7 +4508,7 @@ static int nl80211_get_mesh_config(struc 163@@ -4603,7 +4603,7 @@
160 msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); 164 msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
161 if (!msg) 165 if (!msg)
162 return -ENOMEM; 166 return -ENOMEM;
@@ -165,16 +169,16 @@ this one should other drivers / subsystem need this change.
165 NL80211_CMD_GET_MESH_CONFIG); 169 NL80211_CMD_GET_MESH_CONFIG);
166 if (!hdr) 170 if (!hdr)
167 goto out; 171 goto out;
168@@ -4858,7 +4858,7 @@ static int nl80211_get_reg(struct sk_buf 172@@ -4962,7 +4962,7 @@
169 goto out; 173 if (!msg)
170 } 174 return -ENOBUFS;
171 175
172- hdr = nl80211hdr_put(msg, info->snd_portid, info->snd_seq, 0, 176- hdr = nl80211hdr_put(msg, info->snd_portid, info->snd_seq, 0,
173+ hdr = nl80211hdr_put(msg, genl_info_snd_portid(info), info->snd_seq, 0, 177+ hdr = nl80211hdr_put(msg, genl_info_snd_portid(info), info->snd_seq, 0,
174 NL80211_CMD_GET_REG); 178 NL80211_CMD_GET_REG);
175 if (!hdr) 179 if (!hdr)
176 goto put_failure; 180 goto put_failure;
177@@ -5558,7 +5558,7 @@ static int nl80211_send_bss(struct sk_bu 181@@ -5802,7 +5802,7 @@
178 182
179 ASSERT_WDEV_LOCK(wdev); 183 ASSERT_WDEV_LOCK(wdev);
180 184
@@ -183,16 +187,16 @@ this one should other drivers / subsystem need this change.
183 NL80211_CMD_NEW_SCAN_RESULTS); 187 NL80211_CMD_NEW_SCAN_RESULTS);
184 if (!hdr) 188 if (!hdr)
185 return -1; 189 return -1;
186@@ -5789,7 +5789,7 @@ static int nl80211_dump_survey(struct sk 190@@ -6039,7 +6039,7 @@
187 } 191 }
188 192
189 if (nl80211_send_survey(skb, 193 if (nl80211_send_survey(skb,
190- NETLINK_CB(cb->skb).portid, 194- NETLINK_CB(cb->skb).portid,
191+ NETLINK_CB_PORTID(cb->skb), 195+ NETLINK_CB_PORTID(cb->skb),
192 cb->nlh->nlmsg_seq, NLM_F_MULTI, 196 cb->nlh->nlmsg_seq, NLM_F_MULTI,
193 netdev, 197 wdev->netdev, &survey) < 0)
194 &survey) < 0) 198 goto out;
195@@ -6448,7 +6448,7 @@ static int nl80211_testmode_dump(struct 199@@ -6737,7 +6737,7 @@
196 } 200 }
197 201
198 while (1) { 202 while (1) {
@@ -201,7 +205,7 @@ this one should other drivers / subsystem need this change.
201 cb->nlh->nlmsg_seq, NLM_F_MULTI, 205 cb->nlh->nlmsg_seq, NLM_F_MULTI,
202 NL80211_CMD_TESTMODE); 206 NL80211_CMD_TESTMODE);
203 struct nlattr *tmdata; 207 struct nlattr *tmdata;
204@@ -6527,7 +6527,7 @@ struct sk_buff *cfg80211_testmode_alloc_ 208@@ -6819,7 +6819,7 @@
205 return NULL; 209 return NULL;
206 210
207 return __cfg80211_testmode_alloc_skb(rdev, approxlen, 211 return __cfg80211_testmode_alloc_skb(rdev, approxlen,
@@ -210,16 +214,16 @@ this one should other drivers / subsystem need this change.
210 rdev->testmode_info->snd_seq, 214 rdev->testmode_info->snd_seq,
211 GFP_KERNEL); 215 GFP_KERNEL);
212 } 216 }
213@@ -6887,7 +6887,7 @@ static int nl80211_remain_on_channel(str 217@@ -7187,7 +7187,7 @@
214 if (!msg) 218 if (!msg)
215 return -ENOMEM; 219 return -ENOMEM;
216 220
217- hdr = nl80211hdr_put(msg, info->snd_portid, info->snd_seq, 0, 221- hdr = nl80211hdr_put(msg, info->snd_portid, info->snd_seq, 0,
218+ hdr = nl80211hdr_put(msg, genl_info_snd_portid(info), info->snd_seq, 0, 222+ hdr = nl80211hdr_put(msg, genl_info_snd_portid(info), info->snd_seq, 0,
219 NL80211_CMD_REMAIN_ON_CHANNEL); 223 NL80211_CMD_REMAIN_ON_CHANNEL);
220 224 if (!hdr) {
221 if (IS_ERR(hdr)) { 225 err = -ENOBUFS;
222@@ -7106,7 +7106,7 @@ static int nl80211_register_mgmt(struct 226@@ -7405,7 +7405,7 @@
223 if (!rdev->ops->mgmt_tx) 227 if (!rdev->ops->mgmt_tx)
224 return -EOPNOTSUPP; 228 return -EOPNOTSUPP;
225 229
@@ -228,16 +232,16 @@ this one should other drivers / subsystem need this change.
228 nla_data(info->attrs[NL80211_ATTR_FRAME_MATCH]), 232 nla_data(info->attrs[NL80211_ATTR_FRAME_MATCH]),
229 nla_len(info->attrs[NL80211_ATTR_FRAME_MATCH])); 233 nla_len(info->attrs[NL80211_ATTR_FRAME_MATCH]));
230 } 234 }
231@@ -7176,7 +7176,7 @@ static int nl80211_tx_mgmt(struct sk_buf 235@@ -7486,7 +7486,7 @@
232 if (!msg) 236 if (!msg)
233 return -ENOMEM; 237 return -ENOMEM;
234 238
235- hdr = nl80211hdr_put(msg, info->snd_portid, info->snd_seq, 0, 239- hdr = nl80211hdr_put(msg, info->snd_portid, info->snd_seq, 0,
236+ hdr = nl80211hdr_put(msg, genl_info_snd_portid(info), info->snd_seq, 0, 240+ hdr = nl80211hdr_put(msg, genl_info_snd_portid(info), info->snd_seq, 0,
237 NL80211_CMD_FRAME); 241 NL80211_CMD_FRAME);
238 242 if (!hdr) {
239 if (IS_ERR(hdr)) { 243 err = -ENOBUFS;
240@@ -7291,7 +7291,7 @@ static int nl80211_get_power_save(struct 244@@ -7600,7 +7600,7 @@
241 if (!msg) 245 if (!msg)
242 return -ENOMEM; 246 return -ENOMEM;
243 247
@@ -246,7 +250,7 @@ this one should other drivers / subsystem need this change.
246 NL80211_CMD_GET_POWER_SAVE); 250 NL80211_CMD_GET_POWER_SAVE);
247 if (!hdr) { 251 if (!hdr) {
248 err = -ENOBUFS; 252 err = -ENOBUFS;
249@@ -7583,7 +7583,7 @@ static int nl80211_get_wowlan(struct sk_ 253@@ -7907,7 +7907,7 @@
250 if (!msg) 254 if (!msg)
251 return -ENOMEM; 255 return -ENOMEM;
252 256
@@ -255,7 +259,16 @@ this one should other drivers / subsystem need this change.
255 NL80211_CMD_GET_WOWLAN); 259 NL80211_CMD_GET_WOWLAN);
256 if (!hdr) 260 if (!hdr)
257 goto nla_put_failure; 261 goto nla_put_failure;
258@@ -8007,7 +8007,7 @@ static int nl80211_register_unexpected_f 262@@ -8336,7 +8336,7 @@
263 if (!msg)
264 return -ENOMEM;
265
266- hdr = nl80211hdr_put(msg, info->snd_portid, info->snd_seq, 0,
267+ hdr = nl80211hdr_put(msg, genl_info_snd_portid(info), info->snd_seq, 0,
268 NL80211_CMD_GET_COALESCE);
269 if (!hdr)
270 goto nla_put_failure;
271@@ -8589,7 +8589,7 @@
259 if (wdev->ap_unexpected_nlportid) 272 if (wdev->ap_unexpected_nlportid)
260 return -EBUSY; 273 return -EBUSY;
261 274
@@ -264,16 +277,16 @@ this one should other drivers / subsystem need this change.
264 return 0; 277 return 0;
265 } 278 }
266 279
267@@ -8037,7 +8037,7 @@ static int nl80211_probe_client(struct s 280@@ -8619,7 +8619,7 @@
268 if (!msg) 281 if (!msg)
269 return -ENOMEM; 282 return -ENOMEM;
270 283
271- hdr = nl80211hdr_put(msg, info->snd_portid, info->snd_seq, 0, 284- hdr = nl80211hdr_put(msg, info->snd_portid, info->snd_seq, 0,
272+ hdr = nl80211hdr_put(msg, genl_info_snd_portid(info), info->snd_seq, 0, 285+ hdr = nl80211hdr_put(msg, genl_info_snd_portid(info), info->snd_seq, 0,
273 NL80211_CMD_PROBE_CLIENT); 286 NL80211_CMD_PROBE_CLIENT);
274 287 if (!hdr) {
275 if (IS_ERR(hdr)) { 288 err = -ENOBUFS;
276@@ -8081,13 +8081,13 @@ static int nl80211_register_beacons(stru 289@@ -8662,13 +8662,13 @@
277 /* First, check if already registered. */ 290 /* First, check if already registered. */
278 spin_lock_bh(&rdev->beacon_registrations_lock); 291 spin_lock_bh(&rdev->beacon_registrations_lock);
279 list_for_each_entry(reg, &rdev->beacon_registrations, list) { 292 list_for_each_entry(reg, &rdev->beacon_registrations, list) {
@@ -289,7 +302,7 @@ this one should other drivers / subsystem need this change.
289 list_add(&nreg->list, &rdev->beacon_registrations); 302 list_add(&nreg->list, &rdev->beacon_registrations);
290 303
291 spin_unlock_bh(&rdev->beacon_registrations_lock); 304 spin_unlock_bh(&rdev->beacon_registrations_lock);
292@@ -8160,7 +8160,7 @@ static int nl80211_get_protocol_features 305@@ -8735,7 +8735,7 @@
293 if (!msg) 306 if (!msg)
294 return -ENOMEM; 307 return -ENOMEM;
295 308
@@ -298,7 +311,7 @@ this one should other drivers / subsystem need this change.
298 NL80211_CMD_GET_PROTOCOL_FEATURES); 311 NL80211_CMD_GET_PROTOCOL_FEATURES);
299 if (!hdr) 312 if (!hdr)
300 goto nla_put_failure; 313 goto nla_put_failure;
301@@ -10565,12 +10565,12 @@ static int nl80211_netlink_notify(struct 314@@ -11212,12 +11212,12 @@
302 315
303 list_for_each_entry_rcu(rdev, &cfg80211_rdev_list, list) { 316 list_for_each_entry_rcu(rdev, &cfg80211_rdev_list, list) {
304 list_for_each_entry_rcu(wdev, &rdev->wdev_list, list) 317 list_for_each_entry_rcu(wdev, &rdev->wdev_list, list)