From: David Kilroy <kilroyd@googlemail.com>
To: linux-wireless@vger.kernel.org
Cc: orinoco-devel@lists.sourceforge.net,
David Kilroy <kilroyd@googlemail.com>
Subject: [RFC 2/4] orinoco: add cfg80211 join_ibss and leave_ibss
Date: Wed, 5 Aug 2009 21:32:50 +0100 [thread overview]
Message-ID: <1249504372-17063-3-git-send-email-kilroyd@googlemail.com> (raw)
In-Reply-To: <1249504372-17063-1-git-send-email-kilroyd@googlemail.com>
Basic ad-hoc support.
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
---
drivers/net/wireless/orinoco/cfg.c | 51 ++++++++++++++++++++++++++++++++++++
1 files changed, 51 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/orinoco/cfg.c b/drivers/net/wireless/orinoco/cfg.c
index 56bd4f1..84a7884 100644
--- a/drivers/net/wireless/orinoco/cfg.c
+++ b/drivers/net/wireless/orinoco/cfg.c
@@ -390,9 +390,60 @@ static int orinoco_disconnect(struct wiphy *wiphy, struct net_device *dev,
return err;
}
+static int orinoco_join_ibss(struct wiphy *wiphy, struct net_device *dev,
+ struct cfg80211_ibss_params *params)
+{
+ struct orinoco_private *priv = wiphy_priv(wiphy);
+ unsigned long lock;
+ int err;
+
+ if (orinoco_lock(priv, &lock) != 0)
+ return -EBUSY;
+
+ /* Setup the requested parameters in priv. If the card is not
+ * capable, then the driver will just ignore the settings that
+ * it can't do. */
+
+ err = __orinoco_connect(wiphy, params->channel, params->bssid,
+ params->ssid, params->ssid_len);
+ if (err)
+ goto out;
+
+ /* Ignore information elements and beacon interval */
+
+ err = orinoco_commit(priv);
+ out:
+ orinoco_unlock(priv, &lock);
+
+ return err;
+}
+
+static int orinoco_leave_ibss(struct wiphy *wiphy, struct net_device *dev)
+{
+ struct orinoco_private *priv = wiphy_priv(wiphy);
+ unsigned long lock;
+ int err;
+
+ if (orinoco_lock(priv, &lock) != 0)
+ return -EBUSY;
+
+ /* Do we need to disassociate as well? */
+
+ memset(priv->desired_bssid, 0, ETH_ALEN);
+ memset(priv->desired_essid, 0, sizeof(priv->desired_essid));
+
+ err = orinoco_commit(priv);
+
+ orinoco_unlock(priv, &lock);
+
+ return err;
+}
+
const struct cfg80211_ops orinoco_cfg_ops = {
.change_virtual_intf = orinoco_change_vif,
.scan = orinoco_scan,
.connect = orinoco_connect,
.disconnect = orinoco_disconnect,
+ .join_ibss = orinoco_join_ibss,
+ .leave_ibss = orinoco_leave_ibss,
};
--
1.6.3.3
next prev parent reply other threads:[~2009-08-05 20:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-05 20:32 [RFC 0/4] orinoco: use cfg80211 for key manipulation David Kilroy
2009-08-05 20:32 ` [RFC 1/4] orinoco: add cfg80211 connect and disconnect David Kilroy
2009-08-06 7:47 ` Johannes Berg
2009-08-05 20:32 ` David Kilroy [this message]
2009-08-05 20:32 ` [RFC 3/4] orinoco: implement cfg80211 key manipulation functions David Kilroy
2009-08-05 20:32 ` [RFC 4/4] orinoco: do WE via cfg80211 David Kilroy
2009-08-06 7:40 ` [RFC 0/4] orinoco: use cfg80211 for key manipulation Johannes Berg
2009-08-06 17:34 ` Dave
2009-08-07 20:42 ` Dave
2009-08-07 21:23 ` Dan Williams
2009-08-07 21:38 ` Dave
2009-08-07 21:50 ` Johannes Berg
2009-08-07 21:54 ` Dan Williams
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=1249504372-17063-3-git-send-email-kilroyd@googlemail.com \
--to=kilroyd@googlemail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=orinoco-devel@lists.sourceforge.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).