diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-28 09:44:56 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-28 09:44:56 -0700 |
commit | e4c5bf8e3dca827a1b3a6fac494eae8c74b7e1e7 (patch) | |
tree | ea51b391f7d74ca695dcb9f5e46eb02688a92ed9 /drivers/staging/otus/wrap_buf.c | |
parent | 81280572ca6f54009edfa4deee563e8678784218 (diff) | |
parent | a4ac0d847af9dd34d5953a5e264400326144b6b2 (diff) | |
download | op-kernel-dev-e4c5bf8e3dca827a1b3a6fac494eae8c74b7e1e7.zip op-kernel-dev-e4c5bf8e3dca827a1b3a6fac494eae8c74b7e1e7.tar.gz |
Merge 'staging-next' to Linus's tree
This merges the staging-next tree to Linus's tree and resolves
some conflicts that were present due to changes in other trees that were
affected by files here.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/otus/wrap_buf.c')
-rw-r--r-- | drivers/staging/otus/wrap_buf.c | 111 |
1 files changed, 0 insertions, 111 deletions
diff --git a/drivers/staging/otus/wrap_buf.c b/drivers/staging/otus/wrap_buf.c deleted file mode 100644 index d7ee0b4..0000000 --- a/drivers/staging/otus/wrap_buf.c +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 2007-2008 Atheros Communications Inc. - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ -/* */ -/* Module Name : wrap_buf.c */ -/* */ -/* Abstract */ -/* This module contains wrapper functions for buffer management */ -/* */ -/* NOTES */ -/* Platform dependent. */ -/* */ -/************************************************************************/ - -#include "oal_dt.h" -#include "usbdrv.h" - - -#include <linux/netlink.h> - -#include <net/iw_handler.h> - - -/* Called to allocate buffer, must return a continue buffer space */ -zbuf_t *zfwBufAllocate(zdev_t *dev, u16_t len) -{ - zbuf_t *buf; - - /* Allocate SKB for packet*/ - buf = dev_alloc_skb(len); - - return buf; -} - - -/* Called to free buffer, replace below 3 functions */ -void zfwBufFree(zdev_t *dev, zbuf_t *buf, u16_t status) -{ - dev_kfree_skb_any(buf); -} - -/* Called to adjust buffer size and head pointer */ -u16_t zfwBufRemoveHead(zdev_t *dev, zbuf_t *buf, u16_t size) -{ - /* zm_assert(buf->len > size); */ - - buf->data += size; - buf->len -= size; - return 0; -} - - - - -/* return tail if head==NULL, called to chain multiple buffer together */ -/* Used to chain Rx buffer to form a frame. if the prepared Rx buffer */ -/* is greater than an ethernet frame(1518+32 byte), then this function */ -/* will only be called with head=NULL. */ -u16_t zfwBufChain(zdev_t *dev, zbuf_t **head, zbuf_t *tail) -{ - - *head = tail; - return 0; -} - - -/* Called when doing infra-bss forwarding */ -u16_t zfwBufCopy(zdev_t *dev, zbuf_t *dst, zbuf_t *src) -{ - memcpy(dst->data, src->data, src->len); - dst->tail = dst->data; - skb_put(dst, src->len); - return 0; -} - - -/* Called to adjust buffer size and tail pointer */ -u16_t zfwBufSetSize(zdev_t *dev, zbuf_t *buf, u16_t size) -{ -#ifdef NET_SKBUFF_DATA_USES_OFFSET - buf->tail = 0; - buf->len = 0; -#else - buf->tail = buf->data; - buf->len = 0; -#endif - - skb_put(buf, size); - return 0; -} - -u16_t zfwBufGetSize(zdev_t *dev, zbuf_t *buf) -{ - return buf->len; -} - -void zfwCopyBufContext(zdev_t *dev, zbuf_t *source, zbuf_t *dst) -{ -} |