aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-19 20:52:51 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-19 20:52:51 -0400
commitdb03f1d2cb5f99dd8bd33d68c28f67b43c67545a (patch)
treeb7de07d2ebb0eae9c15afe8a3419be4207679d7c
parentbd2b57ab75be545f141f3ec5ed5cadeaff898ada (diff)
staging: csr: remove oska submodule
Turns out nothing in this module was being used at all, so instead of deleting it piece by piece, just remove the whole thing. I don't know why it was added in the first place. Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com> Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com> Cc: Riku Mettälä <riku.mettala@bluegiga.com> Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/csr/Makefile2
-rw-r--r--drivers/staging/csr/oska/Makefile7
-rw-r--r--drivers/staging/csr/oska/alloc.h41
-rw-r--r--drivers/staging/csr/oska/event.c82
-rw-r--r--drivers/staging/csr/oska/event.h33
-rw-r--r--drivers/staging/csr/oska/mutex.h42
-rw-r--r--drivers/staging/csr/oska/oska_module.c13
-rw-r--r--drivers/staging/csr/oska/semaphore.h70
-rw-r--r--drivers/staging/csr/oska/spinlock.h43
-rw-r--r--drivers/staging/csr/oska/thread.c66
-rw-r--r--drivers/staging/csr/oska/thread.h39
-rw-r--r--drivers/staging/csr/oska/trace.h23
-rw-r--r--drivers/staging/csr/oska/util.h48
13 files changed, 0 insertions, 509 deletions
diff --git a/drivers/staging/csr/Makefile b/drivers/staging/csr/Makefile
index e0e7baba87b0..1c1685be90e4 100644
--- a/drivers/staging/csr/Makefile
+++ b/drivers/staging/csr/Makefile
@@ -1,5 +1,3 @@
1obj-$(CONFIG_CSR_WIFI) += oska/
2
3ccflags-y := -DCSR_SME_USERSPACE -DCSR_SUPPORT_SME -DREMOTE_SYS_SAP -DCSR_WIFI_SECURITY_WAPI_ENABLE -DENABLE_SHUTDOWN -DUNIFI_DEBUG 1ccflags-y := -DCSR_SME_USERSPACE -DCSR_SUPPORT_SME -DREMOTE_SYS_SAP -DCSR_WIFI_SECURITY_WAPI_ENABLE -DENABLE_SHUTDOWN -DUNIFI_DEBUG
4ccflags-y += -DSDIO_EXPORTS_STRUCT_DEVICE -DCSR_WIFI_SUPPORT_MMC_DRIVER -DCSR_WIFI_SINGLE_FUNCTION -DCSR_WIFI_SPLIT_PATCH 2ccflags-y += -DSDIO_EXPORTS_STRUCT_DEVICE -DCSR_WIFI_SUPPORT_MMC_DRIVER -DCSR_WIFI_SINGLE_FUNCTION -DCSR_WIFI_SPLIT_PATCH
5ccflags-y += -DCSR_SUPPORT_WEXT -DREMOTE_SYS_SAP -DREMOTE_MGT_SAP -DCSR_WIFI_SECURITY_WAPI_ENABLE -DCSR_WIFI_SECURITY_WAPI_QOSCTRL_MIC_WORKAROUND -DENABLE_SHUTDOWN -DCSR_WIFI_NME_ENABLE -DCSR_WIFI_AP_ENABLE -DCSR_SUPPORT_WEXT_AP -DCSR_WIFI_REQUEUE_PACKET_TO_HAL 3ccflags-y += -DCSR_SUPPORT_WEXT -DREMOTE_SYS_SAP -DREMOTE_MGT_SAP -DCSR_WIFI_SECURITY_WAPI_ENABLE -DCSR_WIFI_SECURITY_WAPI_QOSCTRL_MIC_WORKAROUND -DENABLE_SHUTDOWN -DCSR_WIFI_NME_ENABLE -DCSR_WIFI_AP_ENABLE -DCSR_SUPPORT_WEXT_AP -DCSR_WIFI_REQUEUE_PACKET_TO_HAL
diff --git a/drivers/staging/csr/oska/Makefile b/drivers/staging/csr/oska/Makefile
deleted file mode 100644
index 02b8ef54da86..000000000000
--- a/drivers/staging/csr/oska/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
1obj-$(CONFIG_CSR_WIFI) := csr_oska.o
2
3csr_oska-y := \
4 event.o \
5 oska_module.o \
6 thread.o
7
diff --git a/drivers/staging/csr/oska/alloc.h b/drivers/staging/csr/oska/alloc.h
deleted file mode 100644
index 0f106016e1f7..000000000000
--- a/drivers/staging/csr/oska/alloc.h
+++ /dev/null
@@ -1,41 +0,0 @@
1/*
2 * OSKA Linux implementation -- memory allocation
3 *
4 * Copyright (C) 2007 Cambridge Silicon Radio Ltd.
5 *
6 * Refer to LICENSE.txt included with this source code for details on
7 * the license terms.
8 */
9#ifndef __OSKA_LINUX_ALLOC_H
10#define __OSKA_LINUX_ALLOC_H
11
12#include <linux/kernel.h>
13#include <linux/slab.h>
14#include <linux/vmalloc.h>
15
16static inline void *os_alloc(size_t size)
17{
18 return kzalloc(size, GFP_ATOMIC);
19}
20
21static inline void *os_alloc_nonzeroed(size_t size)
22{
23 return kmalloc(size, GFP_KERNEL);
24}
25
26static inline void os_free(void *ptr)
27{
28 kfree(ptr);
29}
30
31static inline void *os_alloc_big(size_t size)
32{
33 return vmalloc(size);
34}
35
36static inline void os_free_big(void *ptr)
37{
38 vfree(ptr);
39}
40
41#endif /* #ifndef __OSKA_LINUX_ALLOC_H */
diff --git a/drivers/staging/csr/oska/event.c b/drivers/staging/csr/oska/event.c
deleted file mode 100644
index 4aedaaa0d9e4..000000000000
--- a/drivers/staging/csr/oska/event.c
+++ /dev/null
@@ -1,82 +0,0 @@
1/*
2 * Linux event functions.
3 *
4 * Copyright (C) 2009 Cambridge Silicon Radio Ltd.
5 *
6 * Refer to LICENSE.txt included with this source code for details on
7 * the license terms.
8 */
9#include <linux/module.h>
10#include <linux/sched.h>
11
12#include "event.h"
13
14void os_event_init(os_event_t *evt)
15{
16 init_waitqueue_head(&evt->wq);
17 spin_lock_init(&evt->lock);
18 evt->events = 0;
19}
20EXPORT_SYMBOL(os_event_init);
21
22uint16_t os_event_wait(os_event_t *evt)
23{
24 uint16_t e;
25 unsigned long flags;
26
27 wait_event(evt->wq, evt->events != 0);
28
29 spin_lock_irqsave(&evt->lock, flags);
30 e = evt->events;
31 evt->events &= ~e;
32 spin_unlock_irqrestore(&evt->lock, flags);
33
34 return e;
35}
36EXPORT_SYMBOL(os_event_wait);
37
38uint16_t os_event_wait_interruptible(os_event_t *evt)
39{
40 uint16_t e;
41 unsigned long flags;
42
43 wait_event_interruptible(evt->wq, evt->events != 0);
44
45 spin_lock_irqsave(&evt->lock, flags);
46 e = evt->events;
47 evt->events &= ~e;
48 spin_unlock_irqrestore(&evt->lock, flags);
49
50 return e;
51}
52EXPORT_SYMBOL(os_event_wait_interruptible);
53
54uint16_t os_event_wait_timed(os_event_t *evt, unsigned timeout_ms)
55{
56 uint16_t e;
57 unsigned long flags;
58
59 wait_event_interruptible_timeout(evt->wq,
60 evt->events != 0,
61 msecs_to_jiffies(timeout_ms));
62
63 spin_lock_irqsave(&evt->lock, flags);
64 e = evt->events;
65 evt->events &= ~e;
66 spin_unlock_irqrestore(&evt->lock, flags);
67
68 return e;
69}
70EXPORT_SYMBOL(os_event_wait_timed);
71
72void os_event_raise(os_event_t *evt, uint16_t events)
73{
74 unsigned long flags;
75
76 spin_lock_irqsave(&evt->lock, flags);
77 evt->events |= events;
78 spin_unlock_irqrestore(&evt->lock, flags);
79
80 wake_up(&evt->wq);
81}
82EXPORT_SYMBOL(os_event_raise);
diff --git a/drivers/staging/csr/oska/event.h b/drivers/staging/csr/oska/event.h
deleted file mode 100644
index be52e42c37dc..000000000000
--- a/drivers/staging/csr/oska/event.h
+++ /dev/null
@@ -1,33 +0,0 @@
1/*
2 * OSKA Linux implementation -- events
3 *
4 * Copyright (C) 2009 Cambridge Silicon Radio Ltd.
5 *
6 * Refer to LICENSE.txt included with this source code for details on
7 * the license terms.
8 */
9#ifndef __OSKA_LINUX_EVENT_H
10#define __OSKA_LINUX_EVENT_H
11
12#include <linux/kernel.h>
13#include <linux/wait.h>
14#include <linux/spinlock.h>
15
16typedef struct {
17 wait_queue_head_t wq;
18 spinlock_t lock;
19 uint16_t events;
20} os_event_t;
21
22void os_event_init(os_event_t *evt);
23
24static inline void os_event_destroy(os_event_t *evt)
25{
26}
27
28uint16_t os_event_wait(os_event_t *evt);
29uint16_t os_event_wait_interruptible(os_event_t *evt);
30uint16_t os_event_wait_timed(os_event_t *evt, unsigned timeout_ms);
31void os_event_raise(os_event_t *evt, uint16_t events);
32
33#endif /* #ifndef __OSKA_LINUX_EVENT_H */
diff --git a/drivers/staging/csr/oska/mutex.h b/drivers/staging/csr/oska/mutex.h
deleted file mode 100644
index e7d46fe9af02..000000000000
--- a/drivers/staging/csr/oska/mutex.h
+++ /dev/null
@@ -1,42 +0,0 @@
1/*
2 * OSKA Linux implementation -- mutexes
3 *
4 * Copyright (C) 2007 Cambridge Silicon Radio Ltd.
5 *
6 * Refer to LICENSE.txt included with this source code for details on
7 * the license terms.
8 */
9#ifndef __OSKA_LINUX_MUTEX_H
10#define __OSKA_LINUX_MUTEX_H
11
12#include <linux/kernel.h>
13#include <linux/mutex.h>
14#include <linux/semaphore.h>
15
16
17/* Real mutexes were only added to 2.6.16 so use semaphores
18 instead. */
19typedef struct semaphore os_mutex_t;
20
21static inline void os_mutex_init(os_mutex_t *mutex)
22{
23 //init_MUTEX(mutex);
24 sema_init(mutex, 1);
25}
26
27static inline void os_mutex_destroy(os_mutex_t *mutex)
28{
29 /* no op */
30}
31
32static inline void os_mutex_lock(os_mutex_t *mutex)
33{
34 down(mutex);
35}
36
37static inline void os_mutex_unlock(os_mutex_t *mutex)
38{
39 up(mutex);
40}
41
42#endif /* __OSKA_LINUX_MUTEX_H */
diff --git a/drivers/staging/csr/oska/oska_module.c b/drivers/staging/csr/oska/oska_module.c
deleted file mode 100644
index 2876ec2ade6b..000000000000
--- a/drivers/staging/csr/oska/oska_module.c
+++ /dev/null
@@ -1,13 +0,0 @@
1/*
2 * Linux kernel module support.
3 *
4 * Copyright (C) 2010 Cambridge Silicon Radio Ltd.
5 *
6 * Refer to LICENSE.txt included with this source code for details on
7 * the license terms.
8 */
9#include <linux/module.h>
10
11MODULE_DESCRIPTION("Operating System Kernel Abstraction");
12MODULE_AUTHOR("Cambridge Silicon Radio Ltd.");
13MODULE_LICENSE("GPL and additional rights");
diff --git a/drivers/staging/csr/oska/semaphore.h b/drivers/staging/csr/oska/semaphore.h
deleted file mode 100644
index 965bfe8f52cf..000000000000
--- a/drivers/staging/csr/oska/semaphore.h
+++ /dev/null
@@ -1,70 +0,0 @@
1/*
2 * OSKA Linux implementation -- semaphores
3 *
4 * Copyright (C) 2007 Cambridge Silicon Radio Ltd.
5 *
6 * Refer to LICENSE.txt included with this source code for details on
7 * the license terms.
8 */
9#ifndef __OSKA_LINUX_SEMAPHORE_H
10#define __OSKA_LINUX_SEMAPHORE_H
11
12#include <linux/kernel.h>
13
14#include <linux/kernel-compat.h>
15
16typedef struct semaphore os_semaphore_t;
17
18static inline void os_semaphore_init(os_semaphore_t *sem)
19{
20 sema_init(sem, 0);
21}
22
23static inline void os_semaphore_destroy(os_semaphore_t *sem)
24{
25}
26
27static inline void os_semaphore_wait(os_semaphore_t *sem)
28{
29 down(sem);
30}
31
32/*
33 * down_timeout() was added in 2.6.26 with the generic semaphore
34 * implementation. For now, only support it on recent kernels as
35 * semaphores may be replaced by an event API that would be
36 * implemented with wait_event(), and wait_event_timeout().
37 */
38#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
39
40static inline int os_semaphore_wait_timed(os_semaphore_t *sem,
41 int time_ms)
42{
43 if (down_timeout(sem, msecs_to_jiffies(time_ms)) < 0) {
44 return -ETIMEDOUT;
45 }
46 return 0;
47}
48
49#else
50
51static inline int os_semaphore_wait_timed(os_semaphore_t *sem, int time_ms)
52{
53 unsigned long now = jiffies;
54 do{
55 if(!down_trylock(sem))
56 return 0;
57 msleep(1);
58 } while(time_before(jiffies, now + msecs_to_jiffies(time_ms)));
59
60 return -ETIMEDOUT;
61}
62
63#endif
64
65static inline void os_semaphore_post(os_semaphore_t *sem)
66{
67 up(sem);
68}
69
70#endif /* __OSKA_LINUX_SEMAPHORE_H */
diff --git a/drivers/staging/csr/oska/spinlock.h b/drivers/staging/csr/oska/spinlock.h
deleted file mode 100644
index 157b350107ae..000000000000
--- a/drivers/staging/csr/oska/spinlock.h
+++ /dev/null
@@ -1,43 +0,0 @@
1/*
2 * OSKA Linux implementation -- spinlocks
3 *
4 * Copyright (C) 2007 Cambridge Silicon Radio Ltd.
5 *
6 * Refer to LICENSE.txt included with this source code for details on
7 * the license terms.
8 */
9#ifndef __OSKA_LINUX_SPINLOCK_H
10#define __OSKA_LINUX_SPINLOCK_H
11
12#include <linux/kernel.h>
13#include <linux/spinlock.h>
14
15typedef spinlock_t os_spinlock_t;
16typedef unsigned long os_int_status_t;
17
18static inline void os_spinlock_init(os_spinlock_t *lock)
19{
20 spinlock_t *l = (spinlock_t *)lock;
21 spin_lock_init(l);
22}
23
24static inline void os_spinlock_destroy(os_spinlock_t *lock)
25{
26 /* no op */
27}
28
29static inline void os_spinlock_lock_intsave(os_spinlock_t *lock,
30 os_int_status_t *int_state)
31{
32 spinlock_t *l = (spinlock_t *)lock;
33 spin_lock_irqsave(l, *int_state);
34}
35
36static inline void os_spinlock_unlock_intrestore(os_spinlock_t *lock,
37 os_int_status_t *int_state)
38{
39 spinlock_t *l = (spinlock_t *)lock;
40 spin_unlock_irqrestore(l, *int_state);
41}
42
43#endif /* #ifndef __OSKA_LINUX_SPINLOCK_H */
diff --git a/drivers/staging/csr/oska/thread.c b/drivers/staging/csr/oska/thread.c
deleted file mode 100644
index f680cef709e7..000000000000
--- a/drivers/staging/csr/oska/thread.c
+++ /dev/null
@@ -1,66 +0,0 @@
1/*
2 * Linux thread functions.
3 *
4 * Copyright (C) 2007 Cambridge Silicon Radio Ltd.
5 *
6 * Refer to LICENSE.txt included with this source code for details on
7 * the license terms.
8 */
9#include <linux/module.h>
10
11#include "thread.h"
12
13static int thread_func(void *data)
14{
15 os_thread_t *thread = data;
16
17 thread->func(thread->arg);
18
19 /*
20 * kthread_stop() cannot handle the thread exiting while
21 * kthread_should_stop() is false, so sleep until kthread_stop()
22 * wakes us up.
23 */
24 set_current_state(TASK_INTERRUPTIBLE);
25 if (!kthread_should_stop())
26 schedule();
27
28 return 0;
29}
30
31int os_thread_create(os_thread_t *thread, const char *name, void (*func)(void *), void *arg)
32{
33 thread->func = func;
34 thread->arg = arg;
35
36 thread->stop = 0;
37
38 thread->task = kthread_run(thread_func, thread, name);
39 if (IS_ERR(thread->task)) {
40 return PTR_ERR(thread->task);
41 }
42 return 0;
43}
44EXPORT_SYMBOL(os_thread_create);
45
46void os_thread_stop(os_thread_t *thread, os_event_t *evt)
47{
48 /*
49 * Stop flag must be set before the event is raised so
50 * kthread_should_stop() cannot be used.
51 */
52 thread->stop = 1;
53
54 if (evt) {
55 os_event_raise(evt, ~0);
56 }
57
58 kthread_stop(thread->task);
59}
60EXPORT_SYMBOL(os_thread_stop);
61
62int os_thread_should_stop(os_thread_t *thread)
63{
64 return thread->stop;
65}
66EXPORT_SYMBOL(os_thread_should_stop);
diff --git a/drivers/staging/csr/oska/thread.h b/drivers/staging/csr/oska/thread.h
deleted file mode 100644
index 8816dc853e26..000000000000
--- a/drivers/staging/csr/oska/thread.h
+++ /dev/null
@@ -1,39 +0,0 @@
1/*
2 * OSKA Linux implementation -- threading
3 *
4 * Copyright (C) 2007 Cambridge Silicon Radio Ltd.
5 *
6 * Refer to LICENSE.txt included with this source code for details on
7 * the license terms.
8 */
9#ifndef __OSKA_LINUX_THREAD_H
10#define __OSKA_LINUX_THREAD_H
11
12#include <linux/version.h>
13#include <linux/kernel.h>
14#include <linux/kthread.h>
15#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,19)
16#include <linux/freezer.h>
17#endif
18#include "event.h"
19
20struct os_thread_lx {
21 void (*func)(void *);
22 void *arg;
23 struct task_struct *task;
24 int stop;
25};
26
27typedef struct os_thread_lx os_thread_t;
28
29int os_thread_create(os_thread_t *thread, const char *name,
30 void (*func)(void *), void *arg);
31void os_thread_stop(os_thread_t *thread, os_event_t *evt);
32int os_thread_should_stop(os_thread_t *thread);
33
34static inline void os_try_suspend_thread(os_thread_t *thread)
35{
36 try_to_freeze();
37}
38
39#endif /* __OSKA_LINUX_THREAD_H */
diff --git a/drivers/staging/csr/oska/trace.h b/drivers/staging/csr/oska/trace.h
deleted file mode 100644
index b28f37da4fbb..000000000000
--- a/drivers/staging/csr/oska/trace.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * OSKA Linux implementation -- tracing messages.
3 *
4 * Copyright (C) 2009 Cambridge Silicon Radio Ltd.
5 *
6 * Refer to LICENSE.txt included with this source code for details on
7 * the license terms.
8 */
9#ifndef __OSKA_LINUX_TRACE_H
10#define __OSKA_LINUX_TRACE_H
11
12#include <linux/kernel.h>
13
14#ifndef OS_TRACE_PREFIX
15# define OS_TRACE_PREFIX ""
16#endif
17
18#define os_trace_err(format, ...) printk(KERN_ERR OS_TRACE_PREFIX format "\n", ## __VA_ARGS__)
19#define os_trace_warn(format, ...) printk(KERN_WARNING OS_TRACE_PREFIX format "\n", ## __VA_ARGS__)
20#define os_trace_info(format, ...) printk(KERN_INFO OS_TRACE_PREFIX format "\n", ## __VA_ARGS__)
21#define os_trace_dbg(format, ...) printk(KERN_DEBUG OS_TRACE_PREFIX format "\n", ## __VA_ARGS__)
22
23#endif /* #ifndef __OSKA_LINUX_TRACE_H */
diff --git a/drivers/staging/csr/oska/util.h b/drivers/staging/csr/oska/util.h
deleted file mode 100644
index bf29e2d906ed..000000000000
--- a/drivers/staging/csr/oska/util.h
+++ /dev/null
@@ -1,48 +0,0 @@
1/*
2 * OSKA Linux implementation -- misc. utility functions
3 *
4 * Copyright (C) 2007 Cambridge Silicon Radio Ltd.
5 *
6 * Refer to LICENSE.txt included with this source code for details on
7 * the license terms.
8 */
9#ifndef __OSKA_LINUX_UTILS_H
10#define __OSKA_LINUX_UTILS_H
11
12#include <linux/kernel.h>
13#include <linux/bug.h>
14#include <asm/byteorder.h>
15
16#define OS_ASSERT(expr) BUG_ON(!(expr))
17
18static inline uint16_t os_le16_to_cpu(uint16_t x)
19{
20 return le16_to_cpu(x);
21}
22
23static inline uint16_t os_cpu_to_le16(uint16_t x)
24{
25 return cpu_to_le16(x);
26}
27
28static inline uint32_t os_le32_to_cpu(uint32_t x)
29{
30 return le32_to_cpu(x);
31}
32
33static inline uint32_t os_cpu_to_le32(uint32_t x)
34{
35 return cpu_to_le32(x);
36}
37
38static inline uint64_t os_le64_to_cpu(uint64_t x)
39{
40 return le64_to_cpu(x);
41}
42
43static inline uint64_t os_cpu_to_le64(uint64_t x)
44{
45 return cpu_to_le64(x);
46}
47
48#endif /* __OSKA_LINUX_UTILS_H */