e76850d620
The BSS to associate with (in either Infrastructure or IBSS join operations) is now stored in _one_ place in the association request (the bss member), not two places as before (pattemptedbss and curbssparams->bssdescriptor). Association requests are passed to the necessary association functions to (a) give them access to the bss member and (b) ensure that association/join/start setup uses settings from the request, not the current adapter settings (which may not be valid for the requested settings). Because the 'bss' member of the association request is used now, the command return functions from associate and adhoc join/start need access to the in-progress association request to update curbssparams when everything is done. The association worker moves the request from pending to in-progress for the duration of the association attempt. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
30 lines
780 B
C
30 lines
780 B
C
/* Copyright (C) 2006, Red Hat, Inc. */
|
|
|
|
#ifndef _WLAN_ASSOC_H_
|
|
#define _WLAN_ASSOC_H_
|
|
|
|
#include "dev.h"
|
|
|
|
void libertas_association_worker(struct work_struct *work);
|
|
|
|
struct assoc_request * wlan_get_association_request(wlan_adapter *adapter);
|
|
|
|
#define ASSOC_DELAY (HZ / 2)
|
|
static inline void wlan_postpone_association_work(wlan_private *priv)
|
|
{
|
|
if (priv->adapter->surpriseremoved)
|
|
return;
|
|
cancel_delayed_work(&priv->assoc_work);
|
|
queue_delayed_work(priv->assoc_thread, &priv->assoc_work, ASSOC_DELAY);
|
|
}
|
|
|
|
static inline void wlan_cancel_association_work(wlan_private *priv)
|
|
{
|
|
cancel_delayed_work(&priv->assoc_work);
|
|
if (priv->adapter->pending_assoc_req) {
|
|
kfree(priv->adapter->pending_assoc_req);
|
|
priv->adapter->pending_assoc_req = NULL;
|
|
}
|
|
}
|
|
|
|
#endif /* _WLAN_ASSOC_H */
|