Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 89927
b: refs/heads/master
c: f813921
h: refs/heads/master
i:
  89925: 3c88c37
  89923: f0e71a7
  89919: 7d045ae
v: v3
  • Loading branch information
Matthias Kaehlcke authored and John W. Linville committed Feb 29, 2008
1 parent 6c2cbb6 commit 2771258
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 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: 6f865c0ab9318cd4c357654e460cb4c9aaf23a92
refs/heads/master: f8139218b32e9a68fc6779fa0ce45c5078c23c8a
8 changes: 4 additions & 4 deletions trunk/drivers/net/wireless/prism54/isl_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ prism54_update_stats(struct work_struct *work)
struct obj_bss bss, *bss2;
union oid_res_t r;

down(&priv->stats_sem);
mutex_lock(&priv->stats_lock);

/* Noise floor.
* I'm not sure if the unit is dBm.
Expand Down Expand Up @@ -207,7 +207,7 @@ prism54_update_stats(struct work_struct *work)
mgt_get_request(priv, DOT11_OID_MPDUTXFAILED, 0, NULL, &r);
priv->local_iwstatistics.discard.retries = r.u;

up(&priv->stats_sem);
mutex_unlock(&priv->stats_lock);

return;
}
Expand All @@ -218,12 +218,12 @@ prism54_get_wireless_stats(struct net_device *ndev)
islpci_private *priv = netdev_priv(ndev);

/* If the stats are being updated return old data */
if (down_trylock(&priv->stats_sem) == 0) {
if (mutex_trylock(&priv->stats_lock) == 0) {
memcpy(&priv->iwstatistics, &priv->local_iwstatistics,
sizeof (struct iw_statistics));
/* They won't be marked updated for the next time */
priv->local_iwstatistics.qual.updated = 0;
up(&priv->stats_sem);
mutex_unlock(&priv->stats_lock);
} else
priv->iwstatistics.qual.updated = 0;

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/prism54/islpci_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ islpci_setup(struct pci_dev *pdev)
mutex_init(&priv->mgmt_lock);
priv->mgmt_received = NULL;
init_waitqueue_head(&priv->mgmt_wqueue);
sema_init(&priv->stats_sem, 1);
mutex_init(&priv->stats_lock);
spin_lock_init(&priv->slock);

/* init state machine with off#1 state */
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/prism54/islpci_dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ typedef struct {

/* Take care of the wireless stats */
struct work_struct stats_work;
struct semaphore stats_sem;
struct mutex stats_lock;
/* remember when we last updated the stats */
unsigned long stats_timestamp;
/* The first is accessed under semaphore locking.
Expand Down

0 comments on commit 2771258

Please sign in to comment.