Linux 3.11-rc1
[linux.git] / drivers / staging / csr / csr_wifi_hip_unifi_signal_names.c
1 /*****************************************************************************
2
3             (c) Cambridge Silicon Radio Limited 2011
4             All rights reserved and confidential information of CSR
5
6             Refer to LICENSE.txt included with this source for details
7             on the license terms.
8
9 *****************************************************************************/
10
11 #include "csr_wifi_hip_unifi.h"
12
13 struct sig_name {
14         s16 id;
15         const char *name;
16 };
17
18 static const struct sig_name Unifi_bulkcmd_names[] = {
19         { 0, "SignalCmd" },
20         { 1, "CopyToHost" },
21         { 2, "CopyToHostAck" },
22         { 3, "CopyFromHost" },
23         { 4, "CopyFromHostAck" },
24         { 5, "ClearSlot" },
25         { 6, "CopyOverlay" },
26         { 7, "CopyOverlayAck" },
27         { 8, "CopyFromHostAndClearSlot" },
28         { 15, "Padding" }
29 };
30
31 const char *lookup_bulkcmd_name(u16 id)
32 {
33         if (id < 9)
34                 return Unifi_bulkcmd_names[id].name;
35         if (id == 15)
36                 return "Padding";
37
38         return "UNKNOWN";
39 }
40
41