wireless: 60g protocol constants
[carl9170fw.git] / tools / carlu / src / rx.c
index 4a8f24e8cad7b4128efffea963365d3f44042354..2a77334615b0a7da3c426c51a91367dc897573b0 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * carl9170user - userspace testing utility for ar9170 devices
+ * carlu - userspace testing utility for ar9170 devices
  *
  * RX data processing
  *
- * Copyright 2009, 2010 Christian Lamparter <chunkeey@googlemail.com>
+ * Copyright 2009-2011 Christian Lamparter <chunkeey@googlemail.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -57,7 +57,9 @@ void carlu_handle_command(struct carlu *ar, void *buf,
 
        cmd = (void *) buf;
 
-       if ((cmd->hdr.cmd & 0xc0) != 0xc0) {
+       if ((cmd->hdr.cmd & CARL9170_RSP_FLAG) != CARL9170_RSP_FLAG) {
+               if ((cmd->hdr.cmd & CARL9170_CMD_ASYNC_FLAG))
+                       return;
 
                SDL_mutexP(ar->resp_lock);
                if (ar->resp_buf && ar->resp_len && ar->resp_len >= (len - 4)) {