Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 33949
b: refs/heads/master
c: a55ee0e
h: refs/heads/master
i:
  33947: bfaf410
v: v3
  • Loading branch information
Ben Dooks authored and Russell King committed Sep 14, 2006
1 parent 2782276 commit 1b3b9c3
Show file tree
Hide file tree
Showing 51 changed files with 491 additions and 751 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: 803db244b9f71102e366fd689000c1417b9a7508
refs/heads/master: a55ee0ea51ae8f622cb3d69d81a47cb772952f73
3 changes: 0 additions & 3 deletions trunk/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
*.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=$(objtree)/usr
INSTALL_HDR_PATH=$(MODLIB)/abi
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 usr/include
MRPROPER_DIRS += include/config include2
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: $(INSTALL_HDR_PATH))'
@echo ' (default: /lib/modules/$$VERSION/abi)'
@echo ''
@echo 'Static analysers'
@echo ' checkstack - Generate a list of stack hogs'
Expand Down
8 changes: 8 additions & 0 deletions trunk/arch/arm/mach-s3c2410/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,17 @@ config SMDK2440_CPU2442
depends on ARCH_S3C2440
select CPU_S3C2442

config MACH_S3C2413
bool
help
Internal node for S3C2413 verison of SMDK2413, so that
machine_is_s3c2413() will work when MACH_SMDK2413 is
selected

config MACH_SMDK2413
bool "SMDK2413"
select CPU_S3C2412
select MACH_S3C2413
select MACH_SMDK
help
Say Y here if you are using an SMDK2413
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/i386/oprofile/nmi_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,6 @@ 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: 0 additions & 1 deletion trunk/drivers/char/hvc_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,6 @@ 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: 4 additions & 5 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 &&
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) {
if (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,7 +2481,6 @@ 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 15
#define CMA_MAX_CM_RETRIES 3

static void cma_add_one(struct ib_device *device);
static void cma_remove_one(struct ib_device *device);
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,6 @@ 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: 14 additions & 0 deletions trunk/drivers/infiniband/ulp/srp/ib_srp.c
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,13 @@ 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 @@ -851,13 +858,18 @@ 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 @@ -1693,6 +1705,8 @@ 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;
pos = eccsize + chunk;

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 + boffs, oob, bytes);
memcpy(chip->oob_poi + woffs, 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 = ((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);
adapter->tx_ring[0].tdh = E1000_TDH;
adapter->tx_ring[0].tdt = E1000_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 = ((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);
adapter->rx_ring[0].rdh = E1000_RDH;
adapter->rx_ring[0].rdt = E1000_RDT;
break;
}

Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/net/mv643xx_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,6 @@ 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: 15 additions & 46 deletions trunk/drivers/net/wireless/zd1211rw/zd_chip.c
Original file line number Diff line number Diff line change
Expand Up @@ -1430,43 +1430,9 @@ 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 @@ -1510,28 +1476,31 @@ static int cck_snr_db(u8 status_quality)
return r;
}

static int cck_qual_percent(u8 status_quality)
static int rx_qual_db(const void *rx_frame, unsigned int size,
const struct rx_status *status)
{
int r;

r = cck_snr_db(status_quality);
r = (100*r)/17;
return r <= 100 ? r : 100;
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);
}

u8 zd_rx_qual_percent(const void *rx_frame, unsigned int size,
const struct rx_status *status)
{
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);
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;
}

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

static void update_qual_rssi(struct zd_mac *mac,
const u8 *buffer, unsigned int length,
u8 qual_percent, u8 rssi_percent)
static void update_qual_rssi(struct zd_mac *mac, u8 qual_percent, u8 rssi)
{
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);
i = mac->stats_count % ZD_MAC_STATS_BUFFER_SIZE;
mac->qual_buffer[i] = qual_percent;
mac->rssi_buffer[i] = rssi_percent;
mac->stats_count++;
mac->qual_average = (7 * mac->qual_average + qual_percent) / 8;
mac->rssi_average = (7 * mac->rssi_average + rssi) / 8;
spin_unlock_irqrestore(&mac->lock, flags);
}

Expand Down Expand Up @@ -865,6 +853,7 @@ 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 @@ -888,8 +877,6 @@ 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 @@ -994,31 +981,17 @@ 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);
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];
}
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;
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
Loading

0 comments on commit 1b3b9c3

Please sign in to comment.