Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 134267
b: refs/heads/master
c: 08e87a8
h: refs/heads/master
i:
  134265: d714468
  134263: 667cbff
v: v3
  • Loading branch information
Alina Friedrichsen authored and John W. Linville committed Jan 29, 2009
1 parent 2798070 commit a327a67
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 33 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: 3b5d665b51cda73ef1a774b515afd879a38e3674
refs/heads/master: 08e87a833f5e77ff33b64c9ac27cb7fb9ecd4a48
31 changes: 0 additions & 31 deletions trunk/drivers/net/wireless/b43/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,34 +367,6 @@ static int mmio32write__write_file(struct b43_wldev *dev,
return 0;
}

/* wl->irq_lock is locked */
static ssize_t tsf_read_file(struct b43_wldev *dev,
char *buf, size_t bufsize)
{
ssize_t count = 0;
u64 tsf;

b43_tsf_read(dev, &tsf);
fappend("0x%08x%08x\n",
(unsigned int)((tsf & 0xFFFFFFFF00000000ULL) >> 32),
(unsigned int)(tsf & 0xFFFFFFFFULL));

return count;
}

/* wl->irq_lock is locked */
static int tsf_write_file(struct b43_wldev *dev,
const char *buf, size_t count)
{
u64 tsf;

if (sscanf(buf, "%llu", (unsigned long long *)(&tsf)) != 1)
return -EINVAL;
b43_tsf_write(dev, tsf);

return 0;
}

static ssize_t txstat_read_file(struct b43_wldev *dev,
char *buf, size_t bufsize)
{
Expand Down Expand Up @@ -691,7 +663,6 @@ B43_DEBUGFS_FOPS(mmio16read, mmio16read__read_file, mmio16read__write_file, 1);
B43_DEBUGFS_FOPS(mmio16write, NULL, mmio16write__write_file, 1);
B43_DEBUGFS_FOPS(mmio32read, mmio32read__read_file, mmio32read__write_file, 1);
B43_DEBUGFS_FOPS(mmio32write, NULL, mmio32write__write_file, 1);
B43_DEBUGFS_FOPS(tsf, tsf_read_file, tsf_write_file, 1);
B43_DEBUGFS_FOPS(txstat, txstat_read_file, NULL, 0);
B43_DEBUGFS_FOPS(restart, NULL, restart_write_file, 1);
B43_DEBUGFS_FOPS(loctls, loctls_read_file, NULL, 0);
Expand Down Expand Up @@ -805,7 +776,6 @@ void b43_debugfs_add_device(struct b43_wldev *dev)
ADD_FILE(mmio16write, 0200);
ADD_FILE(mmio32read, 0600);
ADD_FILE(mmio32write, 0200);
ADD_FILE(tsf, 0600);
ADD_FILE(txstat, 0400);
ADD_FILE(restart, 0200);
ADD_FILE(loctls, 0400);
Expand Down Expand Up @@ -834,7 +804,6 @@ void b43_debugfs_remove_device(struct b43_wldev *dev)
debugfs_remove(e->file_mmio16write.dentry);
debugfs_remove(e->file_mmio32read.dentry);
debugfs_remove(e->file_mmio32write.dentry);
debugfs_remove(e->file_tsf.dentry);
debugfs_remove(e->file_txstat.dentry);
debugfs_remove(e->file_restart.dentry);
debugfs_remove(e->file_loctls.dentry);
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/wireless/b43/debugfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ struct b43_dfsentry {
struct b43_dfs_file file_mmio16write;
struct b43_dfs_file file_mmio32read;
struct b43_dfs_file file_mmio32write;
struct b43_dfs_file file_tsf;
struct b43_dfs_file file_txstat;
struct b43_dfs_file file_txpower_g;
struct b43_dfs_file file_restart;
Expand Down
39 changes: 39 additions & 0 deletions trunk/drivers/net/wireless/b43/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3245,6 +3245,43 @@ static int b43_op_get_stats(struct ieee80211_hw *hw,
return 0;
}

static u64 b43_op_get_tsf(struct ieee80211_hw *hw)
{
struct b43_wl *wl = hw_to_b43_wl(hw);
struct b43_wldev *dev;
u64 tsf;

mutex_lock(&wl->mutex);
spin_lock_irq(&wl->irq_lock);
dev = wl->current_dev;

if (dev && (b43_status(dev) >= B43_STAT_INITIALIZED))
b43_tsf_read(dev, &tsf);
else
tsf = 0;

spin_unlock_irq(&wl->irq_lock);
mutex_unlock(&wl->mutex);

return tsf;
}

static void b43_op_set_tsf(struct ieee80211_hw *hw, u64 tsf)
{
struct b43_wl *wl = hw_to_b43_wl(hw);
struct b43_wldev *dev;

mutex_lock(&wl->mutex);
spin_lock_irq(&wl->irq_lock);
dev = wl->current_dev;

if (dev && (b43_status(dev) >= B43_STAT_INITIALIZED))
b43_tsf_write(dev, tsf);

spin_unlock_irq(&wl->irq_lock);
mutex_unlock(&wl->mutex);
}

static void b43_put_phy_into_reset(struct b43_wldev *dev)
{
struct ssb_device *sdev = dev->dev;
Expand Down Expand Up @@ -4364,6 +4401,8 @@ static const struct ieee80211_ops b43_hw_ops = {
.set_key = b43_op_set_key,
.get_stats = b43_op_get_stats,
.get_tx_stats = b43_op_get_tx_stats,
.get_tsf = b43_op_get_tsf,
.set_tsf = b43_op_set_tsf,
.start = b43_op_start,
.stop = b43_op_stop,
.set_tim = b43_op_beacon_set_tim,
Expand Down

0 comments on commit a327a67

Please sign in to comment.