Skip to content

Commit

Permalink
Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…git/linville/wireless-2.6 into tmp
  • Loading branch information
Jeff Garzik committed Sep 26, 2006
2 parents cc3afe6 + a67ab2b commit b0df3bd
Show file tree
Hide file tree
Showing 28 changed files with 274 additions and 207 deletions.
1 change: 0 additions & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2655,7 +2655,6 @@ M: josejx@gentoo.org
P: Daniel Drake
M: dsd@gentoo.org
W: http://softmac.sipsolutions.net/
L: softmac-dev@sipsolutions.net
L: netdev@vger.kernel.org
S: Maintained

Expand Down
19 changes: 10 additions & 9 deletions drivers/net/wireless/airo.c
Original file line number Diff line number Diff line change
Expand Up @@ -5868,7 +5868,7 @@ static int airo_set_essid(struct net_device *dev,
int index = (dwrq->flags & IW_ENCODE_INDEX) - 1;

/* Check the size of the string */
if(dwrq->length > IW_ESSID_MAX_SIZE+1) {
if(dwrq->length > IW_ESSID_MAX_SIZE) {
return -E2BIG ;
}
/* Check if index is valid */
Expand All @@ -5880,7 +5880,7 @@ static int airo_set_essid(struct net_device *dev,
memset(SSID_rid.ssids[index].ssid, 0,
sizeof(SSID_rid.ssids[index].ssid));
memcpy(SSID_rid.ssids[index].ssid, extra, dwrq->length);
SSID_rid.ssids[index].len = dwrq->length - 1;
SSID_rid.ssids[index].len = dwrq->length;
}
SSID_rid.len = sizeof(SSID_rid);
/* Write it to the card */
Expand Down Expand Up @@ -5990,7 +5990,7 @@ static int airo_set_nick(struct net_device *dev,
struct airo_info *local = dev->priv;

/* Check the size of the string */
if(dwrq->length > 16 + 1) {
if(dwrq->length > 16) {
return -E2BIG;
}
readConfigRid(local, 1);
Expand All @@ -6015,7 +6015,7 @@ static int airo_get_nick(struct net_device *dev,
readConfigRid(local, 1);
strncpy(extra, local->config.nodeName, 16);
extra[16] = '\0';
dwrq->length = strlen(extra) + 1;
dwrq->length = strlen(extra);

return 0;
}
Expand Down Expand Up @@ -6767,9 +6767,9 @@ static int airo_set_retry(struct net_device *dev,
}
readConfigRid(local, 1);
if(vwrq->flags & IW_RETRY_LIMIT) {
if(vwrq->flags & IW_RETRY_MAX)
if(vwrq->flags & IW_RETRY_LONG)
local->config.longRetryLimit = vwrq->value;
else if (vwrq->flags & IW_RETRY_MIN)
else if (vwrq->flags & IW_RETRY_SHORT)
local->config.shortRetryLimit = vwrq->value;
else {
/* No modifier : set both */
Expand Down Expand Up @@ -6805,14 +6805,14 @@ static int airo_get_retry(struct net_device *dev,
if((vwrq->flags & IW_RETRY_TYPE) == IW_RETRY_LIFETIME) {
vwrq->flags = IW_RETRY_LIFETIME;
vwrq->value = (int)local->config.txLifetime * 1024;
} else if((vwrq->flags & IW_RETRY_MAX)) {
vwrq->flags = IW_RETRY_LIMIT | IW_RETRY_MAX;
} else if((vwrq->flags & IW_RETRY_LONG)) {
vwrq->flags = IW_RETRY_LIMIT | IW_RETRY_LONG;
vwrq->value = (int)local->config.longRetryLimit;
} else {
vwrq->flags = IW_RETRY_LIMIT;
vwrq->value = (int)local->config.shortRetryLimit;
if((int)local->config.shortRetryLimit != (int)local->config.longRetryLimit)
vwrq->flags |= IW_RETRY_MIN;
vwrq->flags |= IW_RETRY_SHORT;
}

return 0;
Expand Down Expand Up @@ -6990,6 +6990,7 @@ static int airo_set_power(struct net_device *dev,
local->config.rmode |= RXMODE_BC_MC_ADDR;
set_bit (FLAG_COMMIT, &local->flags);
case IW_POWER_ON:
/* This is broken, fixme ;-) */
break;
default:
return -EINVAL;
Expand Down
18 changes: 9 additions & 9 deletions drivers/net/wireless/atmel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1656,13 +1656,13 @@ static int atmel_set_essid(struct net_device *dev,
priv->connect_to_any_BSS = 0;

/* Check the size of the string */
if (dwrq->length > MAX_SSID_LENGTH + 1)
if (dwrq->length > MAX_SSID_LENGTH)
return -E2BIG;
if (index != 0)
return -EINVAL;

memcpy(priv->new_SSID, extra, dwrq->length - 1);
priv->new_SSID_size = dwrq->length - 1;
memcpy(priv->new_SSID, extra, dwrq->length);
priv->new_SSID_size = dwrq->length;
}

return -EINPROGRESS;
Expand Down Expand Up @@ -2120,9 +2120,9 @@ static int atmel_set_retry(struct net_device *dev,
struct atmel_private *priv = netdev_priv(dev);

if (!vwrq->disabled && (vwrq->flags & IW_RETRY_LIMIT)) {
if (vwrq->flags & IW_RETRY_MAX)
if (vwrq->flags & IW_RETRY_LONG)
priv->long_retry = vwrq->value;
else if (vwrq->flags & IW_RETRY_MIN)
else if (vwrq->flags & IW_RETRY_SHORT)
priv->short_retry = vwrq->value;
else {
/* No modifier : set both */
Expand All @@ -2144,15 +2144,15 @@ static int atmel_get_retry(struct net_device *dev,

vwrq->disabled = 0; /* Can't be disabled */

/* Note : by default, display the min retry number */
if (vwrq->flags & IW_RETRY_MAX) {
vwrq->flags = IW_RETRY_LIMIT | IW_RETRY_MAX;
/* Note : by default, display the short retry number */
if (vwrq->flags & IW_RETRY_LONG) {
vwrq->flags = IW_RETRY_LIMIT | IW_RETRY_LONG;
vwrq->value = priv->long_retry;
} else {
vwrq->flags = IW_RETRY_LIMIT;
vwrq->value = priv->short_retry;
if (priv->long_retry != priv->short_retry)
vwrq->flags |= IW_RETRY_MIN;
vwrq->flags |= IW_RETRY_SHORT;
}

return 0;
Expand Down
1 change: 0 additions & 1 deletion drivers/net/wireless/bcm43xx/bcm43xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,6 @@ struct bcm43xx_noise_calculation {
};

struct bcm43xx_stats {
u8 link_quality;
u8 noise;
struct iw_statistics wstats;
/* Store the last TX/RX times here for updating the leds. */
Expand Down
10 changes: 5 additions & 5 deletions drivers/net/wireless/bcm43xx/bcm43xx_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2405,9 +2405,10 @@ static int bcm43xx_chip_init(struct bcm43xx_private *bcm)
BCM43xx_UCODE_TIME) & 0x1f);

if ( value16 > 0x128 ) {
dprintk(KERN_ERR PFX
"Firmware: no support for microcode rev > 0x128\n");
err = -1;
printk(KERN_ERR PFX
"Firmware: no support for microcode extracted "
"from version 4.x binary drivers.\n");
err = -EOPNOTSUPP;
goto err_release_fw;
}

Expand Down Expand Up @@ -3169,8 +3170,7 @@ static void bcm43xx_periodic_work_handler(void *d)
* be preemtible.
*/
mutex_lock(&bcm->mutex);
netif_stop_queue(bcm->net_dev);
synchronize_net();
netif_tx_disable(bcm->net_dev);
spin_lock_irqsave(&bcm->irq_lock, flags);
bcm43xx_mac_suspend(bcm);
if (bcm43xx_using_pio(bcm))
Expand Down
15 changes: 7 additions & 8 deletions drivers/net/wireless/bcm43xx/bcm43xx_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ static void bcm43xx_phy_setupg(struct bcm43xx_private *bcm)
if (phy->rev <= 2)
for (i = 0; i < BCM43xx_ILT_NOISESCALEG_SIZE; i++)
bcm43xx_ilt_write(bcm, 0x1400 + i, bcm43xx_ilt_noisescaleg1[i]);
else if ((phy->rev == 7) && (bcm43xx_phy_read(bcm, 0x0449) & 0x0200))
else if ((phy->rev >= 7) && (bcm43xx_phy_read(bcm, 0x0449) & 0x0200))
for (i = 0; i < BCM43xx_ILT_NOISESCALEG_SIZE; i++)
bcm43xx_ilt_write(bcm, 0x1400 + i, bcm43xx_ilt_noisescaleg3[i]);
else
Expand All @@ -371,7 +371,7 @@ static void bcm43xx_phy_setupg(struct bcm43xx_private *bcm)
if (phy->rev == 2)
for (i = 0; i < BCM43xx_ILT_SIGMASQR_SIZE; i++)
bcm43xx_ilt_write(bcm, 0x5000 + i, bcm43xx_ilt_sigmasqr1[i]);
else if ((phy->rev > 2) && (phy->rev <= 7))
else if ((phy->rev > 2) && (phy->rev <= 8))
for (i = 0; i < BCM43xx_ILT_SIGMASQR_SIZE; i++)
bcm43xx_ilt_write(bcm, 0x5000 + i, bcm43xx_ilt_sigmasqr2[i]);

Expand Down Expand Up @@ -1197,7 +1197,7 @@ static void bcm43xx_phy_initg(struct bcm43xx_private *bcm)

if (phy->rev == 1)
bcm43xx_phy_initb5(bcm);
else if (phy->rev >= 2 && phy->rev <= 7)
else
bcm43xx_phy_initb6(bcm);
if (phy->rev >= 2 || phy->connected)
bcm43xx_phy_inita(bcm);
Expand Down Expand Up @@ -1241,23 +1241,22 @@ static void bcm43xx_phy_initg(struct bcm43xx_private *bcm)
bcm43xx_phy_lo_g_measure(bcm);
} else {
if (radio->version == 0x2050 && radio->revision == 8) {
//FIXME
bcm43xx_radio_write16(bcm, 0x0052,
(radio->txctl1 << 4) | radio->txctl2);
} else {
bcm43xx_radio_write16(bcm, 0x0052,
(bcm43xx_radio_read16(bcm, 0x0052)
& 0xFFF0) | radio->txctl1);
}
if (phy->rev >= 6) {
/*
bcm43xx_phy_write(bcm, 0x0036,
(bcm43xx_phy_read(bcm, 0x0036)
& 0xF000) | (FIXME << 12));
*/
& 0xF000) | (radio->txctl2 << 12));
}
if (bcm->sprom.boardflags & BCM43xx_BFL_PACTRL)
bcm43xx_phy_write(bcm, 0x002E, 0x8075);
else
bcm43xx_phy_write(bcm, 0x003E, 0x807F);
bcm43xx_phy_write(bcm, 0x002E, 0x807F);
if (phy->rev < 2)
bcm43xx_phy_write(bcm, 0x002F, 0x0101);
else
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/bcm43xx/bcm43xx_wx.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ static int bcm43xx_wx_get_nick(struct net_device *net_dev,
size_t len;

mutex_lock(&bcm->mutex);
len = strlen(bcm->nick) + 1;
len = strlen(bcm->nick);
memcpy(extra, bcm->nick, len);
data->data.length = (__u16)len;
data->data.flags = 1;
Expand Down
5 changes: 2 additions & 3 deletions drivers/net/wireless/bcm43xx/bcm43xx_xmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,15 +496,14 @@ int bcm43xx_rx(struct bcm43xx_private *bcm,
stats.signal = bcm43xx_rssi_postprocess(bcm, rxhdr->rssi, is_ofdm,
!!(rxflags1 & BCM43xx_RXHDR_FLAGS1_2053RSSIADJ),
!!(rxflags3 & BCM43xx_RXHDR_FLAGS3_2050RSSIADJ));
//TODO stats.noise =
stats.noise = bcm->stats.noise;
if (is_ofdm)
stats.rate = bcm43xx_plcp_get_bitrate_ofdm(plcp);
else
stats.rate = bcm43xx_plcp_get_bitrate_cck(plcp);
stats.received_channel = radio->channel;
//TODO stats.control =
stats.mask = IEEE80211_STATMASK_SIGNAL |
//TODO IEEE80211_STATMASK_NOISE |
IEEE80211_STATMASK_NOISE |
IEEE80211_STATMASK_RATE |
IEEE80211_STATMASK_RSSI;
if (phy->type == BCM43xx_PHYTYPE_A)
Expand Down
10 changes: 5 additions & 5 deletions drivers/net/wireless/hostap/hostap_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1412,9 +1412,9 @@ static int prism2_ioctl_siwretry(struct net_device *dev,
/* what could be done, if firmware would support this.. */

if (rrq->flags & IW_RETRY_LIMIT) {
if (rrq->flags & IW_RETRY_MAX)
if (rrq->flags & IW_RETRY_LONG)
HFA384X_RID_LONGRETRYLIMIT = rrq->value;
else if (rrq->flags & IW_RETRY_MIN)
else if (rrq->flags & IW_RETRY_SHORT)
HFA384X_RID_SHORTRETRYLIMIT = rrq->value;
else {
HFA384X_RID_LONGRETRYLIMIT = rrq->value;
Expand Down Expand Up @@ -1468,14 +1468,14 @@ static int prism2_ioctl_giwretry(struct net_device *dev,
rrq->value = le16_to_cpu(altretry);
else
rrq->value = local->manual_retry_count;
} else if ((rrq->flags & IW_RETRY_MAX)) {
rrq->flags = IW_RETRY_LIMIT | IW_RETRY_MAX;
} else if ((rrq->flags & IW_RETRY_LONG)) {
rrq->flags = IW_RETRY_LIMIT | IW_RETRY_LONG;
rrq->value = longretry;
} else {
rrq->flags = IW_RETRY_LIMIT;
rrq->value = shortretry;
if (shortretry != longretry)
rrq->flags |= IW_RETRY_MIN;
rrq->flags |= IW_RETRY_SHORT;
}
}
return 0;
Expand Down
14 changes: 7 additions & 7 deletions drivers/net/wireless/ipw2100.c
Original file line number Diff line number Diff line change
Expand Up @@ -6958,7 +6958,7 @@ static int ipw2100_wx_set_essid(struct net_device *dev,
}

if (wrqu->essid.flags && wrqu->essid.length) {
length = wrqu->essid.length - 1;
length = wrqu->essid.length;
essid = extra;
}

Expand Down Expand Up @@ -7051,7 +7051,7 @@ static int ipw2100_wx_get_nick(struct net_device *dev,

struct ipw2100_priv *priv = ieee80211_priv(dev);

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 */

Expand Down Expand Up @@ -7343,14 +7343,14 @@ static int ipw2100_wx_set_retry(struct net_device *dev,
goto done;
}

if (wrqu->retry.flags & IW_RETRY_MIN) {
if (wrqu->retry.flags & IW_RETRY_SHORT) {
err = ipw2100_set_short_retry(priv, wrqu->retry.value);
IPW_DEBUG_WX("SET Short Retry Limit -> %d \n",
wrqu->retry.value);
goto done;
}

if (wrqu->retry.flags & IW_RETRY_MAX) {
if (wrqu->retry.flags & IW_RETRY_LONG) {
err = ipw2100_set_long_retry(priv, wrqu->retry.value);
IPW_DEBUG_WX("SET Long Retry Limit -> %d \n",
wrqu->retry.value);
Expand Down Expand Up @@ -7383,14 +7383,14 @@ static int ipw2100_wx_get_retry(struct net_device *dev,
if ((wrqu->retry.flags & IW_RETRY_TYPE) == IW_RETRY_LIFETIME)
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 {
wrqu->retry.flags =
(priv->short_retry_limit !=
priv->long_retry_limit) ?
IW_RETRY_LIMIT | IW_RETRY_MIN : IW_RETRY_LIMIT;
IW_RETRY_LIMIT | IW_RETRY_SHORT : IW_RETRY_LIMIT;

wrqu->retry.value = priv->short_retry_limit;
}
Expand Down
16 changes: 7 additions & 9 deletions drivers/net/wireless/ipw2200.c
Original file line number Diff line number Diff line change
Expand Up @@ -8875,8 +8875,6 @@ static int ipw_wx_set_essid(struct net_device *dev,
}

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

priv->config |= CFG_STATIC_ESSID;

Expand Down Expand Up @@ -8953,7 +8951,7 @@ static int ipw_wx_get_nick(struct net_device *dev,
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);
Expand Down Expand Up @@ -9276,9 +9274,9 @@ static int ipw_wx_set_retry(struct net_device *dev,
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;
Expand Down Expand Up @@ -9307,11 +9305,11 @@ static int ipw_wx_get_retry(struct net_device *dev,
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;
Expand Down
Loading

0 comments on commit b0df3bd

Please sign in to comment.