Print this page
10886 smatch debug macro cleanup in usr/src/uts
   1 /*
   2  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
   3  * Use is subject to license terms.
   4  */
   5 
   6 /*




   7  * Copyright (c) 2006 Sam Leffler, Errno Consulting
   8  * Copyright (c) 2008-2009 Weongyo Jeong <weongyo@freebsd.org>
   9  * All rights reserved.
  10  *
  11  * Redistribution and use in source and binary forms, with or without
  12  * modification, are permitted provided that the following conditions
  13  * are met:
  14  * 1. Redistributions of source code must retain the above copyright
  15  *    notice, this list of conditions and the following disclaimer,
  16  *    without modification.
  17  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  18  *    similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
  19  *    redistribution must be conditioned upon including a substantially
  20  *    similar Disclaimer requirement for further binary redistribution.
  21  *
  22  * NO WARRANTY
  23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  24  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  25  * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
  26  * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL


  77 
  78 /*
  79  * Bit flags in the ral_dbg_flags
  80  */
  81 #define UATH_DBG_MSG            0x000001
  82 #define UATH_DBG_ERR            0x000002
  83 #define UATH_DBG_USB            0x000004
  84 #define UATH_DBG_TX             0x000008
  85 #define UATH_DBG_RX             0x000010
  86 #define UATH_DBG_FW             0x000020
  87 #define UATH_DBG_TX_CMD         0x000040
  88 #define UATH_DBG_RX_CMD         0x000080
  89 #define UATH_DBG_ALL            0x000fff
  90 
  91 uint32_t uath_dbg_flags = 0;
  92 
  93 #ifdef DEBUG
  94 #define UATH_DEBUG \
  95         uath_debug
  96 #else
  97 #define UATH_DEBUG
  98 #endif
  99 
 100 /*
 101  * Various supported device vendors/products.
 102  * UB51: AR5005UG 802.11b/g, UB52: AR5005UX 802.11b/g
 103  */
 104 #define UATH_FLAG_PRE_FIRMWARE  (1 << 0)
 105 #define UATH_FLAG_ABG           (1 << 1)
 106 #define UATH_FLAG_ERR           (1 << 2)
 107 #define UATH_DEV(v, p, f)                                               \
 108         { { USB_VENDOR_##v, USB_PRODUCT_##v##_##p }, (f) },             \
 109         { { USB_VENDOR_##v, USB_PRODUCT_##v##_##p##_NF },               \
 110             (f) | UATH_FLAG_PRE_FIRMWARE }
 111 #define UATH_DEV_UG(v, p)       UATH_DEV(v, p, 0)
 112 #define UATH_DEV_UX(v, p)       UATH_DEV(v, p, UATH_FLAG_ABG)
 113 
 114 struct uath_devno {
 115         uint16_t vendor_id;
 116         uint16_t product_id;
 117 };


   1 /*
   2  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
   3  * Use is subject to license terms.
   4  */
   5 
   6 /*
   7  * Copyright 2019 Joyent, Inc.
   8  */
   9 
  10 /*
  11  * Copyright (c) 2006 Sam Leffler, Errno Consulting
  12  * Copyright (c) 2008-2009 Weongyo Jeong <weongyo@freebsd.org>
  13  * All rights reserved.
  14  *
  15  * Redistribution and use in source and binary forms, with or without
  16  * modification, are permitted provided that the following conditions
  17  * are met:
  18  * 1. Redistributions of source code must retain the above copyright
  19  *    notice, this list of conditions and the following disclaimer,
  20  *    without modification.
  21  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  22  *    similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any
  23  *    redistribution must be conditioned upon including a substantially
  24  *    similar Disclaimer requirement for further binary redistribution.
  25  *
  26  * NO WARRANTY
  27  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  28  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  29  * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY
  30  * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL


  81 
  82 /*
  83  * Bit flags in the ral_dbg_flags
  84  */
  85 #define UATH_DBG_MSG            0x000001
  86 #define UATH_DBG_ERR            0x000002
  87 #define UATH_DBG_USB            0x000004
  88 #define UATH_DBG_TX             0x000008
  89 #define UATH_DBG_RX             0x000010
  90 #define UATH_DBG_FW             0x000020
  91 #define UATH_DBG_TX_CMD         0x000040
  92 #define UATH_DBG_RX_CMD         0x000080
  93 #define UATH_DBG_ALL            0x000fff
  94 
  95 uint32_t uath_dbg_flags = 0;
  96 
  97 #ifdef DEBUG
  98 #define UATH_DEBUG \
  99         uath_debug
 100 #else
 101 #define UATH_DEBUG(...) (void)(0)
 102 #endif
 103 
 104 /*
 105  * Various supported device vendors/products.
 106  * UB51: AR5005UG 802.11b/g, UB52: AR5005UX 802.11b/g
 107  */
 108 #define UATH_FLAG_PRE_FIRMWARE  (1 << 0)
 109 #define UATH_FLAG_ABG           (1 << 1)
 110 #define UATH_FLAG_ERR           (1 << 2)
 111 #define UATH_DEV(v, p, f)                                               \
 112         { { USB_VENDOR_##v, USB_PRODUCT_##v##_##p }, (f) },             \
 113         { { USB_VENDOR_##v, USB_PRODUCT_##v##_##p##_NF },               \
 114             (f) | UATH_FLAG_PRE_FIRMWARE }
 115 #define UATH_DEV_UG(v, p)       UATH_DEV(v, p, 0)
 116 #define UATH_DEV_UX(v, p)       UATH_DEV(v, p, UATH_FLAG_ABG)
 117 
 118 struct uath_devno {
 119         uint16_t vendor_id;
 120         uint16_t product_id;
 121 };