Revert "b43: trivial: do not report any link quality instead of invalid one"
PATCH 1/2 Revert "b43: trivial: do not report any link quality instead of invalid one"
This reverts commit 55ad5962e97430c83d51df36fc18865ee4f78c48.
I assumed N is newer than LP, which isn't true. This regressed LP case.
---
It seems that wasn't so "trivial", sorry for this regression :|
--- drivers/net/wireless/b43/xmit.c | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-)
drivers/net/wireless/b43/xmit.c +5 -7
@@ -735,13 +735,11 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr) }/* Link quality statistics */ -if ((chanstat &B43_RX_CHAN_PHYTYPE ) >=B43_PHYTYPE_N ) { -/* -s8 rssi = max(rxhdr->power0, rxhdr->power1); -TODO: Find out what the rssi value is (dBm or percentage?) -and also find out what the maximum possible value is. -Fill status.ssi and status.signal fields. -*/ +if ((chanstat &B43_RX_CHAN_PHYTYPE ) ==B43_PHYTYPE_N ) { +// s8 rssi = max(rxhdr->power0, rxhdr->power1); +//TODO: Find out what the rssi value is (dBm or percentage?) +// and also find out what the maximum possible value is. +// Fill status.ssi and status.signal fields. }else { status.signal = b43_rssi_postprocess(dev, rxhdr->jssi, (phystat0 & B43_RX_PHYST0_OFDM),
Signature · 1 line
1.7.3.4
PATCH 2/2 b43: N-PHY: report signal to mac80211
---
John: do you think it is still possible to get this for 3.2?
--- drivers/net/wireless/b43/xmit.c | 18 ++++++++++++------ drivers/net/wireless/b43/xmit.h | 10 +++++++++- 2 files changed, 21 insertions(+), 7 deletions(-)
drivers/net/wireless/b43/xmit.c +12 -6
@@ -735,16 +735,22 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr) }/* Link quality statistics */ -if ((chanstat &B43_RX_CHAN_PHYTYPE ) ==B43_PHYTYPE_N ) { -// s8 rssi = max(rxhdr->power0, rxhdr->power1); -//TODO: Find out what the rssi value is (dBm or percentage?) -// and also find out what the maximum possible value is. -// Fill status.ssi and status.signal fields. - }else { +switch (chanstat &B43_RX_CHAN_PHYTYPE ) { +case B43_PHYTYPE_N : +if (rxhdr->power0 ==16 || rxhdr->power0 ==32 ) + status.signal =max (rxhdr->power1, rxhdr->power2); +else + status.signal =max (rxhdr->power0, rxhdr->power1); +break ; +case B43_PHYTYPE_A : +case B43_PHYTYPE_B : +case B43_PHYTYPE_G : +case B43_PHYTYPE_LP : status.signal =b43_rssi_postprocess (dev, rxhdr->jssi, (phystat0 &B43_RX_PHYST0_OFDM ), (phystat0 &B43_RX_PHYST0_GAINCTL ), (phystat3 &B43_RX_PHYST3_TRSTATE )); +break ; }if (phystat0 &B43_RX_PHYST0_OFDM )
drivers/net/wireless/b43/xmit.h +9 -1
@@ -248,7 +248,15 @@ struct b43_rxhdr_fw4 {__s8 power1;/* PHY RX Status 1: Power 1 */ } __packed; } __packed; -__le16 phy_status2;/* PHY RX Status 2 */ +union { +/* RSSI for N-PHYs */ +struct { +__s8 power2; + PAD_BYTES(1); + } __packed; + +__le16 phy_status2;/* PHY RX Status 2 */ + } __packed;__le16 phy_status3;/* PHY RX Status 3 */ union {/* Tested with 598.314, 644.1001 and 666.2 */
Signature · 1 line
1.7.3.4
2011/10/12 Rafał Miłecki <[email protected]>:
Quoted 35 lines
This reverts commit
55ad5962e97430c83d51df36fc18865ee4f78c48.I assumed N is newer than LP, which isn't true. This regressed LP case.
Signed-off-by Rafał Miłecki <[email protected]>---
It seems that wasn't so "trivial", sorry for this regression :|
---
drivers/net/wireless/b43/xmit.c | 12 +++++-------1 files changed, 5 insertions(+), 7 deletions(-)drivers/net/wireless/b43/xmit.c +5
-8@@ -735,13 +735,11 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr) } /* Link quality statistics */ - if ((chanstat & B43_RX_CHAN_PHYTYPE) >= B43_PHYTYPE_N) { - /* - s8 rssi = max(rxhdr->power0, rxhdr->power1); - TODO: Find out what the rssi value is (dBm or percentage?) - and also find out what the maximum possible value is. - Fill status.ssi and status.signal fields. - */ + if ((chanstat & B43_RX_CHAN_PHYTYPE) == B43_PHYTYPE_N) { +// s8 rssi = max(rxhdr->power0, rxhdr->power1); + //TODO: Find out what the rssi value is (dBm or percentage?) + // and also find out what the maximum possible value is. + // Fill status.ssi and status.signal fields. } else { status.signal = b43_rssi_postprocess(dev, rxhdr->jssi, (phystat0 & B43_RX_PHYST0_OFDM), --
Quoted 2 lines
1.7.3.4
Commenting style?
Isn't C99-like commenting not well seen?
- Sedat -
[1] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=Documentation/CodingStyle#l423
[2] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=Documentation/CodingStyle#l444
PATCH 1/2 Revert "b43: trivial: do not report any link quality instead of invalid one"
W dniu 13 pa?dziernika 2011 00:22 u?ytkownik Sedat Dilek <[email protected]> napisa?:
Quoted 33 lines
2011/10/12 Rafa? Mi?ecki <[email protected]>:
Quoted 32 lines
This reverts commit
55ad5962e97430c83d51df36fc18865ee4f78c48.I assumed N is newer than LP, which isn't true. This regressed LP case.
Signed-off-by Rafa? Mi?ecki <[email protected]>---
It seems that wasn't so "trivial", sorry for this regression :|
---
?drivers/net/wireless/b43/xmit.c | ? 12 +++++------- ?1 files changed, 5 insertions(+), 7 deletions(-)drivers/net/wireless/b43/xmit.c +0
-0@@ -735,13 +735,11 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr) ? ? ? ?}? ? ? ?/* Link quality statistics */
- ? ? ? if ((chanstat &B43_RX_CHAN_PHYTYPE) >=B43_PHYTYPE_N) {
- ? ? ? ? ? ? ? /*
- ? ? ? ? ? ? ? s8 rssi =max(rxhdr->power0, rxhdr->power1);
- ? ? ? ? ? ? ? TODO: Find out what the rssi value is (dBm or percentage?)
- ? ? ? ? ? ? ? ? ? ? and also find out what the maximum possible value is.
- ? ? ? ? ? ? ? ? ? ? Fill status.ssi and status.signal fields.
- ? ? ? ? ? ? ? */
+ ? ? ? if ((chanstat &B43_RX_CHAN_PHYTYPE) ==B43_PHYTYPE_N) { +// ? ? ? ? ? ? s8 rssi =max(rxhdr->power0, rxhdr->power1);
+ ? ? ? ? ? ? ? //TODO: Find out what the rssi value is (dBm or percentage?)
+ ? ? ? ? ? ? ? // ? ? ?and also find out what the maximum possible value is.
+ ? ? ? ? ? ? ? // ? ? ?Fill status.ssi and status.signal fields. ? ? ? ?} else {
Quoted 8 lines
Quoted 5 lines
? ? ? ? ? ? ? ?status.signal = b43_rssi_postprocess(dev,
rxhdr->jssi, ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?(phystat0 &B43_RX_PHYST0_OFDM), --
1.7.3.4Commenting style?
Isn't C99-like commenting not well seen?
This is simple revert, the code was like that before my patch.
My 2/2 patch remove that ugly commenting style.
Signature · 1 line
Rafa?