diff options
author | David S. Miller <davem@davemloft.net> | 2009-07-23 22:03:51 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-07-23 22:03:51 -0400 |
commit | 74d154189d597b91da4322996dbf4f5c3d1544ab (patch) | |
tree | 6f09861b5e2f875d2d8ea2127b16add9103221c6 /net | |
parent | 5a6338db37885af06760d40cad589316e48431e9 (diff) | |
parent | ffafa60d496f80c250f2ae0340ae94434c0b0b4d (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/wireless/iwmc3200wifi/netdev.c
net/wireless/scan.c
Diffstat (limited to 'net')
-rw-r--r-- | net/core/sock.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 3 | ||||
-rw-r--r-- | net/ipv4/tcp_output.c | 2 | ||||
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 3 | ||||
-rw-r--r-- | net/mac80211/Kconfig | 1 | ||||
-rw-r--r-- | net/mac80211/mesh_pathtbl.c | 11 | ||||
-rw-r--r-- | net/mac80211/tx.c | 2 | ||||
-rw-r--r-- | net/rfkill/core.c | 31 | ||||
-rw-r--r-- | net/wireless/nl80211.c | 5 | ||||
-rw-r--r-- | net/wireless/scan.c | 3 |
10 files changed, 43 insertions, 20 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index d9eec153d531..bbb25be7ddfe 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -631,7 +631,7 @@ set_rcvbuf: | |||
631 | 631 | ||
632 | case SO_TIMESTAMPING: | 632 | case SO_TIMESTAMPING: |
633 | if (val & ~SOF_TIMESTAMPING_MASK) { | 633 | if (val & ~SOF_TIMESTAMPING_MASK) { |
634 | ret = EINVAL; | 634 | ret = -EINVAL; |
635 | break; | 635 | break; |
636 | } | 636 | } |
637 | sock_valbool_flag(sk, SOCK_TIMESTAMPING_TX_HARDWARE, | 637 | sock_valbool_flag(sk, SOCK_TIMESTAMPING_TX_HARDWARE, |
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 5a1ca2698c88..6d88219c5e22 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -1160,6 +1160,7 @@ struct request_sock_ops tcp_request_sock_ops __read_mostly = { | |||
1160 | #ifdef CONFIG_TCP_MD5SIG | 1160 | #ifdef CONFIG_TCP_MD5SIG |
1161 | static struct tcp_request_sock_ops tcp_request_sock_ipv4_ops = { | 1161 | static struct tcp_request_sock_ops tcp_request_sock_ipv4_ops = { |
1162 | .md5_lookup = tcp_v4_reqsk_md5_lookup, | 1162 | .md5_lookup = tcp_v4_reqsk_md5_lookup, |
1163 | .calc_md5_hash = tcp_v4_md5_hash_skb, | ||
1163 | }; | 1164 | }; |
1164 | #endif | 1165 | #endif |
1165 | 1166 | ||
@@ -1373,7 +1374,7 @@ struct sock *tcp_v4_syn_recv_sock(struct sock *sk, struct sk_buff *skb, | |||
1373 | */ | 1374 | */ |
1374 | char *newkey = kmemdup(key->key, key->keylen, GFP_ATOMIC); | 1375 | char *newkey = kmemdup(key->key, key->keylen, GFP_ATOMIC); |
1375 | if (newkey != NULL) | 1376 | if (newkey != NULL) |
1376 | tcp_v4_md5_do_add(newsk, inet_sk(sk)->daddr, | 1377 | tcp_v4_md5_do_add(newsk, newinet->daddr, |
1377 | newkey, key->keylen); | 1378 | newkey, key->keylen); |
1378 | newsk->sk_route_caps &= ~NETIF_F_GSO_MASK; | 1379 | newsk->sk_route_caps &= ~NETIF_F_GSO_MASK; |
1379 | } | 1380 | } |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index c464892cf642..4e004424d400 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -2294,7 +2294,7 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst, | |||
2294 | #ifdef CONFIG_TCP_MD5SIG | 2294 | #ifdef CONFIG_TCP_MD5SIG |
2295 | /* Okay, we have all we need - do the md5 hash if needed */ | 2295 | /* Okay, we have all we need - do the md5 hash if needed */ |
2296 | if (md5) { | 2296 | if (md5) { |
2297 | tp->af_specific->calc_md5_hash(md5_hash_location, | 2297 | tcp_rsk(req)->af_specific->calc_md5_hash(md5_hash_location, |
2298 | md5, NULL, req, skb); | 2298 | md5, NULL, req, skb); |
2299 | } | 2299 | } |
2300 | #endif | 2300 | #endif |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 58810c65b635..d849dd53b788 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -896,6 +896,7 @@ struct request_sock_ops tcp6_request_sock_ops __read_mostly = { | |||
896 | #ifdef CONFIG_TCP_MD5SIG | 896 | #ifdef CONFIG_TCP_MD5SIG |
897 | static struct tcp_request_sock_ops tcp_request_sock_ipv6_ops = { | 897 | static struct tcp_request_sock_ops tcp_request_sock_ipv6_ops = { |
898 | .md5_lookup = tcp_v6_reqsk_md5_lookup, | 898 | .md5_lookup = tcp_v6_reqsk_md5_lookup, |
899 | .calc_md5_hash = tcp_v6_md5_hash_skb, | ||
899 | }; | 900 | }; |
900 | #endif | 901 | #endif |
901 | 902 | ||
@@ -1441,7 +1442,7 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, | |||
1441 | */ | 1442 | */ |
1442 | char *newkey = kmemdup(key->key, key->keylen, GFP_ATOMIC); | 1443 | char *newkey = kmemdup(key->key, key->keylen, GFP_ATOMIC); |
1443 | if (newkey != NULL) | 1444 | if (newkey != NULL) |
1444 | tcp_v6_md5_do_add(newsk, &inet6_sk(sk)->daddr, | 1445 | tcp_v6_md5_do_add(newsk, &newnp->daddr, |
1445 | newkey, key->keylen); | 1446 | newkey, key->keylen); |
1446 | } | 1447 | } |
1447 | #endif | 1448 | #endif |
diff --git a/net/mac80211/Kconfig b/net/mac80211/Kconfig index 41a32cd919af..182c9c5c6818 100644 --- a/net/mac80211/Kconfig +++ b/net/mac80211/Kconfig | |||
@@ -67,6 +67,7 @@ endmenu | |||
67 | config MAC80211_MESH | 67 | config MAC80211_MESH |
68 | bool "Enable mac80211 mesh networking (pre-802.11s) support" | 68 | bool "Enable mac80211 mesh networking (pre-802.11s) support" |
69 | depends on MAC80211 && EXPERIMENTAL | 69 | depends on MAC80211 && EXPERIMENTAL |
70 | depends on BROKEN | ||
70 | ---help--- | 71 | ---help--- |
71 | This options enables support of Draft 802.11s mesh networking. | 72 | This options enables support of Draft 802.11s mesh networking. |
72 | The implementation is based on Draft 1.08 of the Mesh Networking | 73 | The implementation is based on Draft 1.08 of the Mesh Networking |
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c index 3c72557df45a..479597e88583 100644 --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c | |||
@@ -175,6 +175,8 @@ int mesh_path_add(u8 *dst, struct ieee80211_sub_if_data *sdata) | |||
175 | int err = 0; | 175 | int err = 0; |
176 | u32 hash_idx; | 176 | u32 hash_idx; |
177 | 177 | ||
178 | might_sleep(); | ||
179 | |||
178 | if (memcmp(dst, sdata->dev->dev_addr, ETH_ALEN) == 0) | 180 | if (memcmp(dst, sdata->dev->dev_addr, ETH_ALEN) == 0) |
179 | /* never add ourselves as neighbours */ | 181 | /* never add ourselves as neighbours */ |
180 | return -ENOTSUPP; | 182 | return -ENOTSUPP; |
@@ -265,6 +267,7 @@ int mpp_path_add(u8 *dst, u8 *mpp, struct ieee80211_sub_if_data *sdata) | |||
265 | int err = 0; | 267 | int err = 0; |
266 | u32 hash_idx; | 268 | u32 hash_idx; |
267 | 269 | ||
270 | might_sleep(); | ||
268 | 271 | ||
269 | if (memcmp(dst, sdata->dev->dev_addr, ETH_ALEN) == 0) | 272 | if (memcmp(dst, sdata->dev->dev_addr, ETH_ALEN) == 0) |
270 | /* never add ourselves as neighbours */ | 273 | /* never add ourselves as neighbours */ |
@@ -491,8 +494,10 @@ void mesh_path_tx_pending(struct mesh_path *mpath) | |||
491 | * @skb: frame to discard | 494 | * @skb: frame to discard |
492 | * @sdata: network subif the frame was to be sent through | 495 | * @sdata: network subif the frame was to be sent through |
493 | * | 496 | * |
494 | * If the frame was beign forwarded from another MP, a PERR frame will be sent | 497 | * If the frame was being forwarded from another MP, a PERR frame will be sent |
495 | * to the precursor. | 498 | * to the precursor. The precursor's address (i.e. the previous hop) was saved |
499 | * in addr1 of the frame-to-be-forwarded, and would only be overwritten once | ||
500 | * the destination is successfully resolved. | ||
496 | * | 501 | * |
497 | * Locking: the function must me called within a rcu_read_lock region | 502 | * Locking: the function must me called within a rcu_read_lock region |
498 | */ | 503 | */ |
@@ -507,7 +512,7 @@ void mesh_path_discard_frame(struct sk_buff *skb, | |||
507 | u8 *ra, *da; | 512 | u8 *ra, *da; |
508 | 513 | ||
509 | da = hdr->addr3; | 514 | da = hdr->addr3; |
510 | ra = hdr->addr2; | 515 | ra = hdr->addr1; |
511 | mpath = mesh_path_lookup(da, sdata); | 516 | mpath = mesh_path_lookup(da, sdata); |
512 | if (mpath) | 517 | if (mpath) |
513 | dsn = ++mpath->dsn; | 518 | dsn = ++mpath->dsn; |
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 2ffb35d3f566..60ae086995b1 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -1455,7 +1455,7 @@ int ieee80211_master_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1455 | monitor_iface = UNKNOWN_ADDRESS; | 1455 | monitor_iface = UNKNOWN_ADDRESS; |
1456 | 1456 | ||
1457 | len_rthdr = ieee80211_get_radiotap_len(skb->data); | 1457 | len_rthdr = ieee80211_get_radiotap_len(skb->data); |
1458 | hdr = (struct ieee80211_hdr *)skb->data + len_rthdr; | 1458 | hdr = (struct ieee80211_hdr *)(skb->data + len_rthdr); |
1459 | hdrlen = ieee80211_hdrlen(hdr->frame_control); | 1459 | hdrlen = ieee80211_hdrlen(hdr->frame_control); |
1460 | 1460 | ||
1461 | /* check the header is complete in the frame */ | 1461 | /* check the header is complete in the frame */ |
diff --git a/net/rfkill/core.c b/net/rfkill/core.c index 47497c97c8d9..044de1c6af3d 100644 --- a/net/rfkill/core.c +++ b/net/rfkill/core.c | |||
@@ -549,6 +549,10 @@ void rfkill_set_states(struct rfkill *rfkill, bool sw, bool hw) | |||
549 | swprev = !!(rfkill->state & RFKILL_BLOCK_SW); | 549 | swprev = !!(rfkill->state & RFKILL_BLOCK_SW); |
550 | hwprev = !!(rfkill->state & RFKILL_BLOCK_HW); | 550 | hwprev = !!(rfkill->state & RFKILL_BLOCK_HW); |
551 | __rfkill_set_sw_state(rfkill, sw); | 551 | __rfkill_set_sw_state(rfkill, sw); |
552 | if (hw) | ||
553 | rfkill->state |= RFKILL_BLOCK_HW; | ||
554 | else | ||
555 | rfkill->state &= ~RFKILL_BLOCK_HW; | ||
552 | 556 | ||
553 | spin_unlock_irqrestore(&rfkill->lock, flags); | 557 | spin_unlock_irqrestore(&rfkill->lock, flags); |
554 | 558 | ||
@@ -648,15 +652,26 @@ static ssize_t rfkill_state_store(struct device *dev, | |||
648 | struct device_attribute *attr, | 652 | struct device_attribute *attr, |
649 | const char *buf, size_t count) | 653 | const char *buf, size_t count) |
650 | { | 654 | { |
651 | /* | 655 | struct rfkill *rfkill = to_rfkill(dev); |
652 | * The intention was that userspace can only take control over | 656 | unsigned long state; |
653 | * a given device when/if rfkill-input doesn't control it due | 657 | int err; |
654 | * to user_claim. Since user_claim is currently unsupported, | 658 | |
655 | * we never support changing the state from userspace -- this | 659 | if (!capable(CAP_NET_ADMIN)) |
656 | * can be implemented again later. | 660 | return -EPERM; |
657 | */ | 661 | |
662 | err = strict_strtoul(buf, 0, &state); | ||
663 | if (err) | ||
664 | return err; | ||
665 | |||
666 | if (state != RFKILL_USER_STATE_SOFT_BLOCKED && | ||
667 | state != RFKILL_USER_STATE_UNBLOCKED) | ||
668 | return -EINVAL; | ||
669 | |||
670 | mutex_lock(&rfkill_global_mutex); | ||
671 | rfkill_set_block(rfkill, state == RFKILL_USER_STATE_SOFT_BLOCKED); | ||
672 | mutex_unlock(&rfkill_global_mutex); | ||
658 | 673 | ||
659 | return -EPERM; | 674 | return err ?: count; |
660 | } | 675 | } |
661 | 676 | ||
662 | static ssize_t rfkill_claim_show(struct device *dev, | 677 | static ssize_t rfkill_claim_show(struct device *dev, |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 2a04beba4369..4478760b7dc3 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -1010,7 +1010,7 @@ static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info) | |||
1010 | 1010 | ||
1011 | if (IS_ERR(hdr)) { | 1011 | if (IS_ERR(hdr)) { |
1012 | err = PTR_ERR(hdr); | 1012 | err = PTR_ERR(hdr); |
1013 | goto out; | 1013 | goto free_msg; |
1014 | } | 1014 | } |
1015 | 1015 | ||
1016 | cookie.msg = msg; | 1016 | cookie.msg = msg; |
@@ -1024,7 +1024,7 @@ static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info) | |||
1024 | &cookie, get_key_callback); | 1024 | &cookie, get_key_callback); |
1025 | 1025 | ||
1026 | if (err) | 1026 | if (err) |
1027 | goto out; | 1027 | goto free_msg; |
1028 | 1028 | ||
1029 | if (cookie.error) | 1029 | if (cookie.error) |
1030 | goto nla_put_failure; | 1030 | goto nla_put_failure; |
@@ -1035,6 +1035,7 @@ static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info) | |||
1035 | 1035 | ||
1036 | nla_put_failure: | 1036 | nla_put_failure: |
1037 | err = -ENOBUFS; | 1037 | err = -ENOBUFS; |
1038 | free_msg: | ||
1038 | nlmsg_free(msg); | 1039 | nlmsg_free(msg); |
1039 | out: | 1040 | out: |
1040 | cfg80211_unlock_rdev(rdev); | 1041 | cfg80211_unlock_rdev(rdev); |
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 4f552c3f29a3..decc59fe0ee8 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c | |||
@@ -48,8 +48,6 @@ void __cfg80211_scan_done(struct work_struct *wk) | |||
48 | else | 48 | else |
49 | nl80211_send_scan_done(wiphy_to_dev(request->wiphy), dev); | 49 | nl80211_send_scan_done(wiphy_to_dev(request->wiphy), dev); |
50 | 50 | ||
51 | wiphy_to_dev(request->wiphy)->scan_req = NULL; | ||
52 | |||
53 | #ifdef CONFIG_WIRELESS_EXT | 51 | #ifdef CONFIG_WIRELESS_EXT |
54 | if (!request->aborted) { | 52 | if (!request->aborted) { |
55 | memset(&wrqu, 0, sizeof(wrqu)); | 53 | memset(&wrqu, 0, sizeof(wrqu)); |
@@ -62,6 +60,7 @@ void __cfg80211_scan_done(struct work_struct *wk) | |||
62 | 60 | ||
63 | out: | 61 | out: |
64 | cfg80211_unlock_rdev(rdev); | 62 | cfg80211_unlock_rdev(rdev); |
63 | wiphy_to_dev(request->wiphy)->scan_req = NULL; | ||
65 | kfree(request); | 64 | kfree(request); |
66 | } | 65 | } |
67 | 66 | ||