aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/libertas')
-rw-r--r--drivers/net/wireless/libertas/wext.c52
1 files changed, 50 insertions, 2 deletions
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c
index e44c0ce804ed..0a060726cf32 100644
--- a/drivers/net/wireless/libertas/wext.c
+++ b/drivers/net/wireless/libertas/wext.c
@@ -1917,6 +1917,54 @@ out:
1917 return ret; 1917 return ret;
1918} 1918}
1919 1919
1920static int lbs_mesh_get_essid(struct net_device *dev,
1921 struct iw_request_info *info,
1922 struct iw_point *dwrq, char *extra)
1923{
1924 struct lbs_private *priv = dev->priv;
1925
1926 lbs_deb_enter(LBS_DEB_WEXT);
1927
1928 memcpy(extra, priv->mesh_ssid, priv->mesh_ssid_len);
1929
1930 dwrq->length = priv->mesh_ssid_len;
1931
1932 dwrq->flags = 1; /* active */
1933
1934 lbs_deb_leave(LBS_DEB_WEXT);
1935 return 0;
1936}
1937
1938static int lbs_mesh_set_essid(struct net_device *dev,
1939 struct iw_request_info *info,
1940 struct iw_point *dwrq, char *extra)
1941{
1942 struct lbs_private *priv = dev->priv;
1943 int ret = 0;
1944
1945 lbs_deb_enter(LBS_DEB_WEXT);
1946
1947 /* Check the size of the string */
1948 if (dwrq->length > IW_ESSID_MAX_SIZE) {
1949 ret = -E2BIG;
1950 goto out;
1951 }
1952
1953 if (!dwrq->flags || !dwrq->length) {
1954 ret = -EINVAL;
1955 goto out;
1956 } else {
1957 /* Specific SSID requested */
1958 memcpy(priv->mesh_ssid, extra, dwrq->length);
1959 priv->mesh_ssid_len = dwrq->length;
1960 }
1961
1962 lbs_mesh_config(priv, 1);
1963 out:
1964 lbs_deb_leave_args(LBS_DEB_WEXT, "ret %d", ret);
1965 return ret;
1966}
1967
1920/** 1968/**
1921 * @brief Connect to the AP or Ad-hoc Network with specific bssid 1969 * @brief Connect to the AP or Ad-hoc Network with specific bssid
1922 * 1970 *
@@ -2071,8 +2119,8 @@ static const iw_handler mesh_wlan_handler[] = {
2071 (iw_handler) NULL, /* SIOCGIWAPLIST - deprecated */ 2119 (iw_handler) NULL, /* SIOCGIWAPLIST - deprecated */
2072 (iw_handler) lbs_set_scan, /* SIOCSIWSCAN */ 2120 (iw_handler) lbs_set_scan, /* SIOCSIWSCAN */
2073 (iw_handler) lbs_get_scan, /* SIOCGIWSCAN */ 2121 (iw_handler) lbs_get_scan, /* SIOCGIWSCAN */
2074 (iw_handler) NULL, /* SIOCSIWESSID */ 2122 (iw_handler) lbs_mesh_set_essid,/* SIOCSIWESSID */
2075 (iw_handler) NULL, /* SIOCGIWESSID */ 2123 (iw_handler) lbs_mesh_get_essid,/* SIOCGIWESSID */
2076 (iw_handler) NULL, /* SIOCSIWNICKN */ 2124 (iw_handler) NULL, /* SIOCSIWNICKN */
2077 (iw_handler) mesh_get_nick, /* SIOCGIWNICKN */ 2125 (iw_handler) mesh_get_nick, /* SIOCGIWNICKN */
2078 (iw_handler) NULL, /* -- hole -- */ 2126 (iw_handler) NULL, /* -- hole -- */