Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111607
b: refs/heads/master
c: a0db663
h: refs/heads/master
i:
  111605: 8f7d27b
  111603: b7c98fc
  111599: 24afc36
v: v3
  • Loading branch information
Christian Lamparter authored and John W. Linville committed Sep 11, 2008
1 parent caf4717 commit 704ebb8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 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: 3c9355222cc521ca2e8c355a9b05e773900c5dc0
refs/heads/master: a0db663ff192e21ebb703f962308675f22fb38a8
2 changes: 2 additions & 0 deletions trunk/drivers/net/wireless/p54/p54.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ struct p54_common {
void *cached_vdcf;
unsigned int fw_var;
unsigned int fw_interface;
u32 tsf_low32;
u32 tsf_high32;
struct ieee80211_tx_queue_stats tx_stats[8];
void *eeprom;
struct completion eeprom_comp;
Expand Down
11 changes: 10 additions & 1 deletion trunk/drivers/net/wireless/p54/p54common.c
Original file line number Diff line number Diff line change
Expand Up @@ -426,10 +426,12 @@ EXPORT_SYMBOL_GPL(p54_parse_eeprom);

static int p54_rx_data(struct ieee80211_hw *dev, struct sk_buff *skb)
{
struct p54_common *priv = dev->priv;
struct p54_rx_hdr *hdr = (struct p54_rx_hdr *) skb->data;
struct ieee80211_rx_status rx_status = {0};
u16 freq = le16_to_cpu(hdr->freq);
size_t header_len = sizeof(*hdr);
u32 tsf32;

rx_status.signal = hdr->rssi;
/* XX correct? */
Expand All @@ -438,7 +440,13 @@ static int p54_rx_data(struct ieee80211_hw *dev, struct sk_buff *skb)
rx_status.freq = freq;
rx_status.band = IEEE80211_BAND_2GHZ;
rx_status.antenna = hdr->antenna;
rx_status.mactime = le64_to_cpu(hdr->timestamp);

tsf32 = le32_to_cpu(hdr->tsf32);
if (tsf32 < priv->tsf_low32)
priv->tsf_high32++;
rx_status.mactime = ((u64)priv->tsf_high32) << 32 | tsf32;
priv->tsf_low32 = tsf32;

rx_status.flag |= RX_FLAG_TSFT;

if (hdr->magic & cpu_to_le16(0x4000))
Expand Down Expand Up @@ -1037,6 +1045,7 @@ static void p54_stop(struct ieee80211_hw *dev)
while ((skb = skb_dequeue(&priv->tx_queue)))
kfree_skb(skb);
priv->stop(dev);
priv->tsf_high32 = priv->tsf_low32 = 0;
priv->mode = IEEE80211_IF_TYPE_INVALID;
}

Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/net/wireless/p54/p54common.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ struct p54_rx_hdr {
u8 rssi;
u8 quality;
u16 unknown2;
__le64 timestamp;
__le32 tsf32;
__le32 unalloc0;
u8 align[0];
} __attribute__ ((packed));

Expand Down

0 comments on commit 704ebb8

Please sign in to comment.