Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106641
b: refs/heads/master
c: 2e71316
h: refs/heads/master
i:
  106639: 222549f
v: v3
  • Loading branch information
David Sterba authored and Linus Torvalds committed Jul 28, 2008
1 parent 8206426 commit edea08a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 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: d4c0deb7009217d5cf7d0fe89255d64ecfad932b
refs/heads/master: 2e713165f892c833d240cb265ab35490a7ef456f
15 changes: 6 additions & 9 deletions trunk/drivers/char/pcmcia/ipwireless/hardware.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,15 +227,12 @@ struct MEMINFREG {
unsigned short memreg_tx_new; /* TX2 (new) Register (R/W) */
};

#define IODMADPR 0x00 /* DMA Data Port Register (R/W) */

#define CARD_PRESENT_VALUE (0xBEEFCAFEUL)

#define MEMTX_TX 0x0001
#define MEMRX_RX 0x0001
#define MEMRX_RX_DONE 0x0001
#define MEMRX_PCINTACKK 0x0001
#define MEMRX_MEMSPURIOUSINT 0x0001

#define NL_NUM_OF_PRIORITIES 3
#define NL_NUM_OF_PROTOCOLS 3
Expand Down Expand Up @@ -422,7 +419,7 @@ static int do_send_fragment(struct ipw_hardware *hw, const unsigned char *data,

outw(DCR_TXDONE, hw->base_port + IODCR);
} else if (hw->hw_version == HW_VERSION_2) {
outw((unsigned short) length, hw->base_port + IODMADPR);
outw((unsigned short) length, hw->base_port);

for (i = 0; i < length; i += 2) {
unsigned short d = data[i];
Expand All @@ -431,10 +428,10 @@ static int do_send_fragment(struct ipw_hardware *hw, const unsigned char *data,
if (i + 1 < length)
d |= data[i + 1] << 8;
raw_data = cpu_to_le16(d);
outw(raw_data, hw->base_port + IODMADPR);
outw(raw_data, hw->base_port);
}
while ((i & 3) != 2) {
outw((unsigned short) 0xDEAD, hw->base_port + IODMADPR);
outw((unsigned short) 0xDEAD, hw->base_port);
i += 2;
}
writew(MEMRX_RX, &hw->memory_info_regs->memreg_rx);
Expand Down Expand Up @@ -863,7 +860,7 @@ static void do_receive_packet(struct ipw_hardware *hw)
pkt[i + 1] = (unsigned char) (data >> 8);
}
} else {
len = inw(hw->base_port + IODMADPR);
len = inw(hw->base_port);
if (len > hw->ll_mtu) {
printk(KERN_INFO IPWIRELESS_PCCARD_NAME
": received a packet of %u bytes - "
Expand All @@ -874,15 +871,15 @@ static void do_receive_packet(struct ipw_hardware *hw)
}

for (i = 0; i < len; i += 2) {
__le16 raw_data = inw(hw->base_port + IODMADPR);
__le16 raw_data = inw(hw->base_port);
unsigned short data = le16_to_cpu(raw_data);

pkt[i] = (unsigned char) data;
pkt[i + 1] = (unsigned char) (data >> 8);
}

while ((i & 3) != 2) {
inw(hw->base_port + IODMADPR);
inw(hw->base_port);
i += 2;
}
}
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/char/pcmcia/ipwireless/network.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "main.h"
#include "tty.h"

#define MAX_OUTGOING_PACKETS_QUEUED ipwireless_out_queue
#define MAX_ASSOCIATED_TTYS 2

#define SC_RCV_BITS (SC_RCV_B7_1|SC_RCV_B7_0|SC_RCV_ODDP|SC_RCV_EVNP)
Expand Down Expand Up @@ -94,7 +93,7 @@ static int ipwireless_ppp_start_xmit(struct ppp_channel *ppp_channel,
unsigned long flags;

spin_lock_irqsave(&network->spinlock, flags);
if (network->outgoing_packets_queued < MAX_OUTGOING_PACKETS_QUEUED) {
if (network->outgoing_packets_queued < ipwireless_out_queue) {
unsigned char *buf;
static unsigned char header[] = {
PPP_ALLSTATIONS, /* 0xff */
Expand Down

0 comments on commit edea08a

Please sign in to comment.