Skip to content

Commit 7b29dc2

Browse files
committed
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into for-davem
2 parents 9a2e0fb + dfe2158 commit 7b29dc2

File tree

15 files changed

+155
-70
lines changed

15 files changed

+155
-70
lines changed

drivers/net/wireless/ath/ath9k/ar9003_eeprom.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4645,10 +4645,16 @@ static void ar9003_hw_set_power_per_rate_table(struct ath_hw *ah,
46454645
case 1:
46464646
break;
46474647
case 2:
4648-
scaledPower -= REDUCE_SCALED_POWER_BY_TWO_CHAIN;
4648+
if (scaledPower > REDUCE_SCALED_POWER_BY_TWO_CHAIN)
4649+
scaledPower -= REDUCE_SCALED_POWER_BY_TWO_CHAIN;
4650+
else
4651+
scaledPower = 0;
46494652
break;
46504653
case 3:
4651-
scaledPower -= REDUCE_SCALED_POWER_BY_THREE_CHAIN;
4654+
if (scaledPower > REDUCE_SCALED_POWER_BY_THREE_CHAIN)
4655+
scaledPower -= REDUCE_SCALED_POWER_BY_THREE_CHAIN;
4656+
else
4657+
scaledPower = 0;
46524658
break;
46534659
}
46544660

drivers/net/wireless/ath/ath9k/eeprom_9287.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,10 +524,16 @@ static void ath9k_hw_set_ar9287_power_per_rate_table(struct ath_hw *ah,
524524
case 1:
525525
break;
526526
case 2:
527-
scaledPower -= REDUCE_SCALED_POWER_BY_TWO_CHAIN;
527+
if (scaledPower > REDUCE_SCALED_POWER_BY_TWO_CHAIN)
528+
scaledPower -= REDUCE_SCALED_POWER_BY_TWO_CHAIN;
529+
else
530+
scaledPower = 0;
528531
break;
529532
case 3:
530-
scaledPower -= REDUCE_SCALED_POWER_BY_THREE_CHAIN;
533+
if (scaledPower > REDUCE_SCALED_POWER_BY_THREE_CHAIN)
534+
scaledPower -= REDUCE_SCALED_POWER_BY_THREE_CHAIN;
535+
else
536+
scaledPower = 0;
531537
break;
532538
}
533539
scaledPower = max((u16)0, scaledPower);

drivers/net/wireless/iwlegacy/iwl-4965.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1543,7 +1543,7 @@ static void iwl4965_temperature_calib(struct iwl_priv *priv)
15431543
s32 temp;
15441544

15451545
temp = iwl4965_hw_get_temperature(priv);
1546-
if (temp < 0)
1546+
if (IWL_TX_POWER_TEMPERATURE_OUT_OF_RANGE(temp))
15471547
return;
15481548

