diff options
author | 2013-05-01 01:56:29 +0000 | |
---|---|---|
committer | 2013-05-01 01:56:29 +0000 | |
commit | 4fab0ec3564bdc5e41e41cee9be903124c26d53c (patch) | |
tree | 8f000b7bdc6ea3dc11e915e0464fa383f44d404d | |
parent | provide a couple of %b things for mfi_hw_present and mfi_adapter_ops cos (diff) | |
download | wireguard-openbsd-4fab0ec3564bdc5e41e41cee9be903124c26d53c.tar.xz wireguard-openbsd-4fab0ec3564bdc5e41e41cee9be903124c26d53c.zip |
there's some extra bits for the bbu status that freebsd dont have. provide
a %b thing for them too.
now i just have to figure out how to represent this nicely:
mfi0: fw_status 0xc00<REPLACE_PACK,CAPACITY_LOW>
:(
-rw-r--r-- | sys/dev/ic/mfireg.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/sys/dev/ic/mfireg.h b/sys/dev/ic/mfireg.h index 5ba908940ea..865ddb63379 100644 --- a/sys/dev/ic/mfireg.h +++ b/sys/dev/ic/mfireg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mfireg.h,v 1.37 2013/05/01 01:15:45 dlg Exp $ */ +/* $OpenBSD: mfireg.h,v 1.38 2013/05/01 01:56:29 dlg Exp $ */ /* * Copyright (c) 2006 Marco Peereboom <marco@peereboom.us> * @@ -1074,6 +1074,24 @@ struct mfi_bbu_status { #define MFI_BBU_STATE_LEARN_CYC_FAIL (1 << 7) #define MFI_BBU_STATE_LEARN_CYC_TIMEOUT (1 << 8) #define MFI_BBU_STATE_I2C_ERR_DETECT (1 << 9) +#define MFI_BBU_STATE_REPLACE_PACK (1 << 10) +#define MFI_BBU_STATE_CAPACITY_LOW (1 << 11) +#define MFI_BBU_STATE_LEARN_REQUIRED (1 << 12) +#define MFI_BBU_STATE_FMT "\020" \ + "\001PACK_MISSING" \ + "\002VOLTAGE_LOW" \ + "\003TEMP_HIGH" \ + "\004CHARGE_ACTIVE" \ + "\005DISCHARGE_ACTIVE" \ + "\006LEARN_CYC_REQ" \ + "\007LEARN_CYC_ACTIVE" \ + "\010LEARN_CYC_FAIL" \ + "\011LEARN_CYC_TIMEOUT" \ + "\012I2C_ERR_DETECT" \ + "\013REPLACE_PACK" \ + "\014CAPACITY_LOW" \ + "\015LEARN_REQUIRED" + uint8_t pad[20]; union mfi_bbu_status_detail detail; } __packed; |