From: Holger Schurig <holgerschurig@gmail.com>
To: linux-wireless@vger.kernel.org,
John Linville <linville@tuxdriver.com>,
Dan Williams <dcbw@redhat.com>
Subject: [PATCH] libertas: move more association code to assoc.c
Date: Thu, 26 Nov 2009 14:56:20 +0100 [thread overview]
Message-ID: <200911261456.20476.holgerschurig@gmail.com> (raw)
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
--- linux-wl.orig/drivers/net/wireless/libertas/assoc.c
+++ linux-wl/drivers/net/wireless/libertas/assoc.c
@@ -1943,7 +1943,7 @@ out:
}
-void lbs_association_worker(struct work_struct *work)
+static void lbs_association_worker(struct work_struct *work)
{
struct lbs_private *priv = container_of(work, struct lbs_private,
assoc_work.work);
@@ -2237,3 +2237,24 @@ int lbs_cmd_80211_deauthenticate(struct
return ret;
}
+
+void lbs_assoc_init(struct lbs_private *priv)
+{
+ lbs_deb_enter(LBS_DEB_ASSOC);
+
+ INIT_DELAYED_WORK(&priv->assoc_work, lbs_association_worker);
+ priv->mode = IW_MODE_INFRA;
+ priv->enablehwauto = 1;
+
+ lbs_deb_leave(LBS_DEB_ASSOC);
+}
+
+
+void lbs_assoc_deinit(struct lbs_private *priv)
+{
+ lbs_deb_enter(LBS_DEB_ASSOC);
+
+ cancel_delayed_work_sync(&priv->assoc_work);
+
+ lbs_deb_leave(LBS_DEB_ASSOC);
+}
--- linux-wl.orig/drivers/net/wireless/libertas/assoc.h
+++ linux-wl/drivers/net/wireless/libertas/assoc.h
@@ -124,7 +124,6 @@ struct assoc_request {
extern u8 lbs_bg_rates[MAX_RATES];
-void lbs_association_worker(struct work_struct *work);
struct assoc_request *lbs_get_association_request(struct lbs_private *priv);
int lbs_adhoc_stop(struct lbs_private *priv);
@@ -152,4 +151,7 @@ int lbs_cmd_802_11_enable_rsn(struct lbs
int lbs_cmd_802_11_key_material(struct lbs_private *priv, uint16_t cmd_action,
struct assoc_request *assoc);
+void lbs_assoc_init(struct lbs_private *priv);
+void lbs_assoc_deinit(struct lbs_private *priv);
+
#endif /* _LBS_ASSOC_H */
--- linux-wl.orig/drivers/net/wireless/libertas/main.c
+++ linux-wl/drivers/net/wireless/libertas/main.c
@@ -818,13 +818,12 @@ static int lbs_init_adapter(struct lbs_p
memset(priv->current_addr, 0xff, ETH_ALEN);
+ lbs_assoc_init(priv);
priv->connect_status = LBS_DISCONNECTED;
priv->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM;
- priv->mode = IW_MODE_INFRA;
priv->channel = DEFAULT_AD_HOC_CHANNEL;
priv->mac_control = CMD_ACT_MAC_RX_ON | CMD_ACT_MAC_TX_ON;
priv->radio_on = 1;
- priv->enablehwauto = 1;
priv->psmode = LBS802_11POWERMODECAM;
priv->psstate = PS_STATE_FULL_POWER;
priv->is_deep_sleep = 0;
@@ -964,7 +963,6 @@ struct lbs_private *lbs_add_card(void *c
}
priv->work_thread = create_singlethread_workqueue("lbs_worker");
- INIT_DELAYED_WORK(&priv->assoc_work, lbs_association_worker);
INIT_WORK(&priv->mcast_work, lbs_set_mcast_worker);
priv->wol_criteria = 0xffffffff;
@@ -1002,7 +1000,7 @@ void lbs_remove_card(struct lbs_private
dev = priv->dev;
- cancel_delayed_work_sync(&priv->assoc_work);
+ lbs_assoc_deinit(priv);
cancel_work_sync(&priv->mcast_work);
/* worker thread destruction blocks on the in-flight command which
--
http://www.holgerschurig.de
next reply other threads:[~2009-11-26 13:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-26 13:56 Holger Schurig [this message]
2009-11-26 14:12 ` [PATCH] libertas: move more association code to assoc.c Holger Schurig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200911261456.20476.holgerschurig@gmail.com \
--to=holgerschurig@gmail.com \
--cc=dcbw@redhat.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.