49 #include <dbus/dbus.h> 51 #include <icd/network_api_defines.h> 54 #define NWATTR_WPS_MASK 0x0000F000 55 #define NWATTR_ALGORITHM_MASK 0x00000F00 56 #define NWATTR_WPA2_MASK 0x00000080 57 #define NWATTR_METHOD_MASK 0x00000078 58 #define NWATTR_MODE_MASK 0x00000007 60 #define CAP_LOCALMASK 0x0FFFE008 63 #define CAP_SHIFT_WPS 3 64 #define CAP_SHIFT_ALGORITHM 20 65 #define CAP_SHIFT_WPA2 1 66 #define CAP_SHIFT_METHOD 1 67 #define CAP_SHIFT_MODE 0 68 #define CAP_SHIFT_ALWAYS_ONLINE 26 72 static inline dbus_uint32_t
nwattr2cap(guint nwattrs, dbus_uint32_t *cap)
91 static inline guint
cap2nwattr(dbus_uint32_t cap, guint *nwattrs)
93 guint oldval = *nwattrs;
95 *nwattrs &= ~ICD_NW_ATTR_LOCALMASK;
97 #ifdef WLANCOND_WPS_MASK 100 ((cap & (WLANCOND_ENCRYPT_ALG_MASK |
104 (cap & WLANCOND_MODE_MASK);
#define CAP_SHIFT_ALGORITHM
static guint cap2nwattr(dbus_uint32_t cap, guint *nwattrs)
#define NWATTR_METHOD_MASK
#define NWATTR_ALGORITHM_MASK
#define CAP_SHIFT_ALWAYS_ONLINE
static dbus_uint32_t nwattr2cap(guint nwattrs, dbus_uint32_t *cap)