blob: b5eddf8d3b3980aa6cb96efdec9f069556847fe9 [file] [log] [blame]
Marcelo Tosatti876c9d32007-02-10 12:25:27 -02001/* Copyright (C) 2006, Red Hat, Inc. */
2
3#ifndef _WLAN_ASSOC_H_
4#define _WLAN_ASSOC_H_
5
6#include "dev.h"
7
Holger Schurigeb3ce632007-05-24 23:41:15 -04008void libertas_association_worker(struct work_struct *work);
Marcelo Tosatti876c9d32007-02-10 12:25:27 -02009
10struct assoc_request * wlan_get_association_request(wlan_adapter *adapter);
11
12#define ASSOC_DELAY (HZ / 2)
13static inline void wlan_postpone_association_work(wlan_private *priv)
14{
15 if (priv->adapter->surpriseremoved)
16 return;
17 cancel_delayed_work(&priv->assoc_work);
18 queue_delayed_work(priv->assoc_thread, &priv->assoc_work, ASSOC_DELAY);
19}
20
21static inline void wlan_cancel_association_work(wlan_private *priv)
22{
23 cancel_delayed_work(&priv->assoc_work);
Dan Williamse76850d2007-05-25 17:09:41 -040024 if (priv->adapter->pending_assoc_req) {
25 kfree(priv->adapter->pending_assoc_req);
26 priv->adapter->pending_assoc_req = NULL;
Marcelo Tosatti876c9d32007-02-10 12:25:27 -020027 }
28}
29
30#endif /* _WLAN_ASSOC_H */