Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35244
b: refs/heads/master
c: a9f0d42
h: refs/heads/master
v: v3
  • Loading branch information
Zhu Yi authored and John W. Linville committed Aug 29, 2006
1 parent c4a6d5f commit 8da2884
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 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: ab644b0b51bf3170b398c087b7a34be6d3c7b7ba
refs/heads/master: a9f0d42321a7ac40d244a7c6d74a3d1c7a4aa4f3
11 changes: 6 additions & 5 deletions trunk/drivers/net/wireless/ipw2200.c
Original file line number Diff line number Diff line change
Expand Up @@ -8837,7 +8837,6 @@ 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;
int length;

mutex_lock(&priv->mutex);
Expand All @@ -8852,12 +8851,14 @@ static int ipw_wx_set_essid(struct net_device *dev,
return 0;
}

length = min(wrqu->essid.length, IW_ESSID_MAX_SIZE);
essid = extra;
length = min((int)wrqu->essid.length, IW_ESSID_MAX_SIZE);
if (!extra[length - 1])
length--;

priv->config |= CFG_STATIC_ESSID;

if (priv->essid_len == length && !memcmp(priv->essid, extra, length)) {
if (priv->essid_len == length && !memcmp(priv->essid, extra, length)
&& (priv->status & (STATUS_ASSOCIATED | STATUS_ASSOCIATING))) {
IPW_DEBUG_WX("ESSID set to current ESSID.\n");
mutex_unlock(&priv->mutex);
return 0;
Expand All @@ -8867,7 +8868,7 @@ static int ipw_wx_set_essid(struct net_device *dev,
length);

priv->essid_len = length;
memcpy(priv->essid, essid, priv->essid_len);
memcpy(priv->essid, extra, priv->essid_len);

/* Network configuration changed -- force [re]association */
IPW_DEBUG_ASSOC("[re]association triggered due to ESSID change.\n");
Expand Down

0 comments on commit 8da2884

Please sign in to comment.