diff options
author | David S. Miller <davem@davemloft.net> | 2009-07-30 22:22:43 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-07-30 22:22:43 -0400 |
commit | df597efb5737063497f1a4f7c996cc9aec294230 (patch) | |
tree | 17bb60f68ee299d9717038197a932501625f1621 /net | |
parent | a33bc5c15154c835aae26f16e6a3a7d9ad4acb45 (diff) | |
parent | 0a924578bc4a2823a95c151f56975c71f5c156bb (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/wireless/iwlwifi/iwl-3945.h
drivers/net/wireless/iwlwifi/iwl-tx.c
drivers/net/wireless/iwlwifi/iwl3945-base.c
Diffstat (limited to 'net')
-rw-r--r-- | net/bridge/br_if.c | 2 | ||||
-rw-r--r-- | net/ipv4/arp.c | 4 | ||||
-rw-r--r-- | net/irda/irttp.c | 1 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 2 | ||||
-rw-r--r-- | net/mac80211/pm.c | 24 | ||||
-rw-r--r-- | net/mac80211/rx.c | 12 | ||||
-rw-r--r-- | net/netlabel/netlabel_kapi.c | 2 | ||||
-rw-r--r-- | net/rose/af_rose.c | 18 | ||||
-rw-r--r-- | net/rose/rose_route.c | 23 |
9 files changed, 54 insertions, 34 deletions
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index 8a96672e2c5c..eb404dc3ed6e 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c | |||
@@ -424,7 +424,7 @@ int br_add_if(struct net_bridge *br, struct net_device *dev) | |||
424 | err2: | 424 | err2: |
425 | br_fdb_delete_by_port(br, p, 1); | 425 | br_fdb_delete_by_port(br, p, 1); |
426 | err1: | 426 | err1: |
427 | kobject_del(&p->kobj); | 427 | kobject_put(&p->kobj); |
428 | err0: | 428 | err0: |
429 | dev_set_promiscuity(dev, -1); | 429 | dev_set_promiscuity(dev, -1); |
430 | put_back: | 430 | put_back: |
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index c29d75d8f1b1..090e9991ac2a 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c | |||
@@ -1304,7 +1304,9 @@ static void arp_format_neigh_entry(struct seq_file *seq, | |||
1304 | hbuffer[k++] = hex_asc_lo(n->ha[j]); | 1304 | hbuffer[k++] = hex_asc_lo(n->ha[j]); |
1305 | hbuffer[k++] = ':'; | 1305 | hbuffer[k++] = ':'; |
1306 | } | 1306 | } |
1307 | hbuffer[--k] = 0; | 1307 | if (k != 0) |
1308 | --k; | ||
1309 | hbuffer[k] = 0; | ||
1308 | #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) | 1310 | #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) |
1309 | } | 1311 | } |
1310 | #endif | 1312 | #endif |
diff --git a/net/irda/irttp.c b/net/irda/irttp.c index ecf4eb2717cb..9cb79f95bf63 100644 --- a/net/irda/irttp.c +++ b/net/irda/irttp.c | |||
@@ -1453,6 +1453,7 @@ struct tsap_cb *irttp_dup(struct tsap_cb *orig, void *instance) | |||
1453 | } | 1453 | } |
1454 | /* Dup */ | 1454 | /* Dup */ |
1455 | memcpy(new, orig, sizeof(struct tsap_cb)); | 1455 | memcpy(new, orig, sizeof(struct tsap_cb)); |
1456 | spin_lock_init(&new->lock); | ||
1456 | 1457 | ||
1457 | /* We don't need the old instance any more */ | 1458 | /* We don't need the old instance any more */ |
1458 | spin_unlock_irqrestore(&irttp->tsaps->hb_spinlock, flags); | 1459 | spin_unlock_irqrestore(&irttp->tsaps->hb_spinlock, flags); |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 523c0d994d15..0b3551da8f43 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -760,7 +760,7 @@ void ieee80211_dynamic_ps_timer(unsigned long data) | |||
760 | { | 760 | { |
761 | struct ieee80211_local *local = (void *) data; | 761 | struct ieee80211_local *local = (void *) data; |
762 | 762 | ||
763 | if (local->quiescing) | 763 | if (local->quiescing || local->suspended) |
764 | return; | 764 | return; |
765 | 765 | ||
766 | queue_work(local->hw.workqueue, &local->dynamic_ps_enable_work); | 766 | queue_work(local->hw.workqueue, &local->dynamic_ps_enable_work); |
diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c index 7a549f9deb96..5e3d476972f9 100644 --- a/net/mac80211/pm.c +++ b/net/mac80211/pm.c | |||
@@ -55,15 +55,6 @@ int __ieee80211_suspend(struct ieee80211_hw *hw) | |||
55 | 55 | ||
56 | rcu_read_unlock(); | 56 | rcu_read_unlock(); |
57 | 57 | ||
58 | /* flush again, in case driver queued work */ | ||
59 | flush_workqueue(local->hw.workqueue); | ||
60 | |||
61 | /* stop hardware - this must stop RX */ | ||
62 | if (local->open_count) { | ||
63 | ieee80211_led_radio(local, false); | ||
64 | drv_stop(local); | ||
65 | } | ||
66 | |||
67 | /* remove STAs */ | 58 | /* remove STAs */ |
68 | spin_lock_irqsave(&local->sta_lock, flags); | 59 | spin_lock_irqsave(&local->sta_lock, flags); |
69 | list_for_each_entry(sta, &local->sta_list, list) { | 60 | list_for_each_entry(sta, &local->sta_list, list) { |
@@ -111,7 +102,22 @@ int __ieee80211_suspend(struct ieee80211_hw *hw) | |||
111 | drv_remove_interface(local, &conf); | 102 | drv_remove_interface(local, &conf); |
112 | } | 103 | } |
113 | 104 | ||
105 | /* stop hardware - this must stop RX */ | ||
106 | if (local->open_count) { | ||
107 | ieee80211_led_radio(local, false); | ||
108 | drv_stop(local); | ||
109 | } | ||
110 | |||
111 | /* | ||
112 | * flush again, in case driver queued work -- it | ||
113 | * shouldn't be doing (or cancel everything in the | ||
114 | * stop callback) that but better safe than sorry. | ||
115 | */ | ||
116 | flush_workqueue(local->hw.workqueue); | ||
117 | |||
114 | local->suspended = true; | 118 | local->suspended = true; |
119 | /* need suspended to be visible before quiescing is false */ | ||
120 | barrier(); | ||
115 | local->quiescing = false; | 121 | local->quiescing = false; |
116 | 122 | ||
117 | return 0; | 123 | return 0; |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 66c797cc85ce..b6ddde3848fb 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -2439,6 +2439,18 @@ void __ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
2439 | return; | 2439 | return; |
2440 | } | 2440 | } |
2441 | 2441 | ||
2442 | /* | ||
2443 | * If we're suspending, it is possible although not too likely | ||
2444 | * that we'd be receiving frames after having already partially | ||
2445 | * quiesced the stack. We can't process such frames then since | ||
2446 | * that might, for example, cause stations to be added or other | ||
2447 | * driver callbacks be invoked. | ||
2448 | */ | ||
2449 | if (unlikely(local->quiescing || local->suspended)) { | ||
2450 | kfree_skb(skb); | ||
2451 | return; | ||
2452 | } | ||
2453 | |||
2442 | if (status->flag & RX_FLAG_HT) { | 2454 | if (status->flag & RX_FLAG_HT) { |
2443 | /* rate_idx is MCS index */ | 2455 | /* rate_idx is MCS index */ |
2444 | if (WARN_ON(status->rate_idx < 0 || | 2456 | if (WARN_ON(status->rate_idx < 0 || |
diff --git a/net/netlabel/netlabel_kapi.c b/net/netlabel/netlabel_kapi.c index 3ff6f325be3f..6ce00205f342 100644 --- a/net/netlabel/netlabel_kapi.c +++ b/net/netlabel/netlabel_kapi.c | |||
@@ -151,7 +151,7 @@ int netlbl_cfg_unlbl_map_add(const char *domain, | |||
151 | addr6 = addr; | 151 | addr6 = addr; |
152 | mask6 = mask; | 152 | mask6 = mask; |
153 | map6 = kzalloc(sizeof(*map6), GFP_ATOMIC); | 153 | map6 = kzalloc(sizeof(*map6), GFP_ATOMIC); |
154 | if (map4 == NULL) | 154 | if (map6 == NULL) |
155 | goto cfg_unlbl_map_add_failure; | 155 | goto cfg_unlbl_map_add_failure; |
156 | map6->type = NETLBL_NLTYPE_UNLABELED; | 156 | map6->type = NETLBL_NLTYPE_UNLABELED; |
157 | ipv6_addr_copy(&map6->list.addr, addr6); | 157 | ipv6_addr_copy(&map6->list.addr, addr6); |
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index 6bd8e93869ed..f0a76f6bca71 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c | |||
@@ -92,23 +92,21 @@ static void rose_set_lockdep_key(struct net_device *dev) | |||
92 | /* | 92 | /* |
93 | * Convert a ROSE address into text. | 93 | * Convert a ROSE address into text. |
94 | */ | 94 | */ |
95 | const char *rose2asc(const rose_address *addr) | 95 | char *rose2asc(char *buf, const rose_address *addr) |
96 | { | 96 | { |
97 | static char buffer[11]; | ||
98 | |||
99 | if (addr->rose_addr[0] == 0x00 && addr->rose_addr[1] == 0x00 && | 97 | if (addr->rose_addr[0] == 0x00 && addr->rose_addr[1] == 0x00 && |
100 | addr->rose_addr[2] == 0x00 && addr->rose_addr[3] == 0x00 && | 98 | addr->rose_addr[2] == 0x00 && addr->rose_addr[3] == 0x00 && |
101 | addr->rose_addr[4] == 0x00) { | 99 | addr->rose_addr[4] == 0x00) { |
102 | strcpy(buffer, "*"); | 100 | strcpy(buf, "*"); |
103 | } else { | 101 | } else { |
104 | sprintf(buffer, "%02X%02X%02X%02X%02X", addr->rose_addr[0] & 0xFF, | 102 | sprintf(buf, "%02X%02X%02X%02X%02X", addr->rose_addr[0] & 0xFF, |
105 | addr->rose_addr[1] & 0xFF, | 103 | addr->rose_addr[1] & 0xFF, |
106 | addr->rose_addr[2] & 0xFF, | 104 | addr->rose_addr[2] & 0xFF, |
107 | addr->rose_addr[3] & 0xFF, | 105 | addr->rose_addr[3] & 0xFF, |
108 | addr->rose_addr[4] & 0xFF); | 106 | addr->rose_addr[4] & 0xFF); |
109 | } | 107 | } |
110 | 108 | ||
111 | return buffer; | 109 | return buf; |
112 | } | 110 | } |
113 | 111 | ||
114 | /* | 112 | /* |
@@ -1437,7 +1435,7 @@ static void rose_info_stop(struct seq_file *seq, void *v) | |||
1437 | 1435 | ||
1438 | static int rose_info_show(struct seq_file *seq, void *v) | 1436 | static int rose_info_show(struct seq_file *seq, void *v) |
1439 | { | 1437 | { |
1440 | char buf[11]; | 1438 | char buf[11], rsbuf[11]; |
1441 | 1439 | ||
1442 | if (v == SEQ_START_TOKEN) | 1440 | if (v == SEQ_START_TOKEN) |
1443 | seq_puts(seq, | 1441 | seq_puts(seq, |
@@ -1455,8 +1453,8 @@ static int rose_info_show(struct seq_file *seq, void *v) | |||
1455 | devname = dev->name; | 1453 | devname = dev->name; |
1456 | 1454 | ||
1457 | seq_printf(seq, "%-10s %-9s ", | 1455 | seq_printf(seq, "%-10s %-9s ", |
1458 | rose2asc(&rose->dest_addr), | 1456 | rose2asc(rsbuf, &rose->dest_addr), |
1459 | ax2asc(buf, &rose->dest_call)); | 1457 | ax2asc(buf, &rose->dest_call)); |
1460 | 1458 | ||
1461 | if (ax25cmp(&rose->source_call, &null_ax25_address) == 0) | 1459 | if (ax25cmp(&rose->source_call, &null_ax25_address) == 0) |
1462 | callsign = "??????-?"; | 1460 | callsign = "??????-?"; |
@@ -1465,7 +1463,7 @@ static int rose_info_show(struct seq_file *seq, void *v) | |||
1465 | 1463 | ||
1466 | seq_printf(seq, | 1464 | seq_printf(seq, |
1467 | "%-10s %-9s %-5s %3.3X %05d %d %d %d %d %3lu %3lu %3lu %3lu %3lu %3lu/%03lu %5d %5d %ld\n", | 1465 | "%-10s %-9s %-5s %3.3X %05d %d %d %d %d %3lu %3lu %3lu %3lu %3lu %3lu/%03lu %5d %5d %ld\n", |
1468 | rose2asc(&rose->source_addr), | 1466 | rose2asc(rsbuf, &rose->source_addr), |
1469 | callsign, | 1467 | callsign, |
1470 | devname, | 1468 | devname, |
1471 | rose->lci & 0x0FFF, | 1469 | rose->lci & 0x0FFF, |
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c index a81066a1010a..9478d9b3d977 100644 --- a/net/rose/rose_route.c +++ b/net/rose/rose_route.c | |||
@@ -1104,6 +1104,7 @@ static void rose_node_stop(struct seq_file *seq, void *v) | |||
1104 | 1104 | ||
1105 | static int rose_node_show(struct seq_file *seq, void *v) | 1105 | static int rose_node_show(struct seq_file *seq, void *v) |
1106 | { | 1106 | { |
1107 | char rsbuf[11]; | ||
1107 | int i; | 1108 | int i; |
1108 | 1109 | ||
1109 | if (v == SEQ_START_TOKEN) | 1110 | if (v == SEQ_START_TOKEN) |
@@ -1112,13 +1113,13 @@ static int rose_node_show(struct seq_file *seq, void *v) | |||
1112 | const struct rose_node *rose_node = v; | 1113 | const struct rose_node *rose_node = v; |
1113 | /* if (rose_node->loopback) { | 1114 | /* if (rose_node->loopback) { |
1114 | seq_printf(seq, "%-10s %04d 1 loopback\n", | 1115 | seq_printf(seq, "%-10s %04d 1 loopback\n", |
1115 | rose2asc(&rose_node->address), | 1116 | rose2asc(rsbuf, &rose_node->address), |
1116 | rose_node->mask); | 1117 | rose_node->mask); |
1117 | } else { */ | 1118 | } else { */ |
1118 | seq_printf(seq, "%-10s %04d %d", | 1119 | seq_printf(seq, "%-10s %04d %d", |
1119 | rose2asc(&rose_node->address), | 1120 | rose2asc(rsbuf, &rose_node->address), |
1120 | rose_node->mask, | 1121 | rose_node->mask, |
1121 | rose_node->count); | 1122 | rose_node->count); |
1122 | 1123 | ||
1123 | for (i = 0; i < rose_node->count; i++) | 1124 | for (i = 0; i < rose_node->count; i++) |
1124 | seq_printf(seq, " %05d", | 1125 | seq_printf(seq, " %05d", |
@@ -1267,7 +1268,7 @@ static void rose_route_stop(struct seq_file *seq, void *v) | |||
1267 | 1268 | ||
1268 | static int rose_route_show(struct seq_file *seq, void *v) | 1269 | static int rose_route_show(struct seq_file *seq, void *v) |
1269 | { | 1270 | { |
1270 | char buf[11]; | 1271 | char buf[11], rsbuf[11]; |
1271 | 1272 | ||
1272 | if (v == SEQ_START_TOKEN) | 1273 | if (v == SEQ_START_TOKEN) |
1273 | seq_puts(seq, | 1274 | seq_puts(seq, |
@@ -1279,7 +1280,7 @@ static int rose_route_show(struct seq_file *seq, void *v) | |||
1279 | seq_printf(seq, | 1280 | seq_printf(seq, |
1280 | "%3.3X %-10s %-9s %05d ", | 1281 | "%3.3X %-10s %-9s %05d ", |
1281 | rose_route->lci1, | 1282 | rose_route->lci1, |
1282 | rose2asc(&rose_route->src_addr), | 1283 | rose2asc(rsbuf, &rose_route->src_addr), |
1283 | ax2asc(buf, &rose_route->src_call), | 1284 | ax2asc(buf, &rose_route->src_call), |
1284 | rose_route->neigh1->number); | 1285 | rose_route->neigh1->number); |
1285 | else | 1286 | else |
@@ -1289,10 +1290,10 @@ static int rose_route_show(struct seq_file *seq, void *v) | |||
1289 | if (rose_route->neigh2) | 1290 | if (rose_route->neigh2) |
1290 | seq_printf(seq, | 1291 | seq_printf(seq, |
1291 | "%3.3X %-10s %-9s %05d\n", | 1292 | "%3.3X %-10s %-9s %05d\n", |
1292 | rose_route->lci2, | 1293 | rose_route->lci2, |
1293 | rose2asc(&rose_route->dest_addr), | 1294 | rose2asc(rsbuf, &rose_route->dest_addr), |
1294 | ax2asc(buf, &rose_route->dest_call), | 1295 | ax2asc(buf, &rose_route->dest_call), |
1295 | rose_route->neigh2->number); | 1296 | rose_route->neigh2->number); |
1296 | else | 1297 | else |
1297 | seq_puts(seq, | 1298 | seq_puts(seq, |
1298 | "000 * * 00000\n"); | 1299 | "000 * * 00000\n"); |