Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f5956bf1e4575175135d636db1b7f3ab950e0dc3
Commit:     f5956bf1e4575175135d636db1b7f3ab950e0dc3
Parent:     387a1f046fcaf299d93bb6de81257670a4442648
Author:     David Woodhouse <[EMAIL PROTECTED]>
AuthorDate: Tue Dec 11 19:30:57 2007 -0500
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 15:06:56 2008 -0800

    libertas: allow get/set SSID on mshX device
    
    Signed-off-by: David Woodhouse <[EMAIL PROTECTED]>
    Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
---
 drivers/net/wireless/libertas/wext.c |   52 ++++++++++++++++++++++++++++++++-
 1 files changed, 50 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/libertas/wext.c 
b/drivers/net/wireless/libertas/wext.c
index e44c0ce..0a06072 100644
--- a/drivers/net/wireless/libertas/wext.c
+++ b/drivers/net/wireless/libertas/wext.c
@@ -1917,6 +1917,54 @@ out:
        return ret;
 }
 
+static int lbs_mesh_get_essid(struct net_device *dev,
+                             struct iw_request_info *info,
+                             struct iw_point *dwrq, char *extra)
+{
+       struct lbs_private *priv = dev->priv;
+
+       lbs_deb_enter(LBS_DEB_WEXT);
+
+       memcpy(extra, priv->mesh_ssid, priv->mesh_ssid_len);
+
+       dwrq->length = priv->mesh_ssid_len;
+
+       dwrq->flags = 1;        /* active */
+
+       lbs_deb_leave(LBS_DEB_WEXT);
+       return 0;
+}
+
+static int lbs_mesh_set_essid(struct net_device *dev,
+                             struct iw_request_info *info,
+                             struct iw_point *dwrq, char *extra)
+{
+       struct lbs_private *priv = dev->priv;
+       int ret = 0;
+
+       lbs_deb_enter(LBS_DEB_WEXT);
+
+       /* Check the size of the string */
+       if (dwrq->length > IW_ESSID_MAX_SIZE) {
+               ret = -E2BIG;
+               goto out;
+       }
+
+       if (!dwrq->flags || !dwrq->length) {
+               ret = -EINVAL;
+               goto out;
+       } else {
+               /* Specific SSID requested */
+               memcpy(priv->mesh_ssid, extra, dwrq->length);
+               priv->mesh_ssid_len = dwrq->length;
+       }
+
+       lbs_mesh_config(priv, 1);
+ out:
+       lbs_deb_leave_args(LBS_DEB_WEXT, "ret %d", ret);
+       return ret;
+}
+
 /**
  *  @brief Connect to the AP or Ad-hoc Network with specific bssid
  *
@@ -2071,8 +2119,8 @@ static const iw_handler mesh_wlan_handler[] = {
        (iw_handler) NULL,      /* SIOCGIWAPLIST - deprecated */
        (iw_handler) lbs_set_scan,      /* SIOCSIWSCAN */
        (iw_handler) lbs_get_scan,      /* SIOCGIWSCAN */
-       (iw_handler) NULL,              /* SIOCSIWESSID */
-       (iw_handler) NULL,              /* SIOCGIWESSID */
+       (iw_handler) lbs_mesh_set_essid,/* SIOCSIWESSID */
+       (iw_handler) lbs_mesh_get_essid,/* SIOCGIWESSID */
        (iw_handler) NULL,              /* SIOCSIWNICKN */
        (iw_handler) mesh_get_nick,     /* SIOCGIWNICKN */
        (iw_handler) NULL,      /* -- hole -- */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to