diff options
| author | Michael Brown | 2010-05-30 16:29:05 +0200 |
|---|---|---|
| committer | Michael Brown | 2010-05-31 04:11:57 +0200 |
| commit | 6c0e8c14be9546b49c097f5e6e8307bda3e7f5ac (patch) | |
| tree | b04dd064c978bf0525649e9d1b936a9724deadaf /src/net/80211/sec80211.c | |
| parent | [pxe] Remove obsolete pxe_errortab.c (diff) | |
| download | ipxe-6c0e8c14be9546b49c097f5e6e8307bda3e7f5ac.tar.gz ipxe-6c0e8c14be9546b49c097f5e6e8307bda3e7f5ac.tar.xz ipxe-6c0e8c14be9546b49c097f5e6e8307bda3e7f5ac.zip | |
[libc] Enable automated extraction of error usage reports
Add preprocessor magic to the error definitions to enable every error
usage to be tracked.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/80211/sec80211.c')
| -rw-r--r-- | src/net/80211/sec80211.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/net/80211/sec80211.c b/src/net/80211/sec80211.c index 69fad8ffc..ea4b0d006 100644 --- a/src/net/80211/sec80211.c +++ b/src/net/80211/sec80211.c @@ -34,6 +34,20 @@ FILE_LICENCE ( GPL2_OR_LATER ); * static data in this file. */ +/* Unsupported cryptosystem error numbers */ +#define ENOTSUP_WEP __einfo_error ( EINFO_ENOTSUP_WEP ) +#define EINFO_ENOTSUP_WEP __einfo_uniqify ( EINFO_ENOTSUP, \ + ( 0x10 | NET80211_CRYPT_WEP ), "WEP not supported" ) +#define ENOTSUP_TKIP __einfo_error ( EINFO_ENOTSUP_TKIP ) +#define EINFO_ENOTSUP_TKIP __einfo_uniqify ( EINFO_ENOTSUP, \ + ( 0x10 | NET80211_CRYPT_TKIP ), "TKIP not supported" ) +#define ENOTSUP_CCMP __einfo_error ( EINFO_ENOTSUP_CCMP ) +#define EINFO_ENOTSUP_CCMP __einfo_uniqify ( EINFO_ENOTSUP, \ + ( 0x10 | NET80211_CRYPT_CCMP ), "CCMP not supported" ) +#define ENOTSUP_CRYPT( crypt ) \ + EUNIQ ( ENOTSUP, ( 0x10 | (crypt) ), \ + ENOTSUP_WEP, ENOTSUP_TKIP, ENOTSUP_CCMP ) + /** Mapping from net80211 crypto/secprot types to RSN OUI descriptors */ struct descriptor_map { /** Value of net80211_crypto_alg or net80211_security_proto */ @@ -130,7 +144,7 @@ int sec80211_install ( struct net80211_crypto **which, if ( ! crypto ) { DBG ( "802.11-Sec no support for cryptosystem %d\n", crypt ); - return -( ENOTSUP | EUNIQ_10 | ( crypt << 8 ) ); + return -ENOTSUP_CRYPT ( crypt ); } *which = crypto; |
