diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-04-02 20:53:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-04-02 20:53:39 -0400 |
commit | ed359a3b7b6ade0071f378c0cf4392d252f7d334 (patch) | |
tree | 8f81e03fcb44a7d36f53bc5a53d8eced7154bee2 /net | |
parent | 95694129b43165911dc4e8a972f0d39ad98d86be (diff) | |
parent | 2240eb4ae3dc4acff20d1a8947c441c451513e37 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:
1) Provide device string properly for USB i2400m wimax devices, also
don't OOPS when providing firmware string. From Phil Sutter.
2) Add support for sh_eth SH7734 chips, from Nobuhiro Iwamatsu.
3) Add another device ID to USB zaurus driver, from Guan Xin.
4) Loop index start in pool vector iterator is wrong causing MAC to not
get configured in bnx2x driver, fix from Dmitry Kravkov.
5) EQL driver assumes HZ=100, fix from Eric Dumazet.
6) Now that skb_add_rx_frag() can specify the truesize increment
separately, do so in f_phonet and cdc_phonet, also from Eric
Dumazet.
7) virtio_net accidently uses net_ratelimit() not only on the kernel
warning but also the statistic bump, fix from Rick Jones.
8) ip_route_input_mc() uses fixed init_net namespace, oops, use
dev_net(dev) instead. Fix from Benjamin LaHaise.
9) dev_forward_skb() needs to clear the incoming interface index of the
SKB so that it looks like a new incoming packet, also from Benjamin
LaHaise.
10) iwlwifi mistakenly initializes a channel entry as 2GHZ instead of
5GHZ, fix from Stanislav Yakovlev.
11) Missing kmalloc() return value checks in orinoco, from Santosh
Nayak.
12) ath9k doesn't check for HT capabilities in the right way, it is
checking ht_supported instead of the ATH9K_HW_CAP_HT flag. Fix from
Sujith Manoharan.
13) Fix x86 BPF JIT emission of 16-bit immediate field of AND
instructions, from Feiran Zhuang.
14) Avoid infinite loop in GARP code when registering sysfs entries.
From David Ward.
15) rose protocol uses memcpy instead of memcmp in a device address
comparison, oops. Fix from Daniel Borkmann.
16) Fix build of lpc_eth due to dev_hw_addr_rancom() interface being
renamed to eth_hw_addr_random(). From Roland Stigge.
17) Make ipv6 RTM_GETROUTE interpret RTA_IIF attribute the same way
that ipv4 does. Fix from Shmulik Ladkani.
18) via-rhine has an inverted bit test, causing suspend/resume
regressions. Fix from Andreas Mohr.
19) RIONET assumes 4K page size, fix from Akinobu Mita.
20) Initialization of imask register in sky2 is buggy, because bits are
"or'd" into an uninitialized local variable. Fix from Lino
Sanfilippo.
21) Fix FCOE checksum offload handling, from Yi Zou.
22) Fix VLAN processing regression in e1000, from Jiri Pirko.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (52 commits)
sky2: dont overwrite settings for PHY Quick link
tg3: Fix 5717 serdes powerdown problem
net: usb: cdc_eem: fix mtu
net: sh_eth: fix endian check for architecture independent
usb/rtl8150 : Remove duplicated definitions
rionet: fix page allocation order of rionet_active
via-rhine: fix wait-bit inversion.
ipv6: Fix RTM_GETROUTE's interpretation of RTA_IIF to be consistent with ipv4
net: lpc_eth: Fix rename of dev_hw_addr_random
net/netfilter/nfnetlink_acct.c: use linux/atomic.h
rose_dev: fix memcpy-bug in rose_set_mac_address
Fix non TBI PHY access; a bad merge undid bug fix in a previous commit.
net/garp: avoid infinite loop if attribute already exists
x86 bpf_jit: fix a bug in emitting the 16-bit immediate operand of AND
bonding: emit event when bonding changes MAC
mac80211: fix oper channel timestamp updation
ath9k: Use HW HT capabilites properly
MAINTAINERS: adding maintainer for ipw2x00
net: orinoco: add error handling for failed kmalloc().
net/wireless: ipw2x00: fix a typo in wiphy struct initilization
...
Diffstat (limited to 'net')
-rw-r--r-- | net/802/garp.c | 22 | ||||
-rw-r--r-- | net/core/dev.c | 1 | ||||
-rw-r--r-- | net/ipv4/route.c | 2 | ||||
-rw-r--r-- | net/ipv6/route.c | 34 | ||||
-rw-r--r-- | net/mac80211/agg-rx.c | 3 | ||||
-rw-r--r-- | net/mac80211/main.c | 3 | ||||
-rw-r--r-- | net/mac80211/scan.c | 2 | ||||
-rw-r--r-- | net/netfilter/nfnetlink_acct.c | 2 | ||||
-rw-r--r-- | net/rose/rose_dev.c | 4 | ||||
-rw-r--r-- | net/wireless/nl80211.c | 29 |
10 files changed, 64 insertions, 38 deletions
diff --git a/net/802/garp.c b/net/802/garp.c index 8e21b6db3981..a5c224830439 100644 --- a/net/802/garp.c +++ b/net/802/garp.c | |||
@@ -167,7 +167,8 @@ static struct garp_attr *garp_attr_lookup(const struct garp_applicant *app, | |||
167 | return NULL; | 167 | return NULL; |
168 | } | 168 | } |
169 | 169 | ||
170 | static void garp_attr_insert(struct garp_applicant *app, struct garp_attr *new) | 170 | static struct garp_attr *garp_attr_create(struct garp_applicant *app, |
171 | const void *data, u8 len, u8 type) | ||
171 | { | 172 | { |
172 | struct rb_node *parent = NULL, **p = &app->gid.rb_node; | 173 | struct rb_node *parent = NULL, **p = &app->gid.rb_node; |
173 | struct garp_attr *attr; | 174 | struct garp_attr *attr; |
@@ -176,21 +177,16 @@ static void garp_attr_insert(struct garp_applicant *app, struct garp_attr *new) | |||
176 | while (*p) { | 177 | while (*p) { |
177 | parent = *p; | 178 | parent = *p; |
178 | attr = rb_entry(parent, struct garp_attr, node); | 179 | attr = rb_entry(parent, struct garp_attr, node); |
179 | d = garp_attr_cmp(attr, new->data, new->dlen, new->type); | 180 | d = garp_attr_cmp(attr, data, len, type); |
180 | if (d < 0) | 181 | if (d < 0) |
181 | p = &parent->rb_left; | 182 | p = &parent->rb_left; |
182 | else if (d > 0) | 183 | else if (d > 0) |
183 | p = &parent->rb_right; | 184 | p = &parent->rb_right; |
185 | else { | ||
186 | /* The attribute already exists; re-use it. */ | ||
187 | return attr; | ||
188 | } | ||
184 | } | 189 | } |
185 | rb_link_node(&new->node, parent, p); | ||
186 | rb_insert_color(&new->node, &app->gid); | ||
187 | } | ||
188 | |||
189 | static struct garp_attr *garp_attr_create(struct garp_applicant *app, | ||
190 | const void *data, u8 len, u8 type) | ||
191 | { | ||
192 | struct garp_attr *attr; | ||
193 | |||
194 | attr = kmalloc(sizeof(*attr) + len, GFP_ATOMIC); | 190 | attr = kmalloc(sizeof(*attr) + len, GFP_ATOMIC); |
195 | if (!attr) | 191 | if (!attr) |
196 | return attr; | 192 | return attr; |
@@ -198,7 +194,9 @@ static struct garp_attr *garp_attr_create(struct garp_applicant *app, | |||
198 | attr->type = type; | 194 | attr->type = type; |
199 | attr->dlen = len; | 195 | attr->dlen = len; |
200 | memcpy(attr->data, data, len); | 196 | memcpy(attr->data, data, len); |
201 | garp_attr_insert(app, attr); | 197 | |
198 | rb_link_node(&attr->node, parent, p); | ||
199 | rb_insert_color(&attr->node, &app->gid); | ||
202 | return attr; | 200 | return attr; |
203 | } | 201 | } |
204 | 202 | ||
diff --git a/net/core/dev.c b/net/core/dev.c index 5d59155adf2a..6c7dc9d78e10 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1596,6 +1596,7 @@ int dev_forward_skb(struct net_device *dev, struct sk_buff *skb) | |||
1596 | kfree_skb(skb); | 1596 | kfree_skb(skb); |
1597 | return NET_RX_DROP; | 1597 | return NET_RX_DROP; |
1598 | } | 1598 | } |
1599 | skb->skb_iif = 0; | ||
1599 | skb_set_dev(skb, dev); | 1600 | skb_set_dev(skb, dev); |
1600 | skb->tstamp.tv64 = 0; | 1601 | skb->tstamp.tv64 = 0; |
1601 | skb->pkt_type = PACKET_HOST; | 1602 | skb->pkt_type = PACKET_HOST; |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 4dc1c104c942..167ea10b521a 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -2041,7 +2041,7 @@ static int ip_route_input_mc(struct sk_buff *skb, __be32 daddr, __be32 saddr, | |||
2041 | if (err < 0) | 2041 | if (err < 0) |
2042 | goto e_err; | 2042 | goto e_err; |
2043 | } | 2043 | } |
2044 | rth = rt_dst_alloc(init_net.loopback_dev, | 2044 | rth = rt_dst_alloc(dev_net(dev)->loopback_dev, |
2045 | IN_DEV_CONF_GET(in_dev, NOPOLICY), false); | 2045 | IN_DEV_CONF_GET(in_dev, NOPOLICY), false); |
2046 | if (!rth) | 2046 | if (!rth) |
2047 | goto e_nobufs; | 2047 | goto e_nobufs; |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 496b62712fe8..3992e26a6039 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -881,6 +881,16 @@ static struct rt6_info *ip6_pol_route_input(struct net *net, struct fib6_table * | |||
881 | return ip6_pol_route(net, table, fl6->flowi6_iif, fl6, flags); | 881 | return ip6_pol_route(net, table, fl6->flowi6_iif, fl6, flags); |
882 | } | 882 | } |
883 | 883 | ||
884 | static struct dst_entry *ip6_route_input_lookup(struct net *net, | ||
885 | struct net_device *dev, | ||
886 | struct flowi6 *fl6, int flags) | ||
887 | { | ||
888 | if (rt6_need_strict(&fl6->daddr) && dev->type != ARPHRD_PIMREG) | ||
889 | flags |= RT6_LOOKUP_F_IFACE; | ||
890 | |||
891 | return fib6_rule_lookup(net, fl6, flags, ip6_pol_route_input); | ||
892 | } | ||
893 | |||
884 | void ip6_route_input(struct sk_buff *skb) | 894 | void ip6_route_input(struct sk_buff *skb) |
885 | { | 895 | { |
886 | const struct ipv6hdr *iph = ipv6_hdr(skb); | 896 | const struct ipv6hdr *iph = ipv6_hdr(skb); |
@@ -895,10 +905,7 @@ void ip6_route_input(struct sk_buff *skb) | |||
895 | .flowi6_proto = iph->nexthdr, | 905 | .flowi6_proto = iph->nexthdr, |
896 | }; | 906 | }; |
897 | 907 | ||
898 | if (rt6_need_strict(&iph->daddr) && skb->dev->type != ARPHRD_PIMREG) | 908 | skb_dst_set(skb, ip6_route_input_lookup(net, skb->dev, &fl6, flags)); |
899 | flags |= RT6_LOOKUP_F_IFACE; | ||
900 | |||
901 | skb_dst_set(skb, fib6_rule_lookup(net, &fl6, flags, ip6_pol_route_input)); | ||
902 | } | 909 | } |
903 | 910 | ||
904 | static struct rt6_info *ip6_pol_route_output(struct net *net, struct fib6_table *table, | 911 | static struct rt6_info *ip6_pol_route_output(struct net *net, struct fib6_table *table, |
@@ -2537,7 +2544,7 @@ static int inet6_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh, void | |||
2537 | struct sk_buff *skb; | 2544 | struct sk_buff *skb; |
2538 | struct rtmsg *rtm; | 2545 | struct rtmsg *rtm; |
2539 | struct flowi6 fl6; | 2546 | struct flowi6 fl6; |
2540 | int err, iif = 0; | 2547 | int err, iif = 0, oif = 0; |
2541 | 2548 | ||
2542 | err = nlmsg_parse(nlh, sizeof(*rtm), tb, RTA_MAX, rtm_ipv6_policy); | 2549 | err = nlmsg_parse(nlh, sizeof(*rtm), tb, RTA_MAX, rtm_ipv6_policy); |
2543 | if (err < 0) | 2550 | if (err < 0) |
@@ -2564,15 +2571,29 @@ static int inet6_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh, void | |||
2564 | iif = nla_get_u32(tb[RTA_IIF]); | 2571 | iif = nla_get_u32(tb[RTA_IIF]); |
2565 | 2572 | ||
2566 | if (tb[RTA_OIF]) | 2573 | if (tb[RTA_OIF]) |
2567 | fl6.flowi6_oif = nla_get_u32(tb[RTA_OIF]); | 2574 | oif = nla_get_u32(tb[RTA_OIF]); |
2568 | 2575 | ||
2569 | if (iif) { | 2576 | if (iif) { |
2570 | struct net_device *dev; | 2577 | struct net_device *dev; |
2578 | int flags = 0; | ||
2579 | |||
2571 | dev = __dev_get_by_index(net, iif); | 2580 | dev = __dev_get_by_index(net, iif); |
2572 | if (!dev) { | 2581 | if (!dev) { |
2573 | err = -ENODEV; | 2582 | err = -ENODEV; |
2574 | goto errout; | 2583 | goto errout; |
2575 | } | 2584 | } |
2585 | |||
2586 | fl6.flowi6_iif = iif; | ||
2587 | |||
2588 | if (!ipv6_addr_any(&fl6.saddr)) | ||
2589 | flags |= RT6_LOOKUP_F_HAS_SADDR; | ||
2590 | |||
2591 | rt = (struct rt6_info *)ip6_route_input_lookup(net, dev, &fl6, | ||
2592 | flags); | ||
2593 | } else { | ||
2594 | fl6.flowi6_oif = oif; | ||
2595 | |||
2596 | rt = (struct rt6_info *)ip6_route_output(net, NULL, &fl6); | ||
2576 | } | 2597 | } |
2577 | 2598 | ||
2578 | skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL); | 2599 | skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL); |
@@ -2587,7 +2608,6 @@ static int inet6_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh, void | |||
2587 | skb_reset_mac_header(skb); | 2608 | skb_reset_mac_header(skb); |
2588 | skb_reserve(skb, MAX_HEADER + sizeof(struct ipv6hdr)); | 2609 | skb_reserve(skb, MAX_HEADER + sizeof(struct ipv6hdr)); |
2589 | 2610 | ||
2590 | rt = (struct rt6_info*) ip6_route_output(net, NULL, &fl6); | ||
2591 | skb_dst_set(skb, &rt->dst); | 2611 | skb_dst_set(skb, &rt->dst); |
2592 | 2612 | ||
2593 | err = rt6_fill_node(net, skb, rt, &fl6.daddr, &fl6.saddr, iif, | 2613 | err = rt6_fill_node(net, skb, rt, &fl6.daddr, &fl6.saddr, iif, |
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c index 1068f668ac4e..64d3ce5ea1a0 100644 --- a/net/mac80211/agg-rx.c +++ b/net/mac80211/agg-rx.c | |||
@@ -49,6 +49,8 @@ static void ieee80211_free_tid_rx(struct rcu_head *h) | |||
49 | container_of(h, struct tid_ampdu_rx, rcu_head); | 49 | container_of(h, struct tid_ampdu_rx, rcu_head); |
50 | int i; | 50 | int i; |
51 | 51 | ||
52 | del_timer_sync(&tid_rx->reorder_timer); | ||
53 | |||
52 | for (i = 0; i < tid_rx->buf_size; i++) | 54 | for (i = 0; i < tid_rx->buf_size; i++) |
53 | dev_kfree_skb(tid_rx->reorder_buf[i]); | 55 | dev_kfree_skb(tid_rx->reorder_buf[i]); |
54 | kfree(tid_rx->reorder_buf); | 56 | kfree(tid_rx->reorder_buf); |
@@ -91,7 +93,6 @@ void ___ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid, | |||
91 | tid, WLAN_BACK_RECIPIENT, reason); | 93 | tid, WLAN_BACK_RECIPIENT, reason); |
92 | 94 | ||
93 | del_timer_sync(&tid_rx->session_timer); | 95 | del_timer_sync(&tid_rx->session_timer); |
94 | del_timer_sync(&tid_rx->reorder_timer); | ||
95 | 96 | ||
96 | call_rcu(&tid_rx->rcu_head, ieee80211_free_tid_rx); | 97 | call_rcu(&tid_rx->rcu_head, ieee80211_free_tid_rx); |
97 | } | 98 | } |
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index b581a24fa15c..16336480c631 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -102,9 +102,6 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed) | |||
102 | 102 | ||
103 | might_sleep(); | 103 | might_sleep(); |
104 | 104 | ||
105 | /* If this off-channel logic ever changes, ieee80211_on_oper_channel | ||
106 | * may need to change as well. | ||
107 | */ | ||
108 | offchannel_flag = local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL; | 105 | offchannel_flag = local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL; |
109 | if (local->scan_channel) { | 106 | if (local->scan_channel) { |
110 | chan = local->scan_channel; | 107 | chan = local->scan_channel; |
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 33cd16901378..c70e17677135 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -370,7 +370,7 @@ static int ieee80211_start_sw_scan(struct ieee80211_local *local) | |||
370 | */ | 370 | */ |
371 | drv_sw_scan_start(local); | 371 | drv_sw_scan_start(local); |
372 | 372 | ||
373 | local->leave_oper_channel_time = 0; | 373 | local->leave_oper_channel_time = jiffies; |
374 | local->next_scan_state = SCAN_DECISION; | 374 | local->next_scan_state = SCAN_DECISION; |
375 | local->scan_channel_idx = 0; | 375 | local->scan_channel_idx = 0; |
376 | 376 | ||
diff --git a/net/netfilter/nfnetlink_acct.c b/net/netfilter/nfnetlink_acct.c index 3eb348bfc4fb..d98c868c148b 100644 --- a/net/netfilter/nfnetlink_acct.c +++ b/net/netfilter/nfnetlink_acct.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/skbuff.h> | 12 | #include <linux/skbuff.h> |
13 | #include <linux/atomic.h> | ||
13 | #include <linux/netlink.h> | 14 | #include <linux/netlink.h> |
14 | #include <linux/rculist.h> | 15 | #include <linux/rculist.h> |
15 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
@@ -17,7 +18,6 @@ | |||
17 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
18 | #include <net/netlink.h> | 19 | #include <net/netlink.h> |
19 | #include <net/sock.h> | 20 | #include <net/sock.h> |
20 | #include <asm/atomic.h> | ||
21 | 21 | ||
22 | #include <linux/netfilter.h> | 22 | #include <linux/netfilter.h> |
23 | #include <linux/netfilter/nfnetlink.h> | 23 | #include <linux/netfilter/nfnetlink.h> |
diff --git a/net/rose/rose_dev.c b/net/rose/rose_dev.c index 1ab8689726ec..906cc05bba63 100644 --- a/net/rose/rose_dev.c +++ b/net/rose/rose_dev.c | |||
@@ -95,11 +95,11 @@ static int rose_set_mac_address(struct net_device *dev, void *addr) | |||
95 | struct sockaddr *sa = addr; | 95 | struct sockaddr *sa = addr; |
96 | int err; | 96 | int err; |
97 | 97 | ||
98 | if (!memcpy(dev->dev_addr, sa->sa_data, dev->addr_len)) | 98 | if (!memcmp(dev->dev_addr, sa->sa_data, dev->addr_len)) |
99 | return 0; | 99 | return 0; |
100 | 100 | ||
101 | if (dev->flags & IFF_UP) { | 101 | if (dev->flags & IFF_UP) { |
102 | err = rose_add_loopback_node((rose_address *)dev->dev_addr); | 102 | err = rose_add_loopback_node((rose_address *)sa->sa_data); |
103 | if (err) | 103 | if (err) |
104 | return err; | 104 | return err; |
105 | 105 | ||
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 4c1eb9472ddb..e49da2797022 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -2386,7 +2386,9 @@ nla_put_failure: | |||
2386 | } | 2386 | } |
2387 | 2387 | ||
2388 | static int nl80211_send_station(struct sk_buff *msg, u32 pid, u32 seq, | 2388 | static int nl80211_send_station(struct sk_buff *msg, u32 pid, u32 seq, |
2389 | int flags, struct net_device *dev, | 2389 | int flags, |
2390 | struct cfg80211_registered_device *rdev, | ||
2391 | struct net_device *dev, | ||
2390 | const u8 *mac_addr, struct station_info *sinfo) | 2392 | const u8 *mac_addr, struct station_info *sinfo) |
2391 | { | 2393 | { |
2392 | void *hdr; | 2394 | void *hdr; |
@@ -2425,12 +2427,18 @@ static int nl80211_send_station(struct sk_buff *msg, u32 pid, u32 seq, | |||
2425 | if (sinfo->filled & STATION_INFO_PLINK_STATE) | 2427 | if (sinfo->filled & STATION_INFO_PLINK_STATE) |
2426 | NLA_PUT_U8(msg, NL80211_STA_INFO_PLINK_STATE, | 2428 | NLA_PUT_U8(msg, NL80211_STA_INFO_PLINK_STATE, |
2427 | sinfo->plink_state); | 2429 | sinfo->plink_state); |
2428 | if (sinfo->filled & STATION_INFO_SIGNAL) | 2430 | switch (rdev->wiphy.signal_type) { |
2429 | NLA_PUT_U8(msg, NL80211_STA_INFO_SIGNAL, | 2431 | case CFG80211_SIGNAL_TYPE_MBM: |
2430 | sinfo->signal); | 2432 | if (sinfo->filled & STATION_INFO_SIGNAL) |
2431 | if (sinfo->filled & STATION_INFO_SIGNAL_AVG) | 2433 | NLA_PUT_U8(msg, NL80211_STA_INFO_SIGNAL, |
2432 | NLA_PUT_U8(msg, NL80211_STA_INFO_SIGNAL_AVG, | 2434 | sinfo->signal); |
2433 | sinfo->signal_avg); | 2435 | if (sinfo->filled & STATION_INFO_SIGNAL_AVG) |
2436 | NLA_PUT_U8(msg, NL80211_STA_INFO_SIGNAL_AVG, | ||
2437 | sinfo->signal_avg); | ||
2438 | break; | ||
2439 | default: | ||
2440 | break; | ||
2441 | } | ||
2434 | if (sinfo->filled & STATION_INFO_TX_BITRATE) { | 2442 | if (sinfo->filled & STATION_INFO_TX_BITRATE) { |
2435 | if (!nl80211_put_sta_rate(msg, &sinfo->txrate, | 2443 | if (!nl80211_put_sta_rate(msg, &sinfo->txrate, |
2436 | NL80211_STA_INFO_TX_BITRATE)) | 2444 | NL80211_STA_INFO_TX_BITRATE)) |
@@ -2523,7 +2531,7 @@ static int nl80211_dump_station(struct sk_buff *skb, | |||
2523 | if (nl80211_send_station(skb, | 2531 | if (nl80211_send_station(skb, |
2524 | NETLINK_CB(cb->skb).pid, | 2532 | NETLINK_CB(cb->skb).pid, |
2525 | cb->nlh->nlmsg_seq, NLM_F_MULTI, | 2533 | cb->nlh->nlmsg_seq, NLM_F_MULTI, |
2526 | netdev, mac_addr, | 2534 | dev, netdev, mac_addr, |
2527 | &sinfo) < 0) | 2535 | &sinfo) < 0) |
2528 | goto out; | 2536 | goto out; |
2529 | 2537 | ||
@@ -2568,7 +2576,7 @@ static int nl80211_get_station(struct sk_buff *skb, struct genl_info *info) | |||
2568 | return -ENOMEM; | 2576 | return -ENOMEM; |
2569 | 2577 | ||
2570 | if (nl80211_send_station(msg, info->snd_pid, info->snd_seq, 0, | 2578 | if (nl80211_send_station(msg, info->snd_pid, info->snd_seq, 0, |
2571 | dev, mac_addr, &sinfo) < 0) { | 2579 | rdev, dev, mac_addr, &sinfo) < 0) { |
2572 | nlmsg_free(msg); | 2580 | nlmsg_free(msg); |
2573 | return -ENOBUFS; | 2581 | return -ENOBUFS; |
2574 | } | 2582 | } |
@@ -7596,7 +7604,8 @@ void nl80211_send_sta_event(struct cfg80211_registered_device *rdev, | |||
7596 | if (!msg) | 7604 | if (!msg) |
7597 | return; | 7605 | return; |
7598 | 7606 | ||
7599 | if (nl80211_send_station(msg, 0, 0, 0, dev, mac_addr, sinfo) < 0) { | 7607 | if (nl80211_send_station(msg, 0, 0, 0, |
7608 | rdev, dev, mac_addr, sinfo) < 0) { | ||
7600 | nlmsg_free(msg); | 7609 | nlmsg_free(msg); |
7601 | return; | 7610 | return; |
7602 | } | 7611 | } |