Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203732
b: refs/heads/master
c: b603742
h: refs/heads/master
v: v3
  • Loading branch information
John W. Linville committed Jul 20, 2010
1 parent 90abd74 commit 339f56a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 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: 34782e9e1e58810183f2c1201124e45314b37130
refs/heads/master: b603742f49c3ec922522602e18ac22e8f6835132
22 changes: 12 additions & 10 deletions trunk/drivers/net/wireless/mwl8k.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,13 +314,15 @@ static const struct ieee80211_rate mwl8k_rates_50[] = {
#define MWL8K_CMD_SET_NEW_STN 0x1111 /* per-vif */
#define MWL8K_CMD_UPDATE_STADB 0x1123

static const char *mwl8k_cmd_name(u16 cmd, char *buf, int bufsize)
static const char *mwl8k_cmd_name(__le16 cmd, char *buf, int bufsize)
{
u16 command = le16_to_cpu(cmd);

#define MWL8K_CMDNAME(x) case MWL8K_CMD_##x: do {\
snprintf(buf, bufsize, "%s", #x);\
return buf;\
} while (0)
switch (cmd & ~0x8000) {
switch (command & ~0x8000) {
MWL8K_CMDNAME(CODE_DNLD);
MWL8K_CMDNAME(GET_HW_SPEC);
MWL8K_CMDNAME(SET_HW_SPEC);
Expand Down Expand Up @@ -1538,7 +1540,7 @@ static int mwl8k_post_cmd(struct ieee80211_hw *hw, struct mwl8k_cmd_pkt *cmd)
unsigned long timeout = 0;
u8 buf[32];

cmd->result = 0xffff;
cmd->result = (__force __le16) 0xffff;
dma_size = le16_to_cpu(cmd->length);
dma_addr = pci_map_single(priv->pdev, cmd, dma_size,
PCI_DMA_BIDIRECTIONAL);
Expand Down Expand Up @@ -1842,22 +1844,22 @@ static int mwl8k_cmd_get_hw_spec_ap(struct ieee80211_hw *hw)
priv->sta_macids_supported = 0x00000000;

off = le32_to_cpu(cmd->wcbbase0) & 0xffff;
iowrite32(cpu_to_le32(priv->txq[0].txd_dma), priv->sram + off);
iowrite32(priv->txq[0].txd_dma, priv->sram + off);

off = le32_to_cpu(cmd->rxwrptr) & 0xffff;
iowrite32(cpu_to_le32(priv->rxq[0].rxd_dma), priv->sram + off);
iowrite32(priv->rxq[0].rxd_dma, priv->sram + off);

off = le32_to_cpu(cmd->rxrdptr) & 0xffff;
iowrite32(cpu_to_le32(priv->rxq[0].rxd_dma), priv->sram + off);
iowrite32(priv->rxq[0].rxd_dma, priv->sram + off);

off = le32_to_cpu(cmd->wcbbase1) & 0xffff;
iowrite32(cpu_to_le32(priv->txq[1].txd_dma), priv->sram + off);
iowrite32(priv->txq[1].txd_dma, priv->sram + off);

off = le32_to_cpu(cmd->wcbbase2) & 0xffff;
iowrite32(cpu_to_le32(priv->txq[2].txd_dma), priv->sram + off);
iowrite32(priv->txq[2].txd_dma, priv->sram + off);

off = le32_to_cpu(cmd->wcbbase3) & 0xffff;
iowrite32(cpu_to_le32(priv->txq[3].txd_dma), priv->sram + off);
iowrite32(priv->txq[3].txd_dma, priv->sram + off);
}

kfree(cmd);
Expand Down Expand Up @@ -3052,7 +3054,7 @@ static int mwl8k_cmd_update_stadb_add(struct ieee80211_hw *hw,
p->peer_type = MWL8K_PEER_TYPE_ACCESSPOINT;
p->basic_caps = cpu_to_le16(vif->bss_conf.assoc_capability);
p->ht_support = sta->ht_cap.ht_supported;
p->ht_caps = sta->ht_cap.cap;
p->ht_caps = cpu_to_le16(sta->ht_cap.cap);
p->extended_ht_caps = (sta->ht_cap.ampdu_factor & 3) |
((sta->ht_cap.ampdu_density & 7) << 2);
if (hw->conf.channel->band == IEEE80211_BAND_2GHZ)
Expand Down

0 comments on commit 339f56a

Please sign in to comment.