Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111296
b: refs/heads/master
c: 84df3ed
h: refs/heads/master
v: v3
  • Loading branch information
Chr authored and John W. Linville committed Aug 29, 2008
1 parent 635f6d3 commit 16f9f0a
Show file tree
Hide file tree
Showing 3 changed files with 15 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: 031d10ee5a6df5aba6b4ac8bb01dd023cd5efc02
refs/heads/master: 84df3ed30b72c3516d72bc9734d4425746b15dfc
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/p54/p54.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ struct p54_common {
unsigned int tx_hdr_len;
void *cached_vdcf;
unsigned int fw_var;
struct ieee80211_tx_queue_stats tx_stats[4];
struct ieee80211_tx_queue_stats tx_stats[8];
};

int p54_rx(struct ieee80211_hw *dev, struct sk_buff *skb);
Expand Down
22 changes: 13 additions & 9 deletions trunk/drivers/net/wireless/p54/p54common.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ void p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw)

if (priv->fw_var >= 0x300) {
/* Firmware supports QoS, use it! */
priv->tx_stats[0].limit = 3;
priv->tx_stats[1].limit = 4;
priv->tx_stats[2].limit = 3;
priv->tx_stats[3].limit = 1;
priv->tx_stats[4].limit = 3;
priv->tx_stats[5].limit = 4;
priv->tx_stats[6].limit = 3;
priv->tx_stats[7].limit = 1;
dev->queues = 4;
}
}
Expand Down Expand Up @@ -418,7 +418,7 @@ static void inline p54_wake_free_queues(struct ieee80211_hw *dev)
int i;

for (i = 0; i < dev->queues; i++)
if (priv->tx_stats[i].len < priv->tx_stats[i].limit)
if (priv->tx_stats[i + 4].len < priv->tx_stats[i + 4].limit)
ieee80211_wake_queue(dev, i);
}

Expand Down Expand Up @@ -463,7 +463,7 @@ static void p54_rx_frame_sent(struct ieee80211_hw *dev, struct sk_buff *skb)
if ((entry_hdr->magic1 & cpu_to_le16(0x4000)) != 0)
pad = entry_data->align[0];

priv->tx_stats[entry_data->hw_queue - 4].len--;
priv->tx_stats[entry_data->hw_queue].len--;
if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) {
if (!(payload->status & 0x01))
info->flags |= IEEE80211_TX_STAT_ACK;
Expand Down Expand Up @@ -606,7 +606,7 @@ static int p54_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
u8 rate;
u8 cts_rate = 0x20;

current_queue = &priv->tx_stats[skb_get_queue_mapping(skb)];
current_queue = &priv->tx_stats[skb_get_queue_mapping(skb) + 4];
if (unlikely(current_queue->len > current_queue->limit))
return NETDEV_TX_BUSY;
current_queue->len++;
Expand Down Expand Up @@ -1037,7 +1037,7 @@ static int p54_get_tx_stats(struct ieee80211_hw *dev,
{
struct p54_common *priv = dev->priv;

memcpy(stats, &priv->tx_stats, sizeof(stats[0]) * dev->queues);
memcpy(stats, &priv->tx_stats[4], sizeof(stats[0]) * dev->queues);

return 0;
}
Expand Down Expand Up @@ -1075,7 +1075,11 @@ struct ieee80211_hw *p54_init_common(size_t priv_data_len)
dev->channel_change_time = 1000; /* TODO: find actual value */
dev->max_signal = 127;

priv->tx_stats[0].limit = 5;
priv->tx_stats[0].limit = 1;
priv->tx_stats[1].limit = 1;
priv->tx_stats[2].limit = 1;
priv->tx_stats[3].limit = 1;
priv->tx_stats[4].limit = 5;
dev->queues = 1;

dev->extra_tx_headroom = sizeof(struct p54_control_hdr) + 4 +
Expand Down

0 comments on commit 16f9f0a

Please sign in to comment.