[PATCH] softmac: remove function_enter()
[sfrench/cifs-2.6.git] / net / ieee80211 / softmac / ieee80211softmac_assoc.c
index b29fb1cc72c6efb8f209e3196374214a9f1df5c7..be61de78dfa4a6dc01f6a653e3b6efee89ceac54 100644 (file)
@@ -1,11 +1,11 @@
 /*
  * This file contains the softmac's association logic.
  *
- * Copyright (c) 2005 Johannes Berg <johannes@sipsolutions.net>
- *                    Joseph Jezak <josejx@gentoo.org>
- *                    Larry Finger <Larry.Finger@lwfinger.net>
- *                    Danny van Dyk <kugelfang@gentoo.org>
- *                    Michael Buesch <mbuesch@freenet.de>
+ * Copyright (c) 2005, 2006 Johannes Berg <johannes@sipsolutions.net>
+ *                          Joseph Jezak <josejx@gentoo.org>
+ *                          Larry Finger <Larry.Finger@lwfinger.net>
+ *                          Danny van Dyk <kugelfang@gentoo.org>
+ *                          Michael Buesch <mbuesch@freenet.de>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of version 2 of the GNU General Public License as
@@ -38,7 +38,7 @@ static void
 ieee80211softmac_assoc(struct ieee80211softmac_device *mac, struct ieee80211softmac_network *net)
 {
        unsigned long flags;
-       function_enter();
+
        /* Switch to correct channel for this network */
        mac->set_channel(mac->dev, net->channel);
        
@@ -64,8 +64,6 @@ ieee80211softmac_assoc_timeout(void *d)
        struct ieee80211softmac_device *mac = (struct ieee80211softmac_device *)d;
        unsigned long flags;
 
-       function_enter();
-
        spin_lock_irqsave(&mac->lock, flags);
        /* we might race against ieee80211softmac_handle_assoc_response,
         * so make sure only one of us does something */
@@ -83,20 +81,12 @@ ieee80211softmac_assoc_timeout(void *d)
        ieee80211softmac_call_events(mac, IEEE80211SOFTMAC_EVENT_ASSOCIATE_TIMEOUT, NULL);
 }
 
-static void
-ieee80211softmac_reassoc(struct ieee80211softmac_device *mac)
-{
-       function_enter();
-}
-
-
 /* Sends out a disassociation request to the desired AP */
 static void
 ieee80211softmac_disassoc(struct ieee80211softmac_device *mac, u16 reason)
 {
        unsigned long flags;
        struct ieee80211softmac_network *found;
-       function_enter();
 
        if (mac->associnfo.bssvalid && mac->associated) {
                found = ieee80211softmac_get_network_by_bssid(mac, mac->associnfo.bssid);
@@ -180,8 +170,6 @@ ieee80211softmac_assoc_work(void *d)
        struct ieee80211_network *net = NULL, *best = NULL;
        unsigned long flags;
        
-       function_enter();
-       
        /* meh */
        if (mac->associated)
                ieee80211softmac_disassoc(mac, WLAN_REASON_DISASSOC_STA_HAS_LEFT);
@@ -390,3 +378,19 @@ ieee80211softmac_handle_disassoc(struct net_device * dev,
        
        return 0;
 }
+
+int
+ieee80211softmac_handle_reassoc_req(struct net_device * dev,
+                                   struct ieee80211_reassoc_request * resp)
+{
+       struct ieee80211softmac_device *mac = ieee80211_priv(dev);
+       struct ieee80211softmac_network *network;
+
+       network = ieee80211softmac_get_network_by_bssid(mac, resp->header.addr3);
+       if (!network) {
+               dprintkl(KERN_INFO PFX "reassoc request from unknown network\n");
+               return 0;
+       }
+       ieee80211softmac_assoc(mac, network);
+       return 0;
+}