[Prism54-devel] [PATCH] AVS endianess & signal,noise levels

Antonio Eugenio Burriel aeb@ryanstudios.com
Sat, 20 Mar 2004 01:59:22 +0100


--=-Fwj80aHkeOEmX8xIR/aO
Content-Type: multipart/mixed; boundary="=-P72RkmWIvlA08N1CBfXi"


--=-P72RkmWIvlA08N1CBfXi
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hi again, finally I've seen the light :)

Facts:
1. rfmon_header is little-endian
2. avs_80211_1_header is big-endian

now I think this is handled correctly.

Ah, about the signal & noise levels, what do you think about stripping
the sign bit (&0x7f) and keeping the ssi_type set to raw? gpsmap (from
Kismet) assumes lowest_signal=3D+255 and strongest_signal=3D-255.

The raw data _seems_ to be signed integer scaled in dBm so it would make
more sense to extend the sign to 32bit and change the ssi_type to dBm.
However this would kill Kismet (PowerPrinter function) as it only
understands unsigned values. Obviously this can easily be fixed on their
sources.


--=-P72RkmWIvlA08N1CBfXi
Content-Disposition: attachment; filename=prism54-avs-endianess.patch
Content-Type: text/x-patch; name=prism54-avs-endianess.patch; charset=ISO-8859-15
Content-Transfer-Encoding: base64

ZGlmZiAtTmF1ciBwcmlzbTU0LWN2czIwMDQwMzE5L2tzcmMvaXNscGNpX2V0aC5jIHByaXNtNTQt
Y3ZzMjAwNDAzMTktbGUva3NyYy9pc2xwY2lfZXRoLmMNCi0tLSBwcmlzbTU0LWN2czIwMDQwMzE5
L2tzcmMvaXNscGNpX2V0aC5jCTIwMDQtMDMtMjAgMDA6MDM6NTguMDAwMDAwMDAwICswMTAwDQor
KysgcHJpc201NC1jdnMyMDA0MDMxOS1sZS9rc3JjL2lzbHBjaV9ldGguYwkyMDA0LTAzLTIwIDAx
OjEzOjA4LjAwMDAwMDAwMCArMDEwMA0KQEAgLTI2MSw5ICsyNjEsOSBAQA0KIAlpZiAocHJpdi0+
bmRldi0+dHlwZSA9PSBBUlBIUkRfSUVFRTgwMjExX1BSSVNNKSB7DQogCQlzdHJ1Y3QgYXZzXzgw
MjExXzFfaGVh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JlMzIoMik7CS8qMjogZEJtLCAzOiByYXcgUlNTSSAq
Lw0KKwkJYXZzLT5zc2lfc2lnbmFsID0gY3B1X3RvX2JlMzIocnNzaSk7DQorCQlhdnMtPnNzaV9u
b2lzZSA9IGNwdV90b19iZTMyKHByaXYtPmxvY2FsX2l3c3RhdGlzdGljcy5xdWFsLm5vaXNlKTsJ
LypiZXR0ZXIgdGhhbiAndW5kZWZpbmVkJywgSSBhc3N1bWUgKi8NCisJCWF2cy0+cHJlYW1ibGUg
PSBjcHVfdG9fYmUzMigwKTsJLyp1bmtub3duICovDQorCQlhdnMtPmVuY29kaW5nID0gY3B1X3Rv
X2JlMzIoMCk7CS8qdW5rbm93biAqLw0KIAl9IGVsc2UNCiAJCXNrYl9wdWxsKCpza2IsIHNpemVv
ZiAoc3RydWN0IHJmbW9uX2hlYWRlcikpOw0KIA0K

--=-P72RkmWIvlA08N1CBfXi--

--=-Fwj80aHkeOEmX8xIR/aO
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada
	digitalmente

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQBAW5dpDwClThbmH4sRAjaoAJ0dUu3gro4PsgwPcWH2em8/lXXwEQCdGfDu
NXxRA1D6rq4h5hzxSMZeb6o=
=XqbD
-----END PGP SIGNATURE-----

--=-Fwj80aHkeOEmX8xIR/aO--