navin patidar [Sat, 21 Jun 2014 12:49:35 +0000 (18:19 +0530)]
staging: rtl8188eu: Remove inline function rtw_inc_and_chk_continual_urb_error()
rtw_inc_and_chk_continual_urb_error() is used to check if device is
removed unexpectedly, to do that we can just check status of urb in
usb_read_port_complete() and usbctrl_vendorreq() doed that by checking
return value of usb_control_msg().
staging: vt6655: remove header declarations for static functions
The functions iwctl_giwscan() and iwctl_siwscan() are only referenced
within iwctl.c -- so, remove their function declarations from iwctl.h
and mark these functions as static.
Signed-off-by: James A Shackleford <shack@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Create new functions for the operations of mac80211
vnt_tx_80211
vnt_start
vnt_stop
vnt_add_interface
vnt_remove_interface
vnt_config
vnt_bss_info_changed
vnt_prepare_multicast
vnt_configure
vnt_set_key
vnt_sw_scan_start
vnt_sw_scan_complete
vnt_get_tsf
vnt_set_tsf
vnt_reset_tsf
Create vnt_init to call device_init_registers to get permanent mac address.
This will be linked to vt6656_probe via bScheduleCommand in another patch as
firmware needs to be loaded first.
Modify vt6656_probe, vt6656_disconnect for mac80211
Change vt6656_suspend and vt6656_resume, nothing needs to be done here
let mac80211 handle the suspend.
Create vnt_key_init_table to replace KeyvInitTable.
Create vnt_set_keymode to handle key setting operations with five different
modes VNT_KEY_DEFAULTKEY, VNT_KEY_GROUP_ADDRESS, VNT_KEY_ALLGROUP, VNT_KEY_GROUP
and VNT_KEY_PAIRWISE. VNT_KEY_ONFLY and VNT_KEY_ONFLY_ALL are for when
key latching in driver is not required.
Create vnt_set_keys to handle mac80211 key cipher modes, four modes are
supported WLAN_CIPHER_SUITE_WEP40, WLAN_CIPHER_SUITE_WEP104, WLAN_CIPHER_SUITE_TKIP
and WLAN_CIPHER_SUITE_CCMP.
Create vnt_fill_txkey as mac80211 replacement for s_vFillTxKey.
Create vnt_tx_packet which a merger of s_bPacketToWirelessUsb, nsDMA_tx_packet
and csMgmt_xmit using mac80211 signalling.
Create vnt_beacon_xmit as mac80211 replacement for csBeacon_xmit. Changing
header in vnt_beacon_buffer to struct ieee80211_mgmt deleting some of
old code. vnt_beacon_make is needed to make beacon for vnt_beacon_xmit.
Create vnt_beacon_enable as mac80211 call to enable beacon.
vnt_fill_ieee80211_rts is modified to use struct ieee80211_hdr instead of
struct ethhdr and access to tx_context.
In s_nsBulkOutIoCompleteWrite modify context handling
Create new function vnt_rx_data to receive 80211 packets which is based
on RXbBulkInProcessData and rx them into mac80211
The function also relays dbm, tsf_time(as mactime) and sets byBBPreEDRSSI and
uCurrRSSI.
skb is modified slightly to skb_put the maxium tail room in PIPEnsBulkInUsbRead
and trim back in vnt_rx_data. dev_alloc_skb is used to reallocate the sk_buff.
Eli Billauer [Sat, 21 Jun 2014 11:07:12 +0000 (14:07 +0300)]
staging: xillybus: Use devm_ API for memory allocation and DMA mapping
Managed device resource API replaces code that reinvents it for memory
allocation, page allocation and DMA mapping.
devm_add_action() is used for unwinding DMA mappings, since there is no
devm_* API for dma_map_single(). A recent patch that introduces such API
was rejected, mainly on the grounds that it may cause an unnecessary waste of
resources.
Himangi Saraogi [Sat, 21 Jun 2014 15:04:09 +0000 (20:34 +0530)]
staging: wlags49_h2: Fix use of skb after netif_rx
This patch moves a call to netif_rx(skb) after a subsequent reference to
skb, because netif_rx may call kfree_skb via enqueue_to_backlog on its
argument.
This was found using the following semantic match.
Ken Cox [Thu, 26 Jun 2014 14:55:56 +0000 (09:55 -0500)]
Staging: unisys Remove BROKEN from Kconfig to allow compilation
The unisys drivers now properly check to make sure they are running
on the s-Par platform before they will initialize. This was fixed in
commit fcd0157ece so it is safe to allow the unisys drivers to be built.
This has been tested in the same qemu environment that originally
produced the panic and the kernel now runs as expected.
Reported-by: Fengguang Wu <fengguang.wu@intel.com> Reported-by: Sasha Levin <sasha.levin@oracle.com> Tested-by: Ken Cox <jkc@redhat.com> Signed-off-by: Ken Cox <jkc@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ken Cox [Thu, 26 Jun 2014 14:55:55 +0000 (09:55 -0500)]
Staging: unisys: remove references to __DATE__ and __TIME__
The use of __DATE__ and __TIME__ is no longer allowed in the kernel so this
commit removes those. They were once useful when the drivers were being
built externally, but now that the drivers are in the kernel the use of the
macros is redundant since the kernel already has the same information
elsewhere.
In addition, using these macros breaks the build if using gcc 4.9.0
Paul Bolle [Thu, 26 Jun 2014 08:54:08 +0000 (10:54 +0200)]
staging: unisys: remove unused macros
The macros CONFIG_SPAR_GUEST, GUESTDRIVERBUILD, and NOAUTOVERSION are
defined in Makefiles for the Unisys SPAR driver. They are never used.
Remove the lines that define these macros.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: s626: remove 'my_event_bits' from encoder private data
This array in the encoder private data just makes the driver harder to
follow.
The S626_EVBITS() macro is used to initialize the member in the declaration.
This macro creates a array of four values, based on the encoder channel, that
are used to mask and set the private data 'counter_int_enabs' member. The
values are created using the S626_OVERMASK() and S626_INDXMASK() macros using
the encoder channel number.
Remove the 'my_event_bits' member from the encoder private data as well
as the S626_EVBITS() macro. Refactor the code to use the S626_OVERMASK() and
S626_INDXMASK() macros directly.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: s626: remove 'get_mode' callback from encoder private data
There are two functions used for the 'get_mode' callback. One is used for
the channel 0-2 encoders and the other for the channel 3-5 encoders.
Add a helper function, s626_get_mode(), that uses the encoder channel number
to determine which function to call.
Remove the then unnecessary 'get_mode' member from the encoder private data.
The 'get_mode' callbacks were not being used by the driver in any of the enabled
code. For now block the s626_get_mode() functions with '#ifdef unused' to prevent
a compiler warning.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: s626: remove 'get_int_src' callback from encoder private data
There are two functions used for the 'get_int_src' callback. One is used for
the channel 0-2 encoders and the other for the channel 3-5 encoders.
Refactor the two callbacks into a single s626_get_int_srsc() function and use
the encoder channel number to handle the differences.
Remove the then unnecessary 'get_int_src' member from the encoder private data.
The 'get_int_src' callbacks were not being used by the driver. For now block
the s626_get_int_src() function with '#ifdef unused' to prevent a compiler
warning.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: s626: remove 'get_load_trig' callback from encoder private data
There are two functions used for the 'get_load_trig' callback. One is used for
the channel 0-2 encoders and the other for the channel 3-5 encoders.
Refactor the two callbacks into a single s626_get_load_trig() function and use
the encoder channel number to handle the differences.
Remove the then unnecessary 'get_enable' member from the encoder private data.
The 'get_load_trig' callbacks were not being used by the driver. For now block
the s626_get_load_trig() function with '#ifdef unused' to prevent a compiler
warning.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: s626: remove 'get_enable' callback from encoder private data
There are two functions used for the 'get_enable' callback, s626_get_enable_a()
function is used for the channel 0-2 encoders and s626_get_enable_b() is used
for the channel 3-5 encoders.
Refactor the two callbacks into a single s626_get_enable() function and use the
encoder channel number to handle the differenced.
Remove the then unnecessary 'get_enable' member and just call s626_set_enable()
directly.
The 'get_enable' callbacks were not being used by the driver. For now block the
s626_get_enable() function with '#ifdef unused' to prevent a compiler warning.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: s626: remove 'set_enable' callback from encoder private data
There are two functions used for the 'set_enable' callback, s626_set_enable_a()
function is used for the channel 0-2 encoders and s626_set_enable_b() is used
for the channel 3-5 encoders.
Refactor the two callbacks into a single s626_set_enable() function and use the
encoder channel number to handle the differenced.
Remove the then unnecessary 'set_enable' member and just call s626_set_enable()
directly.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: s626: remove my_latch_lsw from encoder private data
This member of the encoder private data can be calculated based on
the comedi channel stored in the 'chan' member of the private data.
Do that instead and remove the unnecessary member.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: s626: remove my_cr[ab] from encoder private data
These members of the encoder private data can be calculated based on
the comedi channel stored in the 'chan' member of the private data.
Do that instead and remove the unnecessary members.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chase Southwood [Sat, 21 Jun 2014 22:25:58 +0000 (17:25 -0500)]
staging: comedi: addi_apci_1564: add Change-of-State interrupt subdevice and required functions
This board supports an interrupt that can be generated by an AND/OR
combination of 16 of the input channels.
Create a separate subdevice to handle this interrupt.
The apci1564_di_config() function is used to configure which
inputs are used to generate the interrupt. Currently this function
is broken since it does not follow the comedi API for insn_config
functions. Fix this function by implementing the config instruction
INSN_CONFIG_DIGITAL_TRIG.
Add the remaining subdevice operations necessary for the interrupt
subdevice to support async commands.
Signed-off-by: Chase Southwood <chase.southwood@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Cc: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The addi_private struct defined in addi-data/addi_common.h is very bloated
and contains many fields which addi_apci_1564 does not require. In the
interest of eventually removing this driver's dependency on
addi_common.h, we can create a private data struct specifically for
addi_apci_1564 containing only the fields it will actually use.
Signed-off-by: Chase Southwood <chase.southwood@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Cc: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chase Southwood [Sat, 21 Jun 2014 22:24:39 +0000 (17:24 -0500)]
staging: comedi: addi_apci_1564: remove use of devpriv->b_OutputMemoryStatus
This member of the private data struct is only set at one location in the
entire driver, and then never even used for anything. Let's just remove
its use.
Signed-off-by: Chase Southwood <chase.southwood@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Cc: H Hartley Sweeeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: dt282x: automatically handle D/A data format
The DT2821 series board have jumpers that set the output range for
the two Analog Output channels. The range_table for the Analog Output
subdevice provides all possible ranges to the user. When a unipolar
range is selected the board expects the data to be in a straight
binary format. When a bipolar range is select the data should be in
two's complement format.
Currently, the user passes some configuration options when attaching
to the driver to select the data format for each channel. If the
user does not pass the config options, the data format is assumed to
be straight binary.
The Analog Output subdevice now has a range_table that provides the
user will all possible ranges. Use the range information to determine
if the data values need to be munged into two's complememnt values
and deprecate the config options.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: dt282x: fix bug where DIO direction is reset to inputs
The direction of the 16 DIO channels is controlled with two bits in the
DACSR register. The HBOE bit controls the direction of channels 15-8 and
the LBOE bit channels 7-0.
The DACSR register is also used to control the Analog Output async command
support. Currently, starting or canceling an Analog Output command would
also reset the DIO directions so that all channels were inputs.
Fix the driver so that the DIO direction is not changed when starting or
canceling an Analog Output async command.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: dt282x: tidy up the register map and bit defines
For aesthetics, rename the register map defines so that the bit defines
are associated with the registers. Also, convert all the bit defines into
bit-shifts to make them clear.
Remove all the verbose comments. All the registers and bits are named
according to the User Manual for the DT2821 Series, Document UM-05073-G.
That manual can be checked if necessary for the verbose information.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: dt282x: avoid calculating the timer divisor multiple times
A common timer is used for analog input and output async commands. The
(*do_cmdtest) for both subdevices calculates the divisor as part of
Step 4 when validating the trigger arguments. The divisor is calculated
again in the (*do_cmd) for both subdevices in order to set the timer.
The comedi core only calls the (*do_cmd) is called after a successful
(*do_cmdtest). Save the divisor from the (*do_cmdtest) in the private
data and use that value in the (*do_cmd).
The extra check of the cmd->convert_arg in dt282x_ai_cmd() is not necessary.
The convert_arg was already checked in the (*do_cmdtest), and it's not used
in the (*do_cmd).
Tidy up dt282x_ns_to_timer(), the parameters are all unsigned int's and the
mask of the 'flags' can be moved here to simplify the callers.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: dt282x: cleanup analog output range table
The DT2821 series boards do not have programmable analog output ranges.
The range is set, per-channel, with jumpers on the board.
Currently the user has to pass some configuration options when attaching
to the driver in order to set the range for each channel. If they do not
pass the range options they will default to 0. If they pass an invalid
range option they will also default to 0. The 0 range option is bipolar
10V. If the user passes a range option that does not match the hardware
setting it doesn't cause any problems in the driver it just causes the
user space comedilib library to incorrectly convert the hardware values
to physical values.
Make the attach a bit simpler by deprecating these options and providing
a range table with all the valid ranges for the analog outputs. The user
can then select the correct range when they use the comedilib functions.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: dt282x: fix Analog Input se/diff channel configuration
Most of the boards supported by this driver can do either single-ended or
differential Analog Input but there are a couple that can only do one or
the other. On the boards that can do both the type of input is set with
jumpers on the board.
The 'it->options[4]' passed by the user during the board (*attach) is used
to determine how the Analog Inputs are configured. This is used to set
the subdevice flags and number of channels correctly.
Fix the check of this option so that it only applies when the board can
actually do differential input. Also, default to differential inputs if
that is the only mode the board supports.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This enum is used to index the 'options' values that are passed
by the user attaches to the driver. These options are identified
in the comedi comment block.
For aesthetics, remove the enum and just open code the index values.
Refactor the Analog Input subdevice init so that the it->options[4],
indicating differential inputs, does not have to be checked multiple
times.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>