The current ieee80211 library does not pass net_device structures
around. Switch code to use private data structure to get I/O addresses.
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
adds implementation for allowing configuration of dot11RTSThreshold
as defined in the 802.11 standards. The mac80211 module will use
callback set_rts_threshold to configure this in the driver.
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Reviewed-by: Henry Ptasinski <henryp@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch eliminates duplicate code. The remove_block_head function
is a special case of remove_block which can be contained in remove_block
without confusion.
The portion of code in remove_block_head which was noted as "DEBUG ONLY"
is now mandatory. Doing this provides consistent management of the double
linked list of blocks under a freelist and makes this consolidation
of delete block code safe. The first and last blocks will have NULL
pointers in their previous and next page pointers respectively.
Additionally, any time a block is removed from a free list the next and
previous pointers will be set to NULL to avoid misuse outside xvmalloc.
Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Reviewed-by: Pekka Enberg <penberg@kernel.org>
Acked-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Currently zram will do nothing to the page in the bvec when that page
has not been previously written. This allows random data to leak to
user space. That can be seen by doing the following:
## Load the module and create a 256Mb zram device called /dev/zram0
# modprobe zram
# echo $((256*1024*1024)) > /sys/class/block/zram0/disksize
## Initialize the device by writing zero to the first block
# dd if=/dev/zero of=/dev/zram0 bs=512 count=1
## Read ~256Mb of memory into a file and hope for something interesting
# dd if=/dev/zram0 of=file
This patch will treat an unwritten page as a zero-filled page. If a
page is read before a write has occurred the data returned is all 0's.
Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Reviewed-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
By swapping the total_pages statistic with the lock we close a
hole in the structure for 64-bit CPUs.
Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Reviewed-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Add a debug config flag to enable debug printk output and future
debug code.
Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Reviewed-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This change is in a conditional block which is entered only when there is
an existing data block on the freelist where the insert has taken place.
The new block is pushed onto the freelist stack and this conditional block
is updating links in the prior stack head to point to the new stack head.
After this conditional block the first-/second-level indices are updated
to indicate that there is a free block at this location.
This patch adds an immediate return from the conditional block to avoid
setting bits again to indicate a free block on this freelist. The bits
would already be set because there was an existing free block on this
freelist.
Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Reviewed-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
On a 64K page kernel, the value PAGE_SIZE passed to
blk_queue_logical_block_size would overflow the logical block size
argument (resulting in setting it to 0).
This patch sets the logical block size to 4096, using a new
ZRAM_LOGICAL_BLOCK_SIZE constant.
Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Reviewed-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
xvmalloc will not currently function with 64K pages. Newly allocated
pages will be inserted at an offset beyond the end of the first-level
index. This tuning is needed to properly size the allocator for 64K
pages.
The default 3 byte shift results in a second level list size which can not
be indexed using the 64 bits of the flbitmap in the xv_pool structure.
The shift must increase to 4 bytes between second level list entries to
fit the size of the first level bitmap.
Here are a few statistics for structure sizes on 32- and 64-bit CPUs
with 4KB and 64KB page sizes.
bits_per_long 32 64 64
page_size 4,096 4,096 65,535
xv_align 4 8 8
fl_delta 3 3 4
num_free_lists 508 508 4,094
xv_pool size 4,144b 8,216b 66,040b
per object overhead 32 64 64
zram struct 0.5GB disk 512KB 1024KB 64KB
This patch maintains the current tunings for 4K pages, adds an optimal
sizing for 64K pages and adds a safe tuning for any other page sizes.
Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Reviewed-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
removed the message from the driver to avoid polluting the kernel
log with messages indicating nothing is wrong.
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Remove differences in util sources for the two supported drivers.
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch allows to build both drivers. Previous patch for this
failed using -j option. This has been fixed by adding files with
include statement for the fullmac driver. Verified this is working
using -j4 option.
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Since 2.6.38-rc1 we are getting a compiler warning due to
changed API in net/cfg80211.h. This change fixes the warning
but driver will need to be modified later to handle the
additional parameters.
Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: Roland Vossen <rvossen@broadcom.com>
Cc: Dowan Kim <dowan@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fix compilation warning:
drivers/staging/olpc_dcon/olpc_dcon.c: In function ‘dcon_probe’:
drivers/staging/olpc_dcon/olpc_dcon.c:704:21: warning: ignoring
return value of ‘device_create_file’, declared with attribute warn_unused_result
and add cleaning of created files when creation of one failed.
Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the drivers.c file that fixes up a
braces around single statement warning found by the
checkpatch.pl tool
Signed-off-by: Micha Hergarden <micha.hergarden@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The below patch fixes a typo comamnd to command.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Since two preprocessor defines are always '1', could remove code that was
never compiled in and removed references to these preprocessor defines
(DMA64_ENAB and DMA64_MODE).
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
removed C code and that was never invoked, and declarations that are not used
anymore.
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Resubmitted the patch to align with staging-next tree. This change
depends on suspend/resume patch as sent on Wed, Jan 12, 2011.
Only hardware switch state needs to be handled by driver. RFKILL is
informed when hardware switch is activated. MAC80211 rfkill_poll
callback is used to check hardware switch deactivation.
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Reviewed-by: Henry Ptasinski <henryp@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The below patch fixes a typo comamnd to command.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The below patch fixes a typo comamnd to command.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
bcm driver copies a buffer length provided by userpace without checking it.
RxCntrlMsgBitMask is of type unsigned long so only makes sense to copy
sizeof(unsigned long) bytes.
Also, copy_from_user() returns the number of bytes that could not be copied.
The driver is returning that value as error code instead of -EFAULT.
This patch solves both issues.
Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The patch below fixes some typos, and makes some comments sound more proper.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Enclosed all macros with complex values in parenthesis
Signed-off-by: Timo von Holtz <tvh@informatik.uni-kiel.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fixed all brace coding style issues in the following files:
drivers/staging/rts_pstor/rtsx_card.h
drivers/staging/rts_pstor/spi.c
drivers/staging/rts_pstor/trace.h
drivers/staging/rts_pstor/xd.c
Signed-off-by: Timo von Holtz <tvh@informatik.uni-kiel.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>