Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193670
b: refs/heads/master
c: ac5e1e3
h: refs/heads/master
v: v3
  • Loading branch information
Juuso Oikarinen authored and John W. Linville committed Mar 9, 2010
1 parent 2ce6198 commit f3d7121
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 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: 1e73eb62cec7cf78b7295769b6e51a915518f5a1
refs/heads/master: ac5e1e39c1eeaaff7e6f03bf7cf7a444b42fbc23
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/wl12xx/wl1271.h
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ struct wl1271 {
u32 tx_packets_count;

/* Time-offset between host and chipset clocks */
int time_offset;
s64 time_offset;

/* Session counter for the chipset */
int session_counter;
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/net/wireless/wl12xx/wl1271_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ static void wl1271_power_on(struct wl1271 *wl)
static void wl1271_fw_status(struct wl1271 *wl,
struct wl1271_fw_status *status)
{
struct timespec ts;
u32 total = 0;
int i;

Expand Down Expand Up @@ -402,8 +403,9 @@ static void wl1271_fw_status(struct wl1271 *wl,
ieee80211_queue_work(wl->hw, &wl->tx_work);

/* update the host-chipset time offset */
wl->time_offset = jiffies_to_usecs(jiffies) -
le32_to_cpu(status->fw_localtime);
getnstimeofday(&ts);
wl->time_offset = (timespec_to_ns(&ts) >> 10) -
(s64)le32_to_cpu(status->fw_localtime);
}

#define WL1271_IRQ_MAX_LOOPS 10
Expand Down
7 changes: 5 additions & 2 deletions trunk/drivers/net/wireless/wl12xx/wl1271_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ static int wl1271_tx_allocate(struct wl1271 *wl, struct sk_buff *skb, u32 extra)
static int wl1271_tx_fill_hdr(struct wl1271 *wl, struct sk_buff *skb,
u32 extra, struct ieee80211_tx_info *control)
{
struct timespec ts;
struct wl1271_tx_hw_descr *desc;
int pad, ac;
s64 hosttime;
u16 tx_attr;

desc = (struct wl1271_tx_hw_descr *) skb->data;
Expand All @@ -101,8 +103,9 @@ static int wl1271_tx_fill_hdr(struct wl1271 *wl, struct sk_buff *skb,
}

/* configure packet life time */
desc->start_time = cpu_to_le32(jiffies_to_usecs(jiffies) -
wl->time_offset);
getnstimeofday(&ts);
hosttime = (timespec_to_ns(&ts) >> 10);
desc->start_time = cpu_to_le32(hosttime - wl->time_offset);
desc->life_time = cpu_to_le16(TX_HW_MGMT_PKT_LIFETIME_TU);

/* configure the tx attributes */
Expand Down

0 comments on commit f3d7121

Please sign in to comment.