};
/* flags for options */
-#define DEVICE_FLAGS_UNPLUG 0x00000001UL
+#define DEVICE_FLAGS_UNPLUG BIT(0)
+#define DEVICE_FLAGS_DISCONNECTED BIT(1)
struct vnt_private {
/* mac80211 */
spinlock_t lock;
struct mutex usb_lock;
- u32 flags;
- unsigned long Flags;
+ unsigned long flags;
/* USB */
struct urb *interrupt_urb;
(uVar)++; \
}
-#define fMP_DISCONNECTED 0x00000002
-
-#define MP_SET_FLAG(_M, _F) ((_M)->Flags |= (_F))
-#define MP_CLEAR_FLAG(_M, _F) ((_M)->Flags &= ~(_F))
-#define MP_TEST_FLAGS(_M, _F) (((_M)->Flags & (_F)) == (_F))
+#define MP_SET_FLAG(_M, _F) ((_M)->flags |= (_F))
+#define MP_CLEAR_FLAG(_M, _F) ((_M)->flags &= ~(_F))
+#define MP_TEST_FLAGS(_M, _F) (((_M)->flags & (_F)) == (_F))
int vnt_init(struct vnt_private *priv);
return -ENOMEM;
}
- MP_CLEAR_FLAG(priv, fMP_DISCONNECTED);
+ MP_CLEAR_FLAG(priv, DEVICE_FLAGS_DISCONNECTED);
if (device_init_registers(priv) == false) {
dev_dbg(&priv->usb->dev, " init register fail\n");
ieee80211_stop_queues(hw);
- MP_SET_FLAG(priv, fMP_DISCONNECTED);
+ MP_SET_FLAG(priv, DEVICE_FLAGS_DISCONNECTED);
cancel_delayed_work_sync(&priv->run_command_work);
usb_device_reset(priv);
- MP_CLEAR_FLAG(priv, fMP_DISCONNECTED);
+ MP_CLEAR_FLAG(priv, DEVICE_FLAGS_DISCONNECTED);
vnt_reset_command_timer(priv);
vnt_schedule_command(priv, WLAN_CMD_INIT_MAC80211);
{
int status = 0;
- if (priv->Flags & fMP_DISCONNECTED)
+ if (priv->flags & DEVICE_FLAGS_DISCONNECTED)
return STATUS_FAILURE;
mutex_lock(&priv->usb_lock);
{
int status;
- if (priv->Flags & fMP_DISCONNECTED)
+ if (priv->flags & DEVICE_FLAGS_DISCONNECTED)
return STATUS_FAILURE;
mutex_lock(&priv->usb_lock);
int status;
struct urb *urb;
- if (priv->Flags & fMP_DISCONNECTED) {
+ if (priv->flags & DEVICE_FLAGS_DISCONNECTED) {
context->in_use = false;
return STATUS_RESOURCES;
}
struct vnt_private *priv =
container_of(work, struct vnt_private, run_command_work.work);
- if (priv->Flags & fMP_DISCONNECTED)
+ if (priv->flags & DEVICE_FLAGS_DISCONNECTED)
return;
if (priv->cmd_running != true)