aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2014-10-13 18:55:20 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-13 20:18:26 -0400
commitda169607ae17c4340fe2ab286130741266709b07 (patch)
tree54ed1569c19f5e8d373b95c1871ab4a37f9015b8 /drivers/net
parent71dca95d5cf5ece6c1bee8e625e23c16025952c7 (diff)
wireless: libertas: print esaped string via %*pE
Instead of custom approach this allows to print escaped strings via recently added kernel extension: %*pE. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: "John W . Linville" <linville@tuxdriver.com> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/libertas/cfg.c8
-rw-r--r--drivers/net/wireless/libertas/mesh.c7
2 files changed, 5 insertions, 10 deletions
diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c
index 818b1edaaa9a..34f09ef90bb3 100644
--- a/drivers/net/wireless/libertas/cfg.c
+++ b/drivers/net/wireless/libertas/cfg.c
@@ -590,7 +590,6 @@ static int lbs_ret_scan(struct lbs_private *priv, unsigned long dummy,
590 int chan_no = -1; 590 int chan_no = -1;
591 const u8 *ssid = NULL; 591 const u8 *ssid = NULL;
592 u8 ssid_len = 0; 592 u8 ssid_len = 0;
593 DECLARE_SSID_BUF(ssid_buf);
594 593
595 int len = get_unaligned_le16(pos); 594 int len = get_unaligned_le16(pos);
596 pos += 2; 595 pos += 2;
@@ -644,10 +643,8 @@ static int lbs_ret_scan(struct lbs_private *priv, unsigned long dummy,
644 struct ieee80211_channel *channel = 643 struct ieee80211_channel *channel =
645 ieee80211_get_channel(wiphy, freq); 644 ieee80211_get_channel(wiphy, freq);
646 645
647 lbs_deb_scan("scan: %pM, capa %04x, chan %2d, %s, " 646 lbs_deb_scan("scan: %pM, capa %04x, chan %2d, %*pE, %d dBm\n",
648 "%d dBm\n", 647 bssid, capa, chan_no, ssid_len, ssid,
649 bssid, capa, chan_no,
650 print_ssid(ssid_buf, ssid, ssid_len),
651 LBS_SCAN_RSSI_TO_MBM(rssi)/100); 648 LBS_SCAN_RSSI_TO_MBM(rssi)/100);
652 649
653 if (channel && 650 if (channel &&
@@ -1984,7 +1981,6 @@ static int lbs_join_ibss(struct wiphy *wiphy, struct net_device *dev,
1984 struct lbs_private *priv = wiphy_priv(wiphy); 1981 struct lbs_private *priv = wiphy_priv(wiphy);
1985 int ret = 0; 1982 int ret = 0;
1986 struct cfg80211_bss *bss; 1983 struct cfg80211_bss *bss;
1987 DECLARE_SSID_BUF(ssid_buf);
1988 1984
1989 if (dev == priv->mesh_dev) 1985 if (dev == priv->mesh_dev)
1990 return -EOPNOTSUPP; 1986 return -EOPNOTSUPP;
diff --git a/drivers/net/wireless/libertas/mesh.c b/drivers/net/wireless/libertas/mesh.c
index 01a67f62696f..d0c881dd5846 100644
--- a/drivers/net/wireless/libertas/mesh.c
+++ b/drivers/net/wireless/libertas/mesh.c
@@ -93,7 +93,6 @@ static int lbs_mesh_config(struct lbs_private *priv, uint16_t action,
93{ 93{
94 struct cmd_ds_mesh_config cmd; 94 struct cmd_ds_mesh_config cmd;
95 struct mrvl_meshie *ie; 95 struct mrvl_meshie *ie;
96 DECLARE_SSID_BUF(ssid);
97 96
98 memset(&cmd, 0, sizeof(cmd)); 97 memset(&cmd, 0, sizeof(cmd));
99 cmd.channel = cpu_to_le16(chan); 98 cmd.channel = cpu_to_le16(chan);
@@ -122,9 +121,9 @@ static int lbs_mesh_config(struct lbs_private *priv, uint16_t action,
122 default: 121 default:
123 return -1; 122 return -1;
124 } 123 }
125 lbs_deb_cmd("mesh config action %d type %x channel %d SSID %s\n", 124 lbs_deb_cmd("mesh config action %d type %x channel %d SSID %*pE\n",
126 action, priv->mesh_tlv, chan, 125 action, priv->mesh_tlv, chan, priv->mesh_ssid_len,
127 print_ssid(ssid, priv->mesh_ssid, priv->mesh_ssid_len)); 126 priv->mesh_ssid);
128 127
129 return __lbs_mesh_config_send(priv, &cmd, action, priv->mesh_tlv); 128 return __lbs_mesh_config_send(priv, &cmd, action, priv->mesh_tlv);
130} 129}