aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ipw2100.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2008-09-30 20:59:05 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-10-31 19:00:50 -0400
commit9387b7caf3049168fc97a8a9111af8fe2143af18 (patch)
tree6a19e5477d6a6badf19788536a9d3e1913ae48e1 /drivers/net/wireless/ipw2100.c
parent2819f8ad6da1e24b5dd94a221978e61f2a9c972a (diff)
wireless: use individual buffers for printing ssid values
Also change escape_ssid to print_ssid to match print_mac semantics. Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ipw2100.c')
-rw-r--r--drivers/net/wireless/ipw2100.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c
index 223914e3e07e..062c9f280304 100644
--- a/drivers/net/wireless/ipw2100.c
+++ b/drivers/net/wireless/ipw2100.c
@@ -163,6 +163,8 @@ that only one external action is invoked at a time.
163#include <linux/ctype.h> 163#include <linux/ctype.h>
164#include <linux/pm_qos_params.h> 164#include <linux/pm_qos_params.h>
165 165
166#include <net/lib80211.h>
167
166#include "ipw2100.h" 168#include "ipw2100.h"
167 169
168#define IPW2100_VERSION "git-1.2.2" 170#define IPW2100_VERSION "git-1.2.2"
@@ -1914,6 +1916,7 @@ static void isr_indicate_associated(struct ipw2100_priv *priv, u32 status)
1914 u32 chan; 1916 u32 chan;
1915 char *txratename; 1917 char *txratename;
1916 u8 bssid[ETH_ALEN]; 1918 u8 bssid[ETH_ALEN];
1919 DECLARE_SSID_BUF(ssid);
1917 1920
1918 /* 1921 /*
1919 * TBD: BSSID is usually 00:00:00:00:00:00 here and not 1922 * TBD: BSSID is usually 00:00:00:00:00:00 here and not
@@ -1975,7 +1978,7 @@ static void isr_indicate_associated(struct ipw2100_priv *priv, u32 status)
1975 } 1978 }
1976 1979
1977 IPW_DEBUG_INFO("%s: Associated with '%s' at %s, channel %d (BSSID=%pM)\n", 1980 IPW_DEBUG_INFO("%s: Associated with '%s' at %s, channel %d (BSSID=%pM)\n",
1978 priv->net_dev->name, escape_ssid(essid, essid_len), 1981 priv->net_dev->name, print_ssid(ssid, essid, essid_len),
1979 txratename, chan, bssid); 1982 txratename, chan, bssid);
1980 1983
1981 /* now we copy read ssid into dev */ 1984 /* now we copy read ssid into dev */
@@ -2002,8 +2005,9 @@ static int ipw2100_set_essid(struct ipw2100_priv *priv, char *essid,
2002 .host_command_length = ssid_len 2005 .host_command_length = ssid_len
2003 }; 2006 };
2004 int err; 2007 int err;
2008 DECLARE_SSID_BUF(ssid);
2005 2009
2006 IPW_DEBUG_HC("SSID: '%s'\n", escape_ssid(essid, ssid_len)); 2010 IPW_DEBUG_HC("SSID: '%s'\n", print_ssid(ssid, essid, ssid_len));
2007 2011
2008 if (ssid_len) 2012 if (ssid_len)
2009 memcpy(cmd.host_command_parameters, essid, ssid_len); 2013 memcpy(cmd.host_command_parameters, essid, ssid_len);
@@ -2044,9 +2048,11 @@ static int ipw2100_set_essid(struct ipw2100_priv *priv, char *essid,
2044 2048
2045static void isr_indicate_association_lost(struct ipw2100_priv *priv, u32 status) 2049static void isr_indicate_association_lost(struct ipw2100_priv *priv, u32 status)
2046{ 2050{
2051 DECLARE_SSID_BUF(ssid);
2052
2047 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | IPW_DL_ASSOC, 2053 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | IPW_DL_ASSOC,
2048 "disassociated: '%s' %pM \n", 2054 "disassociated: '%s' %pM \n",
2049 escape_ssid(priv->essid, priv->essid_len), 2055 print_ssid(ssid, priv->essid, priv->essid_len),
2050 priv->bssid); 2056 priv->bssid);
2051 2057
2052 priv->status &= ~(STATUS_ASSOCIATED | STATUS_ASSOCIATING); 2058 priv->status &= ~(STATUS_ASSOCIATED | STATUS_ASSOCIATING);
@@ -6958,6 +6964,7 @@ static int ipw2100_wx_set_essid(struct net_device *dev,
6958 char *essid = ""; /* ANY */ 6964 char *essid = ""; /* ANY */
6959 int length = 0; 6965 int length = 0;
6960 int err = 0; 6966 int err = 0;
6967 DECLARE_SSID_BUF(ssid);
6961 6968
6962 mutex_lock(&priv->action_mutex); 6969 mutex_lock(&priv->action_mutex);
6963 if (!(priv->status & STATUS_INITIALIZED)) { 6970 if (!(priv->status & STATUS_INITIALIZED)) {
@@ -6987,8 +6994,8 @@ static int ipw2100_wx_set_essid(struct net_device *dev,
6987 goto done; 6994 goto done;
6988 } 6995 }
6989 6996
6990 IPW_DEBUG_WX("Setting ESSID: '%s' (%d)\n", escape_ssid(essid, length), 6997 IPW_DEBUG_WX("Setting ESSID: '%s' (%d)\n",
6991 length); 6998 print_ssid(ssid, essid, length), length);
6992 6999
6993 priv->essid_len = length; 7000 priv->essid_len = length;
6994 memcpy(priv->essid, essid, priv->essid_len); 7001 memcpy(priv->essid, essid, priv->essid_len);
@@ -7009,12 +7016,13 @@ static int ipw2100_wx_get_essid(struct net_device *dev,
7009 */ 7016 */
7010 7017
7011 struct ipw2100_priv *priv = ieee80211_priv(dev); 7018 struct ipw2100_priv *priv = ieee80211_priv(dev);
7019 DECLARE_SSID_BUF(ssid);
7012 7020
7013 /* If we are associated, trying to associate, or have a statically 7021 /* If we are associated, trying to associate, or have a statically
7014 * configured ESSID then return that; otherwise return ANY */ 7022 * configured ESSID then return that; otherwise return ANY */
7015 if (priv->config & CFG_STATIC_ESSID || priv->status & STATUS_ASSOCIATED) { 7023 if (priv->config & CFG_STATIC_ESSID || priv->status & STATUS_ASSOCIATED) {
7016 IPW_DEBUG_WX("Getting essid: '%s'\n", 7024 IPW_DEBUG_WX("Getting essid: '%s'\n",
7017 escape_ssid(priv->essid, priv->essid_len)); 7025 print_ssid(ssid, priv->essid, priv->essid_len));
7018 memcpy(extra, priv->essid, priv->essid_len); 7026 memcpy(extra, priv->essid, priv->essid_len);
7019 wrqu->essid.length = priv->essid_len; 7027 wrqu->essid.length = priv->essid_len;
7020 wrqu->essid.flags = 1; /* active */ 7028 wrqu->essid.flags = 1; /* active */