15491549
if (priv->temperature != temp) {

drivers/net/wireless/iwlwifi/iwl-6000.c

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -603,19 +603,27 @@ struct iwl_cfg iwl6050_2abg_cfg = {
603603
IWL_DEVICE_6050,
604604
};
605605

606+
#define IWL_DEVICE_6150 \
607+
.fw_name_pre = IWL6050_FW_PRE, \
608+
.ucode_api_max = IWL6050_UCODE_API_MAX, \
609+
.ucode_api_min = IWL6050_UCODE_API_MIN, \
610+
.ops = &iwl6150_ops, \
611+
.eeprom_ver = EEPROM_6150_EEPROM_VERSION, \
612+
.eeprom_calib_ver = EEPROM_6150_TX_POWER_VERSION, \
613+
.base_params = &iwl6050_base_params, \
614+
.need_dc_calib = true, \
615+
.led_mode = IWL_LED_BLINK, \
616+
.internal_wimax_coex = true
617+
606618
struct iwl_cfg iwl6150_bgn_cfg = {
607619
.name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BGN",
608-
.fw_name_pre = IWL6050_FW_PRE,
609-
.ucode_api_max = IWL6050_UCODE_API_MAX,
610-
.ucode_api_min = IWL6050_UCODE_API_MIN,
611-
.eeprom_ver = EEPROM_6150_EEPROM_VERSION,
612-
.eeprom_calib_ver = EEPROM_6150_TX_POWER_VERSION,
613-
.ops = &iwl6150_ops,
614-
.base_params = &iwl6050_base_params,
620+
IWL_DEVICE_6150,
615621
.ht_params = &iwl6000_ht_params,
616-
.need_dc_calib = true,
617-
.led_mode = IWL_LED_RF_STATE,
618-
.internal_wimax_coex = true,
622+
};
623+
624+
struct iwl_cfg iwl6150_bg_cfg = {
625+
.name = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BG",
626+
IWL_DEVICE_6150,
619627
};
620628

621629
struct iwl_cfg iwl6000_3agn_cfg = {

drivers/net/wireless/iwlwifi/iwl-agn.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3831,11 +3831,11 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = {
38313831

38323832
/* 6150 WiFi/WiMax Series */
38333833
{IWL_PCI_DEVICE(0x0885, 0x1305, iwl6150_bgn_cfg)},
3834-
{IWL_PCI_DEVICE(0x0885, 0x1306, iwl6150_bgn_cfg)},
3834+
{IWL_PCI_DEVICE(0x0885, 0x1307, iwl6150_bg_cfg)},
38353835
{IWL_PCI_DEVICE(0x0885, 0x1325, iwl6150_bgn_cfg)},
3836-
{IWL_PCI_DEVICE(0x0885, 0x1326, iwl6150_bgn_cfg)},
3836+
{IWL_PCI_DEVICE(0x0885, 0x1327, iwl6150_bg_cfg)},
38373837
{IWL_PCI_DEVICE(0x0886, 0x1315, iwl6150_bgn_cfg)},
3838-
{IWL_PCI_DEVICE(0x0886, 0x1316, iwl6150_bgn_cfg)},
3838+
{IWL_PCI_DEVICE(0x0886, 0x1317, iwl6150_bg_cfg)},
38393839

38403840
/* 1000 Series WiFi */
38413841
{IWL_PCI_DEVICE(0x0083, 0x1205, iwl1000_bgn_cfg)},

drivers/net/wireless/iwlwifi/iwl-agn.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ extern struct iwl_cfg iwl6000_3agn_cfg;
8989
extern struct iwl_cfg iwl6050_2agn_cfg;
9090
extern struct iwl_cfg iwl6050_2abg_cfg;
9191
extern struct iwl_cfg iwl6150_bgn_cfg;
92+
extern struct iwl_cfg iwl6150_bg_cfg;
9293
extern struct iwl_cfg iwl1000_bgn_cfg;
9394
extern struct iwl_cfg iwl1000_bg_cfg;
9495
extern struct iwl_cfg iwl100_bgn_cfg;

drivers/net/wireless/libertas/cmd.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -994,6 +994,8 @@ static void lbs_submit_command(struct lbs_private *priv,
994994
cmd = cmdnode->cmdbuf;
995995

996996
spin_lock_irqsave(&priv->driver_lock, flags);
997+
priv->seqnum++;
998+
cmd->seqnum = cpu_to_le16(priv->seqnum);
997999
priv->cur_cmd = cmdnode;
9981000
spin_unlock_irqrestore(&priv->driver_lock, flags);
9991001

@@ -1621,11 +1623,9 @@ struct cmd_ctrl_node *__lbs_cmd_async(struct lbs_private *priv,
16211623
/* Copy the incoming command to the buffer */
16221624
memcpy(cmdnode->cmdbuf, in_cmd, in_cmd_size);
16231625

1624-
/* Set sequence number, clean result, move to buffer */
1625-
priv->seqnum++;
1626+
/* Set command, clean result, move to buffer */
16261627
cmdnode->cmdbuf->command = cpu_to_le16(command);
16271628
cmdnode->cmdbuf->size = cpu_to_le16(in_cmd_size);
1628-
cmdnode->cmdbuf->seqnum = cpu_to_le16(priv->seqnum);
16291629
cmdnode->cmdbuf->result = 0;
16301630

16311631
lbs_deb_host("PREP_CMD: command 0x%04x\n", command);

drivers/net/wireless/wl12xx/conf.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,6 +1157,9 @@ struct conf_sched_scan_settings {
11571157
/* time to wait on the channel for passive scans (in TUs) */
11581158
u32 dwell_time_passive;
11591159

1160+
/* time to wait on the channel for DFS scans (in TUs) */
1161+
u32 dwell_time_dfs;
1162+
11601163
/* number of probe requests to send on each channel in active scans */
11611164
u8 num_probe_reqs;
11621165

drivers/net/wireless/wl12xx/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ static struct conf_drv_settings default_conf = {
311311
.min_dwell_time_active = 8,
312312
.max_dwell_time_active = 30,
313313
.dwell_time_passive = 100,
314+
.dwell_time_dfs = 150,
314315
.num_probe_reqs = 2,
315316
.rssi_threshold = -90,
316317
.snr_threshold = 0,

drivers/net/wireless/wl12xx/scan.c

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -331,16 +331,22 @@ wl1271_scan_get_sched_scan_channels(struct wl1271 *wl,
331331
struct conf_sched_scan_settings *c = &wl->conf.sched_scan;
332332
int i, j;
333333
u32 flags;
334+
bool force_passive = !req->n_ssids;
334335

335336
for (i = 0, j = start;
336337
i < req->n_channels && j < MAX_CHANNELS_ALL_BANDS;
337338
i++) {
338339
flags = req->channels[i]->flags;
339340

340-
if (!(flags & IEEE80211_CHAN_DISABLED) &&
341-
((flags & IEEE80211_CHAN_PASSIVE_SCAN) == passive) &&
342-
((flags & IEEE80211_CHAN_RADAR) == radar) &&
343-
(req->channels[i]->band == band)) {
341+
if (force_passive)
342+
flags |= IEEE80211_CHAN_PASSIVE_SCAN;
343+
344+
if ((req->channels[i]->band == band) &&
345+
!(flags & IEEE80211_CHAN_DISABLED) &&
346+
(!!(flags & IEEE80211_CHAN_RADAR) == radar) &&
347+
/* if radar is set, we ignore the passive flag */
348+
(radar ||
349+
!!(flags & IEEE80211_CHAN_PASSIVE_SCAN) == passive)) {
344350
wl1271_debug(DEBUG_SCAN, "band %d, center_freq %d ",
345351
req->channels[i]->band,
346352
req->channels[i]->center_freq);
@@ -350,7 +356,12 @@ wl1271_scan_get_sched_scan_channels(struct wl1271 *wl,
350356
wl1271_debug(DEBUG_SCAN, "max_power %d",
351357
req->channels[i]->max_power);
352358

353-
if (flags & IEEE80211_CHAN_PASSIVE_SCAN) {
359+
if (flags & IEEE80211_CHAN_RADAR) {
360+
channels[j].flags |= SCAN_CHANNEL_FLAGS_DFS;
361+
channels[j].passive_duration =
362+
cpu_to_le16(c->dwell_time_dfs);
363+
}
364+
else if (flags & IEEE80211_CHAN_PASSIVE_SCAN) {
354365
channels[j].passive_duration =
355366
cpu_to_le16(c->dwell_time_passive);
356367
} else {
@@ -359,7 +370,7 @@ wl1271_scan_get_sched_scan_channels(struct wl1271 *wl,
359370
channels[j].max_duration =
360371
cpu_to_le16(c->max_dwell_time_active);
361372
}
362-
channels[j].tx_power_att = req->channels[j]->max_power;
373+
channels[j].tx_power_att = req->channels[i]->max_power;
363374
channels[j].channel = req->channels[i]->hw_value;
364375

365376
j++;
@@ -386,30 +397,35 @@ wl1271_scan_sched_scan_channels(struct wl1271 *wl,
386397
wl1271_scan_get_sched_scan_channels(wl, req, cfg->channels,
387398
IEEE80211_BAND_2GHZ,
388399
false, false, idx);
389-
idx += cfg->active[0];
400+
/*
401+
* 5GHz channels always start at position 14, not immediately
402+
* after the last 2.4GHz channel
403+
*/
404+
idx = 14;
390405

391406
cfg->passive[1] =
392407
wl1271_scan_get_sched_scan_channels(wl, req, cfg->channels,
393408
IEEE80211_BAND_5GHZ,
394409
false, true, idx);
395410
idx += cfg->passive[1];
396411

397-
cfg->active[1] =
412+
cfg->dfs =
398413
wl1271_scan_get_sched_scan_channels(wl, req, cfg->channels,
399414
IEEE80211_BAND_5GHZ,
400-
false, false, 14);
401-
idx += cfg->active[1];
415+
true, true, idx);
416+
idx += cfg->dfs;
402417

403-
cfg->dfs =
418+
cfg->active[1] =
404419
wl1271_scan_get_sched_scan_channels(wl, req, cfg->channels,
405420
IEEE80211_BAND_5GHZ,
406-
true, false, idx);
407-
idx += cfg->dfs;
421+
false, false, idx);
422+
idx += cfg->active[1];
408423

409424
wl1271_debug(DEBUG_SCAN, " 2.4GHz: active %d passive %d",
410425
cfg->active[0], cfg->passive[0]);
411426
wl1271_debug(DEBUG_SCAN, " 5GHz: active %d passive %d",
412427
cfg->active[1], cfg->passive[1]);
428+
wl1271_debug(DEBUG_SCAN, " DFS: %d", cfg->dfs);
413429

414430
return idx;
415431
}
@@ -421,6 +437,7 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl,
421437
struct wl1271_cmd_sched_scan_config *cfg = NULL;
422438
struct conf_sched_scan_settings *c = &wl->conf.sched_scan;
423439
int i, total_channels, ret;
440+
bool force_passive = !req->n_ssids;
424441

425442
wl1271_debug(DEBUG_CMD, "cmd sched_scan scan config");
426443

@@ -444,7 +461,7 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl,
444461
for (i = 0; i < SCAN_MAX_CYCLE_INTERVALS; i++)
445462
cfg->intervals[i] = cpu_to_le32(req->interval);
446463

447-
if (req->ssids[0].ssid_len && req->ssids[0].ssid) {
464+
if (!force_passive && req->ssids[0].ssid_len && req->ssids[0].ssid) {
448465
cfg->filter_type = SCAN_SSID_FILTER_SPECIFIC;
449466
cfg->ssid_len = req->ssids[0].ssid_len;
450467
memcpy(cfg->ssid, req->ssids[0].ssid,
@@ -461,7 +478,7 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl,
461478
goto out;
462479
}
463480

464-
if (cfg->active[0]) {
481+
if (!force_passive && cfg->active[0]) {
465482
ret = wl1271_cmd_build_probe_req(wl, req->ssids[0].ssid,
466483
req->ssids[0].ssid_len,
467484
ies->ie[IEEE80211_BAND_2GHZ],
@@ -473,7 +490,7 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl,
473490
}
474491
}
475492

476-
if (cfg->active[1]) {
493+
if (!force_passive && cfg->active[1]) {
477494
ret = wl1271_cmd_build_probe_req(wl, req->ssids[0].ssid,
478495
req->ssids[0].ssid_len,
479496
ies->ie[IEEE80211_BAND_5GHZ],

drivers/net/wireless/wl12xx/scan.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ enum {
137137
SCAN_BSS_TYPE_ANY,
138138
};
139139

140+
#define SCAN_CHANNEL_FLAGS_DFS BIT(0)
141+
#define SCAN_CHANNEL_FLAGS_DFS_ENABLED BIT(1)
142+
140143
struct conn_scan_ch_params {
141144
__le16 min_duration;
142145
__le16 max_duration;

drivers/net/wireless/zd1211rw/zd_usb.c

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,6 +1533,31 @@ static void __exit usb_exit(void)
15331533
module_init(usb_init);
15341534
module_exit(usb_exit);
15351535

1536+
static int zd_ep_regs_out_msg(struct usb_device *udev, void *data, int len,
1537+
int *actual_length, int timeout)
1538+
{
1539+
/* In USB 2.0 mode EP_REGS_OUT endpoint is interrupt type. However in
1540+
* USB 1.1 mode endpoint is bulk. Select correct type URB by endpoint
1541+
* descriptor.
1542+
*/
1543+
struct usb_host_endpoint *ep;
1544+
unsigned int pipe;
1545+
1546+
pipe = usb_sndintpipe(udev, EP_REGS_OUT);
1547+
ep = usb_pipe_endpoint(udev, pipe);
1548+
if (!ep)
1549+
return -EINVAL;
1550+
1551+
if (usb_endpoint_xfer_int(&ep->desc)) {
1552+
return usb_interrupt_msg(udev, pipe, data, len,
1553+
actual_length, timeout);
1554+
} else {
1555+
pipe = usb_sndbulkpipe(udev, EP_REGS_OUT);
1556+
return usb_bulk_msg(udev, pipe, data, len, actual_length,
1557+
timeout);
1558+
}
1559+
}
1560+
15361561
static int usb_int_regs_length(unsigned int count)
15371562
{
15381563
return sizeof(struct usb_int_regs) + count * sizeof(struct reg_data);
@@ -1648,15 +1673,14 @@ int zd_usb_ioread16v(struct zd_usb *usb, u16 *values,
16481673

16491674
udev = zd_usb_to_usbdev(usb);
16501675
prepare_read_regs_int(usb);
1651-
r = usb_interrupt_msg(udev, usb_sndintpipe(udev, EP_REGS_OUT),
1652-
req, req_len, &actual_req_len, 50 /* ms */);
1676+
r = zd_ep_regs_out_msg(udev, req, req_len, &actual_req_len, 50 /*ms*/);
16531677
if (r) {
16541678
dev_dbg_f(zd_usb_dev(usb),
1655-
"error in usb_interrupt_msg(). Error number %d\n", r);
1679+
"error in zd_ep_regs_out_msg(). Error number %d\n", r);
16561680
goto error;
16571681
}
16581682
if (req_len != actual_req_len) {
1659-
dev_dbg_f(zd_usb_dev(usb), "error in usb_interrupt_msg()\n"
1683+
dev_dbg_f(zd_usb_dev(usb), "error in zd_ep_regs_out_msg()\n"
16601684
" req_len %d != actual_req_len %d\n",
16611685
req_len, actual_req_len);
16621686
r = -EIO;
@@ -1818,9 +1842,17 @@ int zd_usb_iowrite16v_async(struct zd_usb *usb, const struct zd_ioreq16 *ioreqs,
18181842
rw->value = cpu_to_le16(ioreqs[i].value);
18191843
}
18201844

1821-
usb_fill_int_urb(urb, udev, usb_sndintpipe(udev, EP_REGS_OUT),
1822-
req, req_len, iowrite16v_urb_complete, usb,
1823-
ep->desc.bInterval);
1845+
/* In USB 2.0 mode endpoint is interrupt type. However in USB 1.1 mode
1846+
* endpoint is bulk. Select correct type URB by endpoint descriptor.
1847+
*/
1848+
if (usb_endpoint_xfer_int(&ep->desc))
1849+
usb_fill_int_urb(urb, udev, usb_sndintpipe(udev, EP_REGS_OUT),
1850+
req, req_len, iowrite16v_urb_complete, usb,
1851+
ep->desc.bInterval);
1852+
else
1853+
usb_fill_bulk_urb(urb, udev, usb_sndbulkpipe(udev, EP_REGS_OUT),
1854+
req, req_len, iowrite16v_urb_complete, usb);
1855+
18241856
urb->transfer_flags |= URB_FREE_BUFFER;
18251857

18261858
/* Submit previous URB */
@@ -1924,15 +1956,14 @@ int zd_usb_rfwrite(struct zd_usb *usb, u32 value, u8 bits)
19241956
}
19251957

19261958
udev = zd_usb_to_usbdev(usb);
1927-
r = usb_interrupt_msg(udev, usb_sndintpipe(udev, EP_REGS_OUT),
1928-
req, req_len, &actual_req_len, 50 /* ms */);
1959+
r = zd_ep_regs_out_msg(udev, req, req_len, &actual_req_len, 50 /*ms*/);
19291960
if (r) {
19301961
dev_dbg_f(zd_usb_dev(usb),
1931-
"error in usb_interrupt_msg(). Error number %d\n", r);
1962+
"error in zd_ep_regs_out_msg(). Error number %d\n", r);
19321963
goto out;
19331964
}
19341965
if (req_len != actual_req_len) {
1935-
dev_dbg_f(zd_usb_dev(usb), "error in usb_interrupt_msg()"
1966+
dev_dbg_f(zd_usb_dev(usb), "error in zd_ep_regs_out_msg()"
19361967
" req_len %d != actual_req_len %d\n",
19371968
req_len, actual_req_len);
19381969
r = -EIO;

include/linux/ieee80211.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,8 +1003,12 @@ struct ieee80211_ht_info {
10031003
#define WLAN_CAPABILITY_ESS (1<<0)
10041004
#define WLAN_CAPABILITY_IBSS (1<<1)
10051005

1006-
/* A mesh STA sets the ESS and IBSS capability bits to zero */
1007-
#define WLAN_CAPABILITY_IS_MBSS(cap) \
1006+
/*
1007+
* A mesh STA sets the ESS and IBSS capability bits to zero.
1008+
* however, this holds true for p2p probe responses (in the p2p_find
1009+
* phase) as well.
1010+
*/
1011+
#define WLAN_CAPABILITY_IS_STA_BSS(cap) \
10081012
(!((cap) & (WLAN_CAPABILITY_ESS | WLAN_CAPABILITY_IBSS)))
10091013

10101014
#define WLAN_CAPABILITY_CF_POLLABLE (1<<2)

0 commit comments

Comments
 (0)