Skip to content

Commit

Permalink
Merge branch 'upstream-jgarzik' of git://git.kernel.org/pub/scm/linux…
Browse files Browse the repository at this point in the history
…/kernel/git/linville/wireless-2.6 into upstream
  • Loading branch information
Jeff Garzik committed Jul 18, 2007
2 parents dbf812d + 2534346 commit 5e1751f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 18 deletions.
6 changes: 3 additions & 3 deletions drivers/net/wireless/ipw2100.c
Original file line number Diff line number Diff line change
Expand Up @@ -7868,10 +7868,10 @@ static int ipw2100_wx_set_powermode(struct net_device *dev,
goto done;
}

if ((mode < 1) || (mode > POWER_MODES))
if ((mode < 0) || (mode > POWER_MODES))
mode = IPW_POWER_AUTO;

if (priv->power_mode != mode)
if (IPW_POWER_LEVEL(priv->power_mode) != mode)
err = ipw2100_set_power_mode(priv, mode);
done:
mutex_unlock(&priv->action_mutex);
Expand Down Expand Up @@ -7902,7 +7902,7 @@ static int ipw2100_wx_get_powermode(struct net_device *dev,
break;
case IPW_POWER_AUTO:
snprintf(extra, MAX_POWER_STRING,
"Power save level: %d (Auto)", 0);
"Power save level: %d (Auto)", level);
break;
default:
timeout = timeout_duration[level - 1] / 1000;
Expand Down
18 changes: 8 additions & 10 deletions drivers/net/wireless/ipw2200.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
#define VQ
#endif

#define IPW2200_VERSION "1.2.0" VK VD VM VP VR VQ
#define IPW2200_VERSION "1.2.2" VK VD VM VP VR VQ
#define DRV_DESCRIPTION "Intel(R) PRO/Wireless 2200/2915 Network Driver"
#define DRV_COPYRIGHT "Copyright(c) 2003-2006 Intel Corporation"
#define DRV_VERSION IPW2200_VERSION
Expand Down Expand Up @@ -2506,7 +2506,7 @@ static int ipw_send_power_mode(struct ipw_priv *priv, u32 mode)
break;
}

param = cpu_to_le32(mode);
param = cpu_to_le32(param);
return ipw_send_cmd_pdu(priv, IPW_CMD_POWER_MODE, sizeof(param),
&param);
}
Expand Down Expand Up @@ -9568,6 +9568,7 @@ static int ipw_wx_set_power(struct net_device *dev,
priv->power_mode = IPW_POWER_ENABLED | IPW_POWER_BATTERY;
else
priv->power_mode = IPW_POWER_ENABLED | priv->power_mode;

err = ipw_send_power_mode(priv, IPW_POWER_LEVEL(priv->power_mode));
if (err) {
IPW_DEBUG_WX("failed setting power mode.\n");
Expand Down Expand Up @@ -9604,22 +9605,19 @@ static int ipw_wx_set_powermode(struct net_device *dev,
struct ipw_priv *priv = ieee80211_priv(dev);
int mode = *(int *)extra;
int err;

mutex_lock(&priv->mutex);
if ((mode < 1) || (mode > IPW_POWER_LIMIT)) {
if ((mode < 1) || (mode > IPW_POWER_LIMIT))
mode = IPW_POWER_AC;
priv->power_mode = mode;
} else {
priv->power_mode = IPW_POWER_ENABLED | mode;
}

if (priv->power_mode != mode) {
if (IPW_POWER_LEVEL(priv->power_mode) != mode) {
err = ipw_send_power_mode(priv, mode);

if (err) {
IPW_DEBUG_WX("failed setting power mode.\n");
mutex_unlock(&priv->mutex);
return err;
}
priv->power_mode = IPW_POWER_ENABLED | mode;
}
mutex_unlock(&priv->mutex);
return 0;
Expand Down Expand Up @@ -10555,7 +10553,7 @@ static irqreturn_t ipw_isr(int irq, void *data)
spin_lock(&priv->irq_lock);

if (!(priv->status & STATUS_INT_ENABLED)) {
/* Shared IRQ */
/* IRQ is disabled */
goto none;
}

Expand Down
2 changes: 2 additions & 0 deletions drivers/net/wireless/zd1211rw/zd_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ static struct usb_device_id usb_ids[] = {
{ USB_DEVICE(0x0586, 0x3413), .driver_info = DEVICE_ZD1211B },
{ USB_DEVICE(0x0053, 0x5301), .driver_info = DEVICE_ZD1211B },
{ USB_DEVICE(0x0411, 0x00da), .driver_info = DEVICE_ZD1211B },
{ USB_DEVICE(0x2019, 0x5303), .driver_info = DEVICE_ZD1211B },
{ USB_DEVICE(0x129b, 0x1667), .driver_info = DEVICE_ZD1211B },
/* "Driverless" devices that need ejecting */
{ USB_DEVICE(0x0ace, 0x2011), .driver_info = DEVICE_INSTALLER },
{ USB_DEVICE(0x0ace, 0x20ff), .driver_info = DEVICE_INSTALLER },
Expand Down
7 changes: 2 additions & 5 deletions net/ieee80211/ieee80211_wx.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,11 @@ static char *ieee80211_translate_scan(struct ieee80211_device *ieee,
}

/* Add channel and frequency */
/* Note : userspace automatically computes channel using iwrange */
iwe.cmd = SIOCGIWFREQ;
iwe.u.freq.m = network->channel;
iwe.u.freq.e = 0;
iwe.u.freq.i = 0;
start = iwe_stream_add_event(start, stop, &iwe, IW_EV_FREQ_LEN);

iwe.u.freq.m = ieee80211_channel_to_freq(ieee, network->channel);
iwe.u.freq.e = 6;
iwe.u.freq.i = 0;
start = iwe_stream_add_event(start, stop, &iwe, IW_EV_FREQ_LEN);

/* Add encryption capability */
Expand Down

0 comments on commit 5e1751f

Please sign in to comment.