Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 33956
b: refs/heads/master
c: 77e2782
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Sep 18, 2006
1 parent c48600d commit 7eb4a00
Show file tree
Hide file tree
Showing 50 changed files with 751 additions and 483 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: e40b1074af46d53740320f88dfffd9fb2f78bdf3
refs/heads/master: 77e2782f9b683893c9341e9cf05c88b0caac7382
3 changes: 3 additions & 0 deletions trunk/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
*.ko
*.so
*.mod.c
*.i
*.lst
*.symtypes

#
# Top-level generic files
Expand Down
6 changes: 3 additions & 3 deletions trunk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ depend dep:

# ---------------------------------------------------------------------------
# Kernel headers
INSTALL_HDR_PATH=$(MODLIB)/abi
INSTALL_HDR_PATH=$(objtree)/usr
export INSTALL_HDR_PATH

PHONY += headers_install
Expand Down Expand Up @@ -986,7 +986,7 @@ CLEAN_FILES += vmlinux System.map \
.tmp_kallsyms* .tmp_version .tmp_vmlinux* .tmp_System.map

# Directories & files removed with 'make mrproper'
MRPROPER_DIRS += include/config include2
MRPROPER_DIRS += include/config include2 usr/include
MRPROPER_FILES += .config .config.old include/asm .version .old_version \
include/linux/autoconf.h include/linux/version.h \
include/linux/utsrelease.h \
Expand Down Expand Up @@ -1077,7 +1077,7 @@ help:
@echo ' kernelrelease - Output the release version string'
@echo ' kernelversion - Output the version stored in Makefile'
@echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'
@echo ' (default: /lib/modules/$$VERSION/abi)'
@echo ' (default: $(INSTALL_HDR_PATH))'
@echo ''
@echo 'Static analysers'
@echo ' checkstack - Generate a list of stack hogs'
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/i386/oprofile/nmi_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,8 @@ static int __init ppro_init(char ** cpu_type)

if (cpu_model == 14)
*cpu_type = "i386/core";
else if (cpu_model == 15)
*cpu_type = "i386/core_2";
else if (cpu_model > 0xd)
return 0;
else if (cpu_model == 9) {
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/char/hvc_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,7 @@ int khvcd(void *unused)
do {
poll_mask = 0;
hvc_kicked = 0;
try_to_freeze();
wmb();
if (cpus_empty(cpus_in_xmon)) {
spin_lock(&hvc_structs_lock);
Expand Down
9 changes: 5 additions & 4 deletions trunk/drivers/char/ipmi/ipmi_si_intf.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,10 +402,10 @@ static void handle_flags(struct smi_info *smi_info)
smi_info->curr_msg->data,
smi_info->curr_msg->data_size);
smi_info->si_state = SI_GETTING_EVENTS;
} else if (smi_info->msg_flags & OEM_DATA_AVAIL) {
if (smi_info->oem_data_avail_handler)
if (smi_info->oem_data_avail_handler(smi_info))
goto retry;
} else if (smi_info->msg_flags & OEM_DATA_AVAIL &&
smi_info->oem_data_avail_handler) {
if (smi_info->oem_data_avail_handler(smi_info))
goto retry;
} else {
smi_info->si_state = SI_NORMAL;
}
Expand Down Expand Up @@ -2481,6 +2481,7 @@ static __devinit int init_ipmi_si(void)
#ifdef CONFIG_PCI
pci_unregister_driver(&ipmi_pci_driver);
#endif
driver_unregister(&ipmi_driver);
printk("ipmi_si: Unable to find any System Interface(s)\n");
return -ENODEV;
} else {
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/infiniband/core/cma.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ MODULE_DESCRIPTION("Generic RDMA CM Agent");
MODULE_LICENSE("Dual BSD/GPL");

#define CMA_CM_RESPONSE_TIMEOUT 20
#define CMA_MAX_CM_RETRIES 3
#define CMA_MAX_CM_RETRIES 15

static void cma_add_one(struct ib_device *device);
static void cma_remove_one(struct ib_device *device);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ ipoib_mcast_sendonly_join_complete(int status,

/* Clear the busy flag so we try again */
clear_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags);
mcast->query = NULL;
}

complete(&mcast->done);
Expand Down
14 changes: 0 additions & 14 deletions trunk/drivers/infiniband/ulp/srp/ib_srp.c
Original file line number Diff line number Diff line change
Expand Up @@ -799,13 +799,6 @@ static void srp_process_rsp(struct srp_target_port *target, struct srp_rsp *rsp)
spin_unlock_irqrestore(target->scsi_host->host_lock, flags);
}

static void srp_reconnect_work(void *target_ptr)
{
struct srp_target_port *target = target_ptr;

srp_reconnect_target(target);
}

static void srp_handle_recv(struct srp_target_port *target, struct ib_wc *wc)
{
struct srp_iu *iu;
Expand Down Expand Up @@ -858,18 +851,13 @@ static void srp_completion(struct ib_cq *cq, void *target_ptr)
{
struct srp_target_port *target = target_ptr;
struct ib_wc wc;
unsigned long flags;

ib_req_notify_cq(cq, IB_CQ_NEXT_COMP);
while (ib_poll_cq(cq, 1, &wc) > 0) {
if (wc.status) {
printk(KERN_ERR PFX "failed %s status %d\n",
wc.wr_id & SRP_OP_RECV ? "receive" : "send",
wc.status);
spin_lock_irqsave(target->scsi_host->host_lock, flags);
if (target->state == SRP_TARGET_LIVE)
schedule_work(&target->work);
spin_unlock_irqrestore(target->scsi_host->host_lock, flags);
break;
}

Expand Down Expand Up @@ -1705,8 +1693,6 @@ static ssize_t srp_create_target(struct class_device *class_dev,
target->scsi_host = target_host;
target->srp_host = host;

INIT_WORK(&target->work, srp_reconnect_work, target);

INIT_LIST_HEAD(&target->free_reqs);
INIT_LIST_HEAD(&target->req_queue);
for (i = 0; i < SRP_SQ_SIZE; ++i) {
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/mtd/nand/nand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,7 @@ static int nand_write_oob_syndrome(struct mtd_info *mtd,
pos = steps * (eccsize + chunk);
steps = 0;
} else
pos = eccsize + chunk;
pos = eccsize;

chip->cmdfunc(mtd, NAND_CMD_SEQIN, pos, page);
for (i = 0; i < steps; i++) {
Expand Down Expand Up @@ -1567,7 +1567,7 @@ static uint8_t *nand_fill_oob(struct nand_chip *chip, uint8_t *oob,
bytes = min_t(size_t, len, free->length);
boffs = free->offset;
}
memcpy(chip->oob_poi + woffs, oob, bytes);
memcpy(chip->oob_poi + boffs, oob, bytes);
oob += bytes;
}
return oob;
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/net/e1000/e1000_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1433,8 +1433,8 @@ e1000_configure_tx(struct e1000_adapter *adapter)
E1000_WRITE_REG(hw, TDBAL, (tdba & 0x00000000ffffffffULL));
E1000_WRITE_REG(hw, TDT, 0);
E1000_WRITE_REG(hw, TDH, 0);
adapter->tx_ring[0].tdh = E1000_TDH;
adapter->tx_ring[0].tdt = E1000_TDT;
adapter->tx_ring[0].tdh = ((hw->mac_type >= e1000_82543) ? E1000_TDH : E1000_82542_TDH);
adapter->tx_ring[0].tdt = ((hw->mac_type >= e1000_82543) ? E1000_TDT : E1000_82542_TDT);
break;
}

Expand Down Expand Up @@ -1840,8 +1840,8 @@ e1000_configure_rx(struct e1000_adapter *adapter)
E1000_WRITE_REG(hw, RDBAL, (rdba & 0x00000000ffffffffULL));
E1000_WRITE_REG(hw, RDT, 0);
E1000_WRITE_REG(hw, RDH, 0);
adapter->rx_ring[0].rdh = E1000_RDH;
adapter->rx_ring[0].rdt = E1000_RDT;
adapter->rx_ring[0].rdh = ((hw->mac_type >= e1000_82543) ? E1000_RDH : E1000_82542_RDH);
adapter->rx_ring[0].rdt = ((hw->mac_type >= e1000_82543) ? E1000_RDT : E1000_82542_RDT);
break;
}

Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/net/mv643xx_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,8 @@ static int mv643xx_eth_receive_queue(struct net_device *dev, int budget)
struct pkt_info pkt_info;

while (budget-- > 0 && eth_port_receive(mp, &pkt_info) == ETH_OK) {
dma_unmap_single(NULL, pkt_info.buf_ptr, RX_SKB_SIZE,
DMA_FROM_DEVICE);
mp->rx_desc_count--;
received_packets++;

Expand Down
61 changes: 46 additions & 15 deletions trunk/drivers/net/wireless/zd1211rw/zd_chip.c
Original file line number Diff line number Diff line change
Expand Up @@ -1430,9 +1430,43 @@ static int ofdm_qual_db(u8 status_quality, u8 rate, unsigned int size)
break;
}

switch (rate) {
case ZD_OFDM_RATE_6M:
case ZD_OFDM_RATE_9M:
i += 3;
break;
case ZD_OFDM_RATE_12M:
case ZD_OFDM_RATE_18M:
i += 5;
break;
case ZD_OFDM_RATE_24M:
case ZD_OFDM_RATE_36M:
i += 9;
break;
case ZD_OFDM_RATE_48M:
case ZD_OFDM_RATE_54M:
i += 15;
break;
default:
return -EINVAL;
}

return i;
}

static int ofdm_qual_percent(u8 status_quality, u8 rate, unsigned int size)
{
int r;

r = ofdm_qual_db(status_quality, rate, size);
ZD_ASSERT(r >= 0);
if (r < 0)
r = 0;

r = (r * 100)/29;
return r <= 100 ? r : 100;
}

static unsigned int log10times100(unsigned int x)
{
static const u8 log10[] = {
Expand Down Expand Up @@ -1476,31 +1510,28 @@ static int cck_snr_db(u8 status_quality)
return r;
}

static int rx_qual_db(const void *rx_frame, unsigned int size,
const struct rx_status *status)
static int cck_qual_percent(u8 status_quality)
{
return (status->frame_status&ZD_RX_OFDM) ?
ofdm_qual_db(status->signal_quality_ofdm,
zd_ofdm_plcp_header_rate(rx_frame),
size) :
cck_snr_db(status->signal_quality_cck);
int r;

r = cck_snr_db(status_quality);
r = (100*r)/17;
return r <= 100 ? r : 100;
}

u8 zd_rx_qual_percent(const void *rx_frame, unsigned int size,
const struct rx_status *status)
{
int r = rx_qual_db(rx_frame, size, status);
if (r < 0)
r = 0;
r = (r * 100) / 14;
if (r > 100)
r = 100;
return r;
return (status->frame_status&ZD_RX_OFDM) ?
ofdm_qual_percent(status->signal_quality_ofdm,
zd_ofdm_plcp_header_rate(rx_frame),
size) :
cck_qual_percent(status->signal_quality_cck);
}

u8 zd_rx_strength_percent(u8 rssi)
{
int r = (rssi*100) / 30;
int r = (rssi*100) / 41;
if (r > 100)
r = 100;
return (u8) r;
Expand Down
43 changes: 35 additions & 8 deletions trunk/drivers/net/wireless/zd1211rw/zd_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -816,13 +816,25 @@ static int filter_rx(struct ieee80211_device *ieee,
return -EINVAL;
}

static void update_qual_rssi(struct zd_mac *mac, u8 qual_percent, u8 rssi)
static void update_qual_rssi(struct zd_mac *mac,
const u8 *buffer, unsigned int length,
u8 qual_percent, u8 rssi_percent)
{
unsigned long flags;
struct ieee80211_hdr_3addr *hdr;
int i;

hdr = (struct ieee80211_hdr_3addr *)buffer;
if (length < offsetof(struct ieee80211_hdr_3addr, addr3))
return;
if (memcmp(hdr->addr2, zd_mac_to_ieee80211(mac)->bssid, ETH_ALEN) != 0)
return;

spin_lock_irqsave(&mac->lock, flags);
mac->qual_average = (7 * mac->qual_average + qual_percent) / 8;
mac->rssi_average = (7 * mac->rssi_average + rssi) / 8;
i = mac->stats_count % ZD_MAC_STATS_BUFFER_SIZE;
mac->qual_buffer[i] = qual_percent;
mac->rssi_buffer[i] = rssi_percent;
mac->stats_count++;
spin_unlock_irqrestore(&mac->lock, flags);
}

Expand Down Expand Up @@ -853,7 +865,6 @@ static int fill_rx_stats(struct ieee80211_rx_stats *stats,
if (stats->rate)
stats->mask |= IEEE80211_STATMASK_RATE;

update_qual_rssi(mac, stats->signal, stats->rssi);
return 0;
}

Expand All @@ -877,6 +888,8 @@ int zd_mac_rx(struct zd_mac *mac, const u8 *buffer, unsigned int length)
sizeof(struct rx_status);
buffer += ZD_PLCP_HEADER_SIZE;

update_qual_rssi(mac, buffer, length, stats.signal, stats.rssi);

r = filter_rx(ieee, buffer, length, &stats);
if (r <= 0)
return r;
Expand Down Expand Up @@ -981,17 +994,31 @@ struct iw_statistics *zd_mac_get_wireless_stats(struct net_device *ndev)
{
struct zd_mac *mac = zd_netdev_mac(ndev);
struct iw_statistics *iw_stats = &mac->iw_stats;
unsigned int i, count, qual_total, rssi_total;

memset(iw_stats, 0, sizeof(struct iw_statistics));
/* We are not setting the status, because ieee->state is not updated
* at all and this driver doesn't track authentication state.
*/
spin_lock_irq(&mac->lock);
iw_stats->qual.qual = mac->qual_average;
iw_stats->qual.level = mac->rssi_average;
iw_stats->qual.updated = IW_QUAL_QUAL_UPDATED|IW_QUAL_LEVEL_UPDATED|
IW_QUAL_NOISE_INVALID;
count = mac->stats_count < ZD_MAC_STATS_BUFFER_SIZE ?
mac->stats_count : ZD_MAC_STATS_BUFFER_SIZE;
qual_total = rssi_total = 0;
for (i = 0; i < count; i++) {
qual_total += mac->qual_buffer[i];
rssi_total += mac->rssi_buffer[i];
}
spin_unlock_irq(&mac->lock);
iw_stats->qual.updated = IW_QUAL_NOISE_INVALID;
if (count > 0) {
iw_stats->qual.qual = qual_total / count;
iw_stats->qual.level = rssi_total / count;
iw_stats->qual.updated |=
IW_QUAL_QUAL_UPDATED|IW_QUAL_LEVEL_UPDATED;
} else {
iw_stats->qual.updated |=
IW_QUAL_QUAL_INVALID|IW_QUAL_LEVEL_INVALID;
}
/* TODO: update counter */
return iw_stats;
}
Expand Down
11 changes: 7 additions & 4 deletions trunk/drivers/net/wireless/zd1211rw/zd_mac.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* zd_mac.c
/* zd_mac.h
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -87,9 +87,9 @@ struct rx_length_info {
#define RX_LENGTH_INFO_TAG 0x697e

struct rx_status {
u8 signal_quality_cck;
/* rssi */
u8 signal_strength;
u8 signal_quality_cck;
u8 signal_quality_ofdm;
u8 decryption_type;
u8 frame_status;
Expand Down Expand Up @@ -120,14 +120,17 @@ enum mac_flags {
MAC_FIXED_CHANNEL = 0x01,
};

#define ZD_MAC_STATS_BUFFER_SIZE 16

struct zd_mac {
struct net_device *netdev;
struct zd_chip chip;
spinlock_t lock;
/* Unlocked reading possible */
struct iw_statistics iw_stats;
u8 qual_average;
u8 rssi_average;
unsigned int stats_count;
u8 qual_buffer[ZD_MAC_STATS_BUFFER_SIZE];
u8 rssi_buffer[ZD_MAC_STATS_BUFFER_SIZE];
u8 regdomain;
u8 default_regdomain;
u8 requested_channel;
Expand Down
Loading

0 comments on commit 7eb4a00

Please sign in to comment.