From: David S. Miller Date: Tue, 18 Mar 2008 07:37:55 +0000 (-0700) Subject: Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 X-Git-Tag: v2.6.26-rc1~1138^2~415 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=577f99c1d08cf9cbdafd4e858dd13ff04d855090;p=linux-2.6-omap-h63xx.git Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/wireless/rt2x00/rt2x00dev.c net/8021q/vlan_dev.c --- 577f99c1d08cf9cbdafd4e858dd13ff04d855090 diff --cc drivers/net/wireless/rt2x00/rt2x00dev.c index b81efc9b058,bc846ba12f6..acf4d67ba43 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c @@@ -1151,20 -1311,9 +1149,10 @@@ int rt2x00lib_probe_dev(struct rt2x00_d } /* - * Register LED. + * Register extra components. */ + rt2x00leds_register(rt2x00dev); - - /* - * Allocatie rfkill. - */ - retval = rt2x00rfkill_allocate(rt2x00dev); - if (retval) - goto exit; - - /* - * Open the debugfs entry. - */ + rt2x00rfkill_allocate(rt2x00dev); rt2x00debug_register(rt2x00dev); __set_bit(DEVICE_PRESENT, &rt2x00dev->flags); @@@ -1193,20 -1342,11 +1181,16 @@@ void rt2x00lib_remove_dev(struct rt2x00 rt2x00lib_uninitialize(rt2x00dev); /* - * Close debugfs entry. + * Free extra components */ rt2x00debug_deregister(rt2x00dev); - - /* - * Free rfkill - */ rt2x00rfkill_free(rt2x00dev); + /* + * Free LED. + */ + rt2x00leds_unregister(rt2x00dev); + /* * Free ieee80211_hw memory. */ @@@ -1248,7 -1387,11 +1231,12 @@@ int rt2x00lib_suspend(struct rt2x00_de */ rt2x00lib_stop(rt2x00dev); rt2x00lib_uninitialize(rt2x00dev); + + /* + * Suspend/disable extra components. + */ + rt2x00leds_suspend(rt2x00dev); + rt2x00rfkill_suspend(rt2x00dev); rt2x00debug_deregister(rt2x00dev); exit: @@@ -1292,10 -1414,10 +1280,11 @@@ int rt2x00lib_resume(struct rt2x00_dev NOTICE(rt2x00dev, "Waking up.\n"); /* - * Open the debugfs entry and restore led handling. + * Restore/enable extra components. */ rt2x00debug_register(rt2x00dev); + rt2x00rfkill_resume(rt2x00dev); + rt2x00leds_resume(rt2x00dev); /* * Only continue if mac80211 had open interfaces. diff --cc drivers/net/wireless/rt2x00/rt2x00lib.h index e4b4dd23d61,ce58c654ade..64fae7e3f73 --- a/drivers/net/wireless/rt2x00/rt2x00lib.h +++ b/drivers/net/wireless/rt2x00/rt2x00lib.h @@@ -170,38 -122,14 +170,46 @@@ static inline void rt2x00rfkill_allocat static inline void rt2x00rfkill_free(struct rt2x00_dev *rt2x00dev) { } + + static inline void rt2x00rfkill_suspend(struct rt2x00_dev *rt2x00dev) + { + } + + static inline void rt2x00rfkill_resume(struct rt2x00_dev *rt2x00dev) + { + } #endif /* CONFIG_RT2X00_LIB_RFKILL */ +/* + * LED handlers + */ +#ifdef CONFIG_RT2X00_LIB_LEDS +void rt2x00leds_led_quality(struct rt2x00_dev *rt2x00dev, int rssi); +void rt2x00leds_register(struct rt2x00_dev *rt2x00dev); +void rt2x00leds_unregister(struct rt2x00_dev *rt2x00dev); +void rt2x00leds_suspend(struct rt2x00_dev *rt2x00dev); +void rt2x00leds_resume(struct rt2x00_dev *rt2x00dev); +#else +static inline void rt2x00leds_led_quality(struct rt2x00_dev *rt2x00dev, + int rssi) +{ +} + +static inline void rt2x00leds_register(struct rt2x00_dev *rt2x00dev) +{ +} + +static inline void rt2x00leds_unregister(struct rt2x00_dev *rt2x00dev) +{ +} + +static inline void rt2x00leds_suspend(struct rt2x00_dev *rt2x00dev) +{ +} + +static inline void rt2x00leds_resume(struct rt2x00_dev *rt2x00dev) +{ +} +#endif /* CONFIG_RT2X00_LIB_LEDS */ + #endif /* RT2X00LIB_H */ diff --cc net/8021q/vlan_dev.c index 556b2893b56,8fbcefe10c9..1e5c9904571 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c @@@ -382,7 -382,7 +382,7 @@@ static int vlan_dev_hard_start_xmit(str vlan_dev_info(dev)->cnt_encap_on_xmit++; pr_debug("%s: proto to encap: 0x%hx\n", - __func__, htons(veth->h_vlan_proto)); - __FUNCTION__, ntohs(veth->h_vlan_proto)); ++ __func__, ntohs(veth->h_vlan_proto)); /* Construct the second two bytes. This field looks something * like: * usr_priority: 3 bits (high bits) diff --cc net/sctp/protocol.c index 87512f14cf7,7a7646a9565..25be8f04de6 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c @@@ -628,10 -628,8 +628,11 @@@ static int sctp_inetaddr_event(struct n struct in_ifaddr *ifa = (struct in_ifaddr *)ptr; struct sctp_sockaddr_entry *addr = NULL; struct sctp_sockaddr_entry *temp; + int found = 0; + if (ifa->ifa_dev->dev->nd_net != &init_net) + return NOTIFY_DONE; + switch (ev) { case NETDEV_UP: addr = kmalloc(sizeof(struct sctp_sockaddr_entry), GFP_ATOMIC);