rtap_dev->ml_priv = priv;
SET_NETDEV_DEV(rtap_dev, priv->dev->dev.parent);
---- a/drivers/net/wireless/mac80211_hwsim.c 2009-07-06 18:49:03.282196473 -0700
-+++ b/drivers/net/wireless/mac80211_hwsim.c 2009-07-06 18:49:03.358190423 -0700
-@@ -811,16 +811,22 @@
+--- a/drivers/net/wireless/mac80211_hwsim.c 2009-07-07 13:27:29.551678726 -0700
++++ b/drivers/net/wireless/mac80211_hwsim.c 2009-07-07 13:27:29.923680754 -0700
+@@ -812,16 +812,22 @@
.name = "mac80211_hwsim"
};
#include <linux/spi/spi.h>
#include "wl1251.h"
---- a/include/linux/rfkill_backport.h 2009-07-01 23:54:40.529283538 -0700
-+++ b/include/linux/rfkill_backport.h 2009-07-02 00:23:38.069262502 -0700
-@@ -134,7 +134,7 @@
+--- a/include/linux/rfkill_backport.h 2009-07-07 13:21:54.798712205 -0700
++++ b/include/linux/rfkill_backport.h 2009-07-07 13:27:29.939682510 -0700
+@@ -148,7 +148,7 @@
int (*set_block)(void *data, bool blocked);
};
/**
* rfkill_alloc - allocate rfkill structure
* @name: name of the struct -- the string is not copied internally
-@@ -146,7 +146,7 @@
+@@ -160,7 +160,7 @@
* This function should be called by the transmitter driver to allocate an
* rfkill structure. Returns %NULL on failure.
*/
struct device *parent,
const enum rfkill_type type,
const struct rfkill_ops *ops,
-@@ -167,7 +167,7 @@
+@@ -181,7 +181,7 @@
* If the hardware blocked state is not set before registration,
* it is assumed to be unblocked.
*/
/**
* rfkill_pause_polling(struct rfkill *rfkill)
-@@ -176,7 +176,7 @@
+@@ -190,7 +190,7 @@
* NOTE: not necessary for suspend/resume -- in that case the
* core stops polling anyway
*/
/**
* rfkill_resume_polling(struct rfkill *rfkill)
-@@ -185,7 +185,7 @@
+@@ -199,7 +199,7 @@
* NOTE: not necessary for suspend/resume -- in that case the
* core stops polling anyway
*/
/**
-@@ -196,7 +196,7 @@
+@@ -210,7 +210,7 @@
* teardown to destroy rfkill structure. Until it returns, the driver
* needs to be able to service method calls.
*/
/**
* rfkill_destroy - free rfkill structure
-@@ -204,7 +204,7 @@
+@@ -218,7 +218,7 @@
*
* Destroys the rfkill structure.
*/
/**
* rfkill_set_hw_state - Set the internal rfkill hardware block state
-@@ -225,7 +225,7 @@
+@@ -239,7 +239,7 @@
* should be blocked) so that drivers need not keep track of the soft
* block state -- which they might not be able to.
*/
/**
* rfkill_set_sw_state - Set the internal rfkill software block state
-@@ -247,7 +247,7 @@
+@@ -261,7 +261,7 @@
* The function returns the combined block state (true if transmitter
* should be blocked).
*/
/**
* rfkill_init_sw_state - Initialize persistent software block state
-@@ -263,7 +263,7 @@
+@@ -277,7 +277,7 @@
* can be read by userspace. Persistent devices are expected to preserve
* their own state when suspended.
*/
/**
* rfkill_set_states - Set the internal rfkill block states
-@@ -274,17 +274,17 @@
+@@ -288,17 +288,17 @@
* This function can be called in any context, even from within rfkill
* callbacks.
*/
struct device *parent,
const enum rfkill_type type,
const struct rfkill_ops *ops,
-@@ -293,61 +293,61 @@
+@@ -307,61 +307,61 @@
return ERR_PTR(-ENODEV);
}
/**
* rfkill_set_led_trigger_name -- set the LED trigger name
-@@ -358,15 +358,15 @@
+@@ -372,15 +372,15 @@
* trigger that rfkill creates. It is optional, but if called
* must be called before rfkill_register() to be effective.
*/
/*
---- a/net/mac80211/iface.c 2009-07-06 18:50:48.027196683 -0700
-+++ b/net/mac80211/iface.c 2009-07-06 18:50:48.495223982 -0700
-@@ -668,6 +668,7 @@
+--- a/net/mac80211/iface.c 2009-07-07 13:29:43.631717242 -0700
++++ b/net/mac80211/iface.c 2009-07-07 13:29:44.823680886 -0700
+@@ -643,6 +643,7 @@
WARN_ON(flushed);
}
static const struct net_device_ops ieee80211_dataif_ops = {
.ndo_open = ieee80211_open,
.ndo_stop = ieee80211_stop,
-@@ -687,11 +688,22 @@
+@@ -662,11 +663,22 @@
.ndo_change_mtu = ieee80211_change_mtu,
.ndo_set_mac_address = eth_mac_addr,
};
dev->wireless_handlers = &ieee80211_iw_handler_def;
dev->destructor = free_netdev;
}
-@@ -707,7 +719,11 @@
+@@ -682,7 +694,11 @@
/* and set some type-dependent values */
sdata->vif.type = type;
sdata->wdev.iftype = type;
/* only monitor differs */
-@@ -730,7 +746,11 @@
+@@ -705,7 +721,11 @@
break;
case NL80211_IFTYPE_MONITOR:
sdata->dev->type = ARPHRD_IEEE80211_RADIOTAP;
sdata->u.mntr_flags = MONITOR_FLAG_CONTROL |
MONITOR_FLAG_OTHER_BSS;
break;
-@@ -837,6 +857,10 @@
+@@ -812,6 +832,10 @@
if (ret)
goto fail;
+rfkill_backport-y += core.o
+rfkill_backport-$(CONFIG_RFKILL_BACKPORT_INPUT) += input.o
+obj-$(CONFIG_RFKILL_BACKPORT) += rfkill_backport.o
---- a/net/rfkill/core.c
-+++ b/net/rfkill/core.c
+--- a/net/rfkill/core.c 2009-07-07 13:31:17.014683241 -0700
++++ b/net/rfkill/core.c 2009-07-07 13:31:17.490677888 -0700
@@ -26,7 +26,7 @@
#include <linux/capability.h>
#include <linux/list.h>
#include <linux/spinlock.h>
#include <linux/miscdevice.h>
#include <linux/wait.h>
-@@ -61,7 +61,7 @@ struct rfkill {
+@@ -61,7 +61,7 @@
const struct rfkill_ops *ops;
void *data;
struct led_trigger led_trigger;
const char *ledtrigname;
#endif
-@@ -122,7 +122,7 @@ static struct {
+@@ -122,7 +122,7 @@
static bool rfkill_epo_lock_active;
static void rfkill_led_trigger_event(struct rfkill *rfkill)
{
struct led_trigger *trigger;
-@@ -147,19 +147,19 @@ static void rfkill_led_trigger_activate(struct led_classdev *led)
+@@ -147,19 +147,19 @@
rfkill_led_trigger_event(rfkill);
}
static int rfkill_led_trigger_register(struct rfkill *rfkill)
{
-@@ -186,7 +186,7 @@ static inline int rfkill_led_trigger_register(struct rfkill *rfkill)
+@@ -186,7 +186,7 @@
static inline void rfkill_led_trigger_unregister(struct rfkill *rfkill)
{
}
static void rfkill_fill_event(struct rfkill_event *ev, struct rfkill *rfkill,
enum rfkill_operation op)
-@@ -316,7 +316,7 @@ static void rfkill_set_block(struct rfkill *rfkill, bool blocked)
+@@ -316,7 +316,7 @@
rfkill_event(rfkill);
}
static atomic_t rfkill_input_disabled = ATOMIC_INIT(0);
/**
-@@ -463,7 +463,7 @@ bool rfkill_get_global_sw_state(const enum rfkill_type type)
+@@ -463,7 +463,7 @@
#endif
{
bool ret, change;
-@@ -477,7 +477,7 @@ bool rfkill_set_hw_state(struct rfkill *rfkill, bool blocked)
+@@ -477,7 +477,7 @@
return ret;
}
static void __rfkill_set_sw_state(struct rfkill *rfkill, bool blocked)
{
-@@ -493,7 +493,7 @@ static void __rfkill_set_sw_state(struct rfkill *rfkill, bool blocked)
+@@ -493,7 +493,7 @@
rfkill->state &= ~bit;
}
{
unsigned long flags;
bool prev, hwblock;
-@@ -517,9 +517,9 @@ bool rfkill_set_sw_state(struct rfkill *rfkill, bool blocked)
+@@ -517,9 +517,9 @@
return blocked;
}
{
unsigned long flags;
-@@ -531,9 +531,9 @@ void rfkill_init_sw_state(struct rfkill *rfkill, bool blocked)
+@@ -531,9 +531,9 @@
rfkill->persistent = true;
spin_unlock_irqrestore(&rfkill->lock, flags);
}
{
unsigned long flags;
bool swprev, hwprev;
-@@ -561,7 +561,7 @@ void rfkill_set_states(struct rfkill *rfkill, bool sw, bool hw)
+@@ -561,7 +561,7 @@
rfkill_led_trigger_event(rfkill);
}
}
static ssize_t rfkill_name_show(struct device *dev,
struct device_attribute *attr,
-@@ -712,7 +712,7 @@ static int rfkill_dev_uevent(struct device *dev, struct kobj_uevent_env *env)
+@@ -712,7 +712,7 @@
return error;
}
{
BUG_ON(!rfkill);
-@@ -721,9 +721,9 @@ void rfkill_pause_polling(struct rfkill *rfkill)
+@@ -721,9 +721,9 @@
cancel_delayed_work_sync(&rfkill->poll_work);
}
{
BUG_ON(!rfkill);
-@@ -732,13 +732,13 @@ void rfkill_resume_polling(struct rfkill *rfkill)
+@@ -732,13 +732,13 @@
schedule_work(&rfkill->poll_work.work);
}
return 0;
}
-@@ -753,13 +753,13 @@ static int rfkill_resume(struct device *dev)
+@@ -753,13 +753,13 @@
rfkill_set_block(rfkill, cur);
}
.dev_release = rfkill_release,
.dev_attrs = rfkill_dev_attrs,
.dev_uevent = rfkill_dev_uevent,
-@@ -767,7 +767,7 @@ static struct class rfkill_class = {
+@@ -767,7 +767,7 @@
.resume = rfkill_resume,
};
{
unsigned long flags;
u32 state;
-@@ -778,10 +778,10 @@ bool rfkill_blocked(struct rfkill *rfkill)
+@@ -778,10 +778,10 @@
return !!(state & RFKILL_BLOCK_ANY);
}
struct device *parent,
const enum rfkill_type type,
const struct rfkill_ops *ops,
-@@ -820,7 +820,7 @@ struct rfkill * __must_check rfkill_alloc(const char *name,
+@@ -820,7 +820,7 @@
return rfkill;
}
static void rfkill_poll(struct work_struct *work)
{
-@@ -863,7 +863,7 @@ static void rfkill_sync_work(struct work_struct *work)
+@@ -863,7 +863,7 @@
mutex_unlock(&rfkill_global_mutex);
}
{
static unsigned long rfkill_no;
struct device *dev = &rfkill->dev;
-@@ -905,7 +905,7 @@ int __must_check rfkill_register(struct rfkill *rfkill)
+@@ -905,7 +905,7 @@
if (!rfkill->persistent || rfkill_epo_lock_active) {
schedule_work(&rfkill->sync_work);
} else {
bool soft_blocked = !!(rfkill->state & RFKILL_BLOCK_SW);
if (!atomic_read(&rfkill_input_disabled))
-@@ -926,9 +926,9 @@ int __must_check rfkill_register(struct rfkill *rfkill)
+@@ -926,9 +926,9 @@
mutex_unlock(&rfkill_global_mutex);
return error;
}
{
BUG_ON(!rfkill);
-@@ -949,14 +949,14 @@ void rfkill_unregister(struct rfkill *rfkill)
+@@ -949,14 +949,14 @@
rfkill_led_trigger_unregister(rfkill);
}
static int rfkill_fop_open(struct inode *inode, struct file *file)
{
-@@ -1127,7 +1127,7 @@ static int rfkill_fop_release(struct inode *inode, struct file *file)
+@@ -1133,7 +1133,7 @@
list_for_each_entry_safe(ev, tmp, &data->events, list)
kfree(ev);
if (data->input_handler)
if (atomic_dec_return(&rfkill_input_disabled) == 0)
printk(KERN_DEBUG "rfkill: input handler enabled\n");
-@@ -1138,7 +1138,7 @@ static int rfkill_fop_release(struct inode *inode, struct file *file)
+@@ -1144,7 +1144,7 @@
return 0;
}
static long rfkill_fop_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
-@@ -1170,14 +1170,14 @@ static const struct file_operations rfkill_fops = {
+@@ -1176,14 +1176,14 @@
.write = rfkill_fop_write,
.poll = rfkill_fop_poll,
.release = rfkill_fop_release,
.fops = &rfkill_fops,
.minor = MISC_DYNAMIC_MINOR,
};
-@@ -1200,7 +1200,7 @@ static int __init rfkill_init(void)
+@@ -1206,7 +1206,7 @@
goto out;
}
error = rfkill_handler_init();
if (error) {
misc_deregister(&rfkill_miscdev);
-@@ -1216,7 +1216,7 @@ subsys_initcall(rfkill_init);
+@@ -1222,7 +1222,7 @@
static void __exit rfkill_exit(void)
{
return notifier_from_errno(-ERFKILL);
break;
}
---- a/net/wireless/core.h 2009-07-07 11:44:30.030681143 -0700
-+++ b/net/wireless/core.h 2009-07-07 11:45:37.915006107 -0700
+--- a/net/wireless/core.h 2009-07-07 13:32:53.367707921 -0700
++++ b/net/wireless/core.h 2009-07-07 13:32:53.943703622 -0700
@@ -11,7 +11,11 @@
#include <linux/kref.h>
#include <linux/rbtree.h>
#include <linux/workqueue.h>
#include <net/genetlink.h>
#include <net/cfg80211.h>
-@@ -111,7 +115,9 @@
+@@ -113,7 +117,9 @@
unsigned long ts;
struct kref ref;
atomic_t hold;
/* must be last because of priv member */
struct cfg80211_bss pub;
---- a/net/wireless/scan.c 2009-07-07 11:21:19.854680906 -0700
-+++ b/net/wireless/scan.c 2009-07-07 13:15:30.822719375 -0700
-@@ -66,10 +66,12 @@
+--- a/net/wireless/scan.c 2009-07-07 13:34:00.746682337 -0700
++++ b/net/wireless/scan.c 2009-07-07 13:34:01.727705768 -0700
+@@ -88,10 +88,12 @@
bss = container_of(ref, struct cfg80211_internal_bss, ref);
if (bss->pub.free_priv)
bss->pub.free_priv(&bss->pub);
BUG_ON(atomic_read(&bss->hold));
kfree(bss);
-@@ -375,12 +377,25 @@
+@@ -397,12 +399,25 @@
found = rb_find_bss(dev, res);
/* overwrite IEs */
if (overwrite) {
-@@ -408,6 +423,7 @@
+@@ -430,6 +445,7 @@
}
}
obj-$(CONFIG_LIBERTAS) += libertas/
obj-$(CONFIG_LIBERTAS_THINFIRM) += libertas_tf/
---- a/drivers/net/wireless/p54/p54usb.c 2009-07-06 16:05:47.263198670 -0700
-+++ b/drivers/net/wireless/p54/p54usb.c 2009-07-06 16:06:32.298597357 -0700
-@@ -1049,7 +1049,9 @@
+--- a/drivers/net/wireless/p54/p54usb.c 2009-07-07 13:36:49.523678591 -0700
++++ b/drivers/net/wireless/p54/p54usb.c 2009-07-07 13:36:49.831718432 -0700
+@@ -1047,7 +1047,9 @@
.resume = p54u_resume,
.reset_resume = p54u_resume,
#endif /* CONFIG_PM */