Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 149904
b: refs/heads/master
c: e45d8e5
h: refs/heads/master
v: v3
  • Loading branch information
Bing Zhao authored and John W. Linville committed Apr 22, 2009
1 parent c00ec2e commit cde75f5
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 14 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: 87cbfd06889256cac945b37c7f62f4ce7f44b34a
refs/heads/master: e45d8e534b67580eedd9b4910ccc16d6dd3cceff
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ config LIBERTAS_CS
A driver for Marvell Libertas 8385 CompactFlash devices.

config LIBERTAS_SDIO
tristate "Marvell Libertas 8385 and 8686 SDIO 802.11b/g cards"
tristate "Marvell Libertas 8385/8686/8688 SDIO 802.11b/g cards"
depends on LIBERTAS && MMC
---help---
A driver for Marvell Libertas 8385 and 8686 SDIO devices.
A driver for Marvell Libertas 8385/8686/8688 SDIO devices.

config LIBERTAS_SPI
tristate "Marvell Libertas 8686 SPI 802.11b/g cards"
Expand Down
17 changes: 13 additions & 4 deletions trunk/drivers/net/wireless/libertas/if_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@ static char *lbs_fw_name = NULL;
module_param_named(fw_name, lbs_fw_name, charp, 0644);

static const struct sdio_device_id if_sdio_ids[] = {
{ SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_LIBERTAS) },
{ /* end: all zeroes */ },
{ SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL,
SDIO_DEVICE_ID_MARVELL_LIBERTAS) },
{ SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL,
SDIO_DEVICE_ID_MARVELL_8688WLAN) },
{ /* end: all zeroes */ },
};

MODULE_DEVICE_TABLE(sdio, if_sdio_ids);
Expand All @@ -73,6 +76,12 @@ static struct if_sdio_model if_sdio_models[] = {
.helper = "sd8686_helper.bin",
.firmware = "sd8686.bin",
},
{
/* 8688 */
.model = 0x10,
.helper = "sd8688_helper.bin",
.firmware = "sd8688.bin",
},
};

struct if_sdio_packet {
Expand Down Expand Up @@ -488,7 +497,7 @@ static int if_sdio_prog_helper(struct if_sdio_card *card)
ret = 0;

release:
sdio_set_block_size(card->func, 0);
sdio_set_block_size(card->func, IF_SDIO_BLOCK_SIZE);
sdio_release_host(card->func);
kfree(chunk_buffer);
release_fw:
Expand Down Expand Up @@ -624,7 +633,7 @@ static int if_sdio_prog_real(struct if_sdio_card *card)
ret = 0;

release:
sdio_set_block_size(card->func, 0);
sdio_set_block_size(card->func, IF_SDIO_BLOCK_SIZE);
sdio_release_host(card->func);
kfree(chunk_buffer);
release_fw:
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/net/wireless/libertas/if_sdio.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,6 @@

#define IF_SDIO_EVENT 0x80fc

#define IF_SDIO_BLOCK_SIZE 256

#endif
15 changes: 8 additions & 7 deletions trunk/drivers/net/wireless/libertas/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ struct rfc1042hdr {
} __attribute__ ((packed));

struct rxpackethdr {
struct rxpd rx_pd;
struct eth803hdr eth803_hdr;
struct rfc1042hdr rfc1042_hdr;
} __attribute__ ((packed));
Expand Down Expand Up @@ -158,8 +157,9 @@ int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb)
if (priv->monitormode)
return process_rxed_802_11_packet(priv, skb);

p_rx_pkt = (struct rxpackethdr *) skb->data;
p_rx_pd = &p_rx_pkt->rx_pd;
p_rx_pd = (struct rxpd *) skb->data;
p_rx_pkt = (struct rxpackethdr *) ((u8 *)p_rx_pd +
le32_to_cpu(p_rx_pd->pkt_ptr));
if (priv->mesh_dev) {
if (priv->mesh_fw_ver == MESH_FW_OLD) {
if (p_rx_pd->rx_control & RxPD_MESH_FRAME)
Expand All @@ -181,8 +181,9 @@ int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb)
goto done;
}

lbs_deb_rx("rx data: skb->len-sizeof(RxPd) = %d-%zd = %zd\n",
skb->len, sizeof(struct rxpd), skb->len - sizeof(struct rxpd));
lbs_deb_rx("rx data: skb->len - pkt_ptr = %d-%zd = %zd\n",
skb->len, le32_to_cpu(p_rx_pd->pkt_ptr),
skb->len - le32_to_cpu(p_rx_pd->pkt_ptr));

lbs_deb_hex(LBS_DEB_RX, "RX Data: Dest", p_rx_pkt->eth803_hdr.dest_addr,
sizeof(p_rx_pkt->eth803_hdr.dest_addr));
Expand Down Expand Up @@ -216,14 +217,14 @@ int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb)
/* Chop off the rxpd + the excess memory from the 802.2/llc/snap header
* that was removed
*/
hdrchop = (u8 *) p_ethhdr - (u8 *) p_rx_pkt;
hdrchop = (u8 *)p_ethhdr - (u8 *)p_rx_pd;
} else {
lbs_deb_hex(LBS_DEB_RX, "RX Data: LLC/SNAP",
(u8 *) & p_rx_pkt->rfc1042_hdr,
sizeof(p_rx_pkt->rfc1042_hdr));

/* Chop off the rxpd */
hdrchop = (u8 *) & p_rx_pkt->eth803_hdr - (u8 *) p_rx_pkt;
hdrchop = (u8 *)&p_rx_pkt->eth803_hdr - (u8 *)p_rx_pd;
}

/* Chop off the leading header bytes so the skb points to the start of
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/mmc/sdio_ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,7 @@

#define SDIO_VENDOR_ID_MARVELL 0x02df
#define SDIO_DEVICE_ID_MARVELL_LIBERTAS 0x9103
#define SDIO_DEVICE_ID_MARVELL_8688WLAN 0x9104
#define SDIO_DEVICE_ID_MARVELL_8688BT 0x9105

#endif

0 comments on commit cde75f5

Please sign in to comment.