aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/xmit.c
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2008-04-03 12:01:12 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-04-08 16:44:41 -0400
commit7b584163979a9fe2ebfdd57a9d64cbe27166ab70 (patch)
treedfea5d287564ecb38513f71ed21c68d54059c5bb /drivers/net/wireless/b43/xmit.c
parent9cfb0009dab6d6b4c5a15c5d74ab60d7a7a7371b (diff)
b43: Add more N-PHY stuff
This adds some minor stuff for N-PHY support. Nothing special. Adds Analog switching and some TODOs for RSSI processing. Just a patch I had floating around for quite some time now. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/xmit.c')
-rw-r--r--drivers/net/wireless/b43/xmit.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c
index b2a3123f42db..19aefbfb2c93 100644
--- a/drivers/net/wireless/b43/xmit.c
+++ b/drivers/net/wireless/b43/xmit.c
@@ -513,7 +513,6 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
513 u32 macstat; 513 u32 macstat;
514 u16 chanid; 514 u16 chanid;
515 u16 phytype; 515 u16 phytype;
516 u8 jssi;
517 int padding; 516 int padding;
518 517
519 memset(&status, 0, sizeof(status)); 518 memset(&status, 0, sizeof(status));
@@ -521,7 +520,6 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
521 /* Get metadata about the frame from the header. */ 520 /* Get metadata about the frame from the header. */
522 phystat0 = le16_to_cpu(rxhdr->phy_status0); 521 phystat0 = le16_to_cpu(rxhdr->phy_status0);
523 phystat3 = le16_to_cpu(rxhdr->phy_status3); 522 phystat3 = le16_to_cpu(rxhdr->phy_status3);
524 jssi = rxhdr->jssi;
525 macstat = le32_to_cpu(rxhdr->mac_status); 523 macstat = le32_to_cpu(rxhdr->mac_status);
526 mactime = le16_to_cpu(rxhdr->mac_time); 524 mactime = le16_to_cpu(rxhdr->mac_time);
527 chanstat = le16_to_cpu(rxhdr->channel); 525 chanstat = le16_to_cpu(rxhdr->channel);
@@ -575,13 +573,22 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
575 } 573 }
576 } 574 }
577 575
578 status.ssi = b43_rssi_postprocess(dev, jssi, 576 /* Link quality statistics */
579 (phystat0 & B43_RX_PHYST0_OFDM),
580 (phystat0 & B43_RX_PHYST0_GAINCTL),
581 (phystat3 & B43_RX_PHYST3_TRSTATE));
582 status.noise = dev->stats.link_noise; 577 status.noise = dev->stats.link_noise;
583 /* the next line looks wrong, but is what mac80211 wants */ 578 if ((chanstat & B43_RX_CHAN_PHYTYPE) == B43_PHYTYPE_N) {
584 status.signal = (jssi * 100) / B43_RX_MAX_SSI; 579// s8 rssi = max(rxhdr->power0, rxhdr->power1);
580 //TODO: Find out what the rssi value is (dBm or percentage?)
581 // and also find out what the maximum possible value is.
582 // Fill status.ssi and status.signal fields.
583 } else {
584 status.ssi = b43_rssi_postprocess(dev, rxhdr->jssi,
585 (phystat0 & B43_RX_PHYST0_OFDM),
586 (phystat0 & B43_RX_PHYST0_GAINCTL),
587 (phystat3 & B43_RX_PHYST3_TRSTATE));
588 /* the next line looks wrong, but is what mac80211 wants */
589 status.signal = (rxhdr->jssi * 100) / B43_RX_MAX_SSI;
590 }
591
585 if (phystat0 & B43_RX_PHYST0_OFDM) 592 if (phystat0 & B43_RX_PHYST0_OFDM)
586 status.rate_idx = b43_plcp_get_bitrate_idx_ofdm(plcp, 593 status.rate_idx = b43_plcp_get_bitrate_idx_ofdm(plcp,
587 phytype == B43_PHYTYPE_A); 594 phytype == B43_PHYTYPE_A);