Subject: [PATCH] d80211: Fix passing of invalid pointer

From: Michael Buesch <[email-masked]>
Date: Wed, 13 Dec 2006 18:52:33 +0100

ieee80211_hw pointers have to be passed to ops->set_key()
and ops->get_tsf().

Signed-off-by: Michael Buesch <[email-masked]>

Index: jbenc-dscape.git/net/d80211/ieee80211_iface.c
===================================================================
--- jbenc-dscape.git.orig/net/d80211/ieee80211_iface.c	2006-12-13 13:23:56.000000000 +0100
+++ jbenc-dscape.git/net/d80211/ieee80211_iface.c	2006-12-13 18:46:33.000000000 +0100
@@ -228,8 +228,8 @@ void ieee80211_if_reinit(struct net_devi
 		 * really much point in disabling the keys at this point. */
 		memset(addr, 0xff, ETH_ALEN);
 		if (local->ops->set_key)
-			local->ops->set_key(dev, DISABLE_KEY, addr,
-					   local->keys[i], 0);
+			local->ops->set_key(local_to_hw(local), DISABLE_KEY, addr,
+					    local->keys[i], 0);
 #endif
 		ieee80211_key_free(sdata->keys[i]);
 	}
Index: jbenc-dscape.git/net/d80211/ieee80211_sta.c
===================================================================
--- jbenc-dscape.git.orig/net/d80211/ieee80211_sta.c	2006-12-13 18:42:47.000000000 +0100
+++ jbenc-dscape.git/net/d80211/ieee80211_sta.c	2006-12-13 18:50:14.000000000 +0100
@@ -1365,7 +1365,7 @@ static void ieee80211_rx_bss_info(struct
 		static unsigned long last_tsf_debug = 0;
 		u64 tsf;
 		if (local->ops->get_tsf)
-			tsf = local->ops->get_tsf(local->mdev);
+			tsf = local->ops->get_tsf(local_to_hw(local));
 		else
 			tsf = -1LLU;
 		if (time_after(jiffies, last_tsf_debug + 5 * HZ)) {

-- 
Greetings Michael.