Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35243
b: refs/heads/master
c: ab644b0
h: refs/heads/master
i:
  35241: 0fe526c
  35239: 4cb39ae
v: v3
  • Loading branch information
Zhu Yi authored and John W. Linville committed Aug 29, 2006
1 parent c4e3c45 commit c4a6d5f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c580f67fd7fa9deee1f4cf6b86c694b880534a82
refs/heads/master: ab644b0b51bf3170b398c087b7a34be6d3c7b7ba
39 changes: 17 additions & 22 deletions trunk/drivers/net/wireless/ipw2200.c
Original file line number Diff line number Diff line change
Expand Up @@ -8837,28 +8837,23 @@ static int ipw_wx_set_essid(struct net_device *dev,
union iwreq_data *wrqu, char *extra)
{
struct ipw_priv *priv = ieee80211_priv(dev);
char *essid = ""; /* ANY */
int length = 0;
mutex_lock(&priv->mutex);
if (wrqu->essid.flags && wrqu->essid.length) {
length = wrqu->essid.length - 1;
essid = extra;
}
if (length == 0) {
IPW_DEBUG_WX("Setting ESSID to ANY\n");
if ((priv->config & CFG_STATIC_ESSID) &&
!(priv->status & (STATUS_ASSOCIATED |
STATUS_ASSOCIATING))) {
IPW_DEBUG_ASSOC("Attempting to associate with new "
"parameters.\n");
priv->config &= ~CFG_STATIC_ESSID;
ipw_associate(priv);
}
mutex_unlock(&priv->mutex);
return 0;
}
char *essid;
int length;

mutex_lock(&priv->mutex);

if (!wrqu->essid.flags)
{
IPW_DEBUG_WX("Setting ESSID to ANY\n");
ipw_disassociate(priv);
priv->config &= ~CFG_STATIC_ESSID;
ipw_associate(priv);
mutex_unlock(&priv->mutex);
return 0;
}

length = min(length, IW_ESSID_MAX_SIZE);
length = min(wrqu->essid.length, IW_ESSID_MAX_SIZE);
essid = extra;

priv->config |= CFG_STATIC_ESSID;

Expand All @@ -8868,7 +8863,7 @@ static int ipw_wx_set_essid(struct net_device *dev,
return 0;
}

IPW_DEBUG_WX("Setting ESSID: '%s' (%d)\n", escape_essid(essid, length),
IPW_DEBUG_WX("Setting ESSID: '%s' (%d)\n", escape_essid(extra, length),
length);

priv->essid_len = length;
Expand Down

0 comments on commit c4a6d5f

Please sign in to comment.