diff options
author | Mike McCormack <mikem@ring3k.org> | 2011-03-10 08:33:01 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-03-14 15:24:44 -0400 |
commit | de69ba32136a790ee6b4d009df4c0a0b9cc0f6cd (patch) | |
tree | a3fa11d13aaf684b37c7b972e2431ae3b39a01ab /drivers/staging | |
parent | 699d01570230f3830ddf299c5f932e7525c9647a (diff) |
staging: rtl8192e: Pass priv pointer to proc
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/rtl8192e/r8192E_core.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/drivers/staging/rtl8192e/r8192E_core.c b/drivers/staging/rtl8192e/r8192E_core.c index 9896a5de6b00..cd3e2ce2aef7 100644 --- a/drivers/staging/rtl8192e/r8192E_core.c +++ b/drivers/staging/rtl8192e/r8192E_core.c | |||
@@ -368,8 +368,7 @@ static int proc_get_stats_ap(char *page, char **start, | |||
368 | off_t offset, int count, | 368 | off_t offset, int count, |
369 | int *eof, void *data) | 369 | int *eof, void *data) |
370 | { | 370 | { |
371 | struct net_device *dev = data; | 371 | struct r8192_priv *priv = data; |
372 | struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); | ||
373 | struct ieee80211_device *ieee = priv->ieee80211; | 372 | struct ieee80211_device *ieee = priv->ieee80211; |
374 | struct ieee80211_network *target; | 373 | struct ieee80211_network *target; |
375 | int len = 0; | 374 | int len = 0; |
@@ -398,8 +397,7 @@ static int proc_get_registers(char *page, char **start, | |||
398 | off_t offset, int count, | 397 | off_t offset, int count, |
399 | int *eof, void *data) | 398 | int *eof, void *data) |
400 | { | 399 | { |
401 | struct net_device *dev = data; | 400 | struct r8192_priv *priv = data; |
402 | struct r8192_priv *priv = ieee80211_priv(dev); | ||
403 | int len = 0; | 401 | int len = 0; |
404 | int i,n; | 402 | int i,n; |
405 | int max=0xff; | 403 | int max=0xff; |
@@ -451,8 +449,7 @@ static int proc_get_stats_tx(char *page, char **start, | |||
451 | off_t offset, int count, | 449 | off_t offset, int count, |
452 | int *eof, void *data) | 450 | int *eof, void *data) |
453 | { | 451 | { |
454 | struct net_device *dev = data; | 452 | struct r8192_priv *priv = data; |
455 | struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); | ||
456 | 453 | ||
457 | int len = 0; | 454 | int len = 0; |
458 | 455 | ||
@@ -477,7 +474,7 @@ static int proc_get_stats_tx(char *page, char **start, | |||
477 | priv->stats.txbeaconokint, | 474 | priv->stats.txbeaconokint, |
478 | priv->stats.txbeaconerr, | 475 | priv->stats.txbeaconerr, |
479 | priv->stats.txcmdpktokint, | 476 | priv->stats.txcmdpktokint, |
480 | netif_queue_stopped(dev), | 477 | netif_queue_stopped(priv->ieee80211->dev), |
481 | priv->stats.txoverflow, | 478 | priv->stats.txoverflow, |
482 | priv->ieee80211->stats.tx_packets, | 479 | priv->ieee80211->stats.tx_packets, |
483 | priv->ieee80211->stats.tx_bytes); | 480 | priv->ieee80211->stats.tx_bytes); |
@@ -492,9 +489,7 @@ static int proc_get_stats_rx(char *page, char **start, | |||
492 | off_t offset, int count, | 489 | off_t offset, int count, |
493 | int *eof, void *data) | 490 | int *eof, void *data) |
494 | { | 491 | { |
495 | struct net_device *dev = data; | 492 | struct r8192_priv *priv = data; |
496 | struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); | ||
497 | |||
498 | int len = 0; | 493 | int len = 0; |
499 | 494 | ||
500 | len += snprintf(page + len, count - len, | 495 | len += snprintf(page + len, count - len, |
@@ -553,7 +548,7 @@ static void rtl8192_proc_init_one(struct r8192_priv *priv) | |||
553 | return; | 548 | return; |
554 | } | 549 | } |
555 | e = create_proc_read_entry("stats-rx", S_IFREG | S_IRUGO, | 550 | e = create_proc_read_entry("stats-rx", S_IFREG | S_IRUGO, |
556 | priv->dir_dev, proc_get_stats_rx, dev); | 551 | priv->dir_dev, proc_get_stats_rx, priv); |
557 | 552 | ||
558 | if (!e) { | 553 | if (!e) { |
559 | RT_TRACE(COMP_ERR,"Unable to initialize " | 554 | RT_TRACE(COMP_ERR,"Unable to initialize " |
@@ -563,7 +558,7 @@ static void rtl8192_proc_init_one(struct r8192_priv *priv) | |||
563 | 558 | ||
564 | 559 | ||
565 | e = create_proc_read_entry("stats-tx", S_IFREG | S_IRUGO, | 560 | e = create_proc_read_entry("stats-tx", S_IFREG | S_IRUGO, |
566 | priv->dir_dev, proc_get_stats_tx, dev); | 561 | priv->dir_dev, proc_get_stats_tx, priv); |
567 | 562 | ||
568 | if (!e) { | 563 | if (!e) { |
569 | RT_TRACE(COMP_ERR, "Unable to initialize " | 564 | RT_TRACE(COMP_ERR, "Unable to initialize " |
@@ -572,7 +567,7 @@ static void rtl8192_proc_init_one(struct r8192_priv *priv) | |||
572 | } | 567 | } |
573 | 568 | ||
574 | e = create_proc_read_entry("stats-ap", S_IFREG | S_IRUGO, | 569 | e = create_proc_read_entry("stats-ap", S_IFREG | S_IRUGO, |
575 | priv->dir_dev, proc_get_stats_ap, dev); | 570 | priv->dir_dev, proc_get_stats_ap, priv); |
576 | 571 | ||
577 | if (!e) { | 572 | if (!e) { |
578 | RT_TRACE(COMP_ERR, "Unable to initialize " | 573 | RT_TRACE(COMP_ERR, "Unable to initialize " |
@@ -581,7 +576,7 @@ static void rtl8192_proc_init_one(struct r8192_priv *priv) | |||
581 | } | 576 | } |
582 | 577 | ||
583 | e = create_proc_read_entry("registers", S_IFREG | S_IRUGO, | 578 | e = create_proc_read_entry("registers", S_IFREG | S_IRUGO, |
584 | priv->dir_dev, proc_get_registers, dev); | 579 | priv->dir_dev, proc_get_registers, priv); |
585 | if (!e) { | 580 | if (!e) { |
586 | RT_TRACE(COMP_ERR, "Unable to initialize " | 581 | RT_TRACE(COMP_ERR, "Unable to initialize " |
587 | "/proc/net/rtl8192/%s/registers\n", | 582 | "/proc/net/rtl8192/%s/registers\n", |