diff -u -p linux/drivers/net/wireless/ipw2200.20.c linux/drivers/net/wireless/ipw2200.c --- linux/drivers/net/wireless/ipw2200.20.c 2006-04-03 16:54:52.000000000 -0700 +++ linux/drivers/net/wireless/ipw2200.c 2006-04-03 16:56:36.000000000 -0700 @@ -8468,7 +8468,7 @@ static int ipw_wx_set_essid(struct net_d int length = 0; mutex_lock(&priv->mutex); if (wrqu->essid.flags && wrqu->essid.length) { - length = wrqu->essid.length - 1; + length = wrqu->essid.length; essid = extra; } if (length == 0) { @@ -8561,7 +8561,7 @@ static int ipw_wx_get_nick(struct net_de struct ipw_priv *priv = ieee80211_priv(dev); IPW_DEBUG_WX("Getting nick\n"); mutex_lock(&priv->mutex); - wrqu->data.length = strlen(priv->nick) + 1; + wrqu->data.length = strlen(priv->nick); memcpy(extra, priv->nick, wrqu->data.length); wrqu->data.flags = 1; /* active */ mutex_unlock(&priv->mutex); @@ -8883,9 +8883,9 @@ static int ipw_wx_set_retry(struct net_d return -EINVAL; mutex_lock(&priv->mutex); - if (wrqu->retry.flags & IW_RETRY_MIN) + if (wrqu->retry.flags & IW_RETRY_SHORT) priv->short_retry_limit = (u8) wrqu->retry.value; - else if (wrqu->retry.flags & IW_RETRY_MAX) + else if (wrqu->retry.flags & IW_RETRY_LONG) priv->long_retry_limit = (u8) wrqu->retry.value; else { priv->short_retry_limit = (u8) wrqu->retry.value; @@ -8914,11 +8914,11 @@ static int ipw_wx_get_retry(struct net_d return -EINVAL; } - if (wrqu->retry.flags & IW_RETRY_MAX) { - wrqu->retry.flags = IW_RETRY_LIMIT | IW_RETRY_MAX; + if (wrqu->retry.flags & IW_RETRY_LONG) { + wrqu->retry.flags = IW_RETRY_LIMIT | IW_RETRY_LONG; wrqu->retry.value = priv->long_retry_limit; - } else if (wrqu->retry.flags & IW_RETRY_MIN) { - wrqu->retry.flags = IW_RETRY_LIMIT | IW_RETRY_MIN; + } else if (wrqu->retry.flags & IW_RETRY_SHORT) { + wrqu->retry.flags = IW_RETRY_LIMIT | IW_RETRY_SHORT; wrqu->retry.value = priv->short_retry_limit; } else { wrqu->retry.flags = IW_RETRY_LIMIT;