Commit 93110f69 authored by David Sterba's avatar David Sterba Committed by Linus Torvalds

ipwireless: Do not return value from sending funcs

ipwireless: Do not return value from sending funcs

Do not return value from do_send_fragment and do_send_packet, it's not used.
The packet size checks are not useful too:

* zero length packet will never be sent, caller always passes packet_header
  size which is either 1 or 3
* MTU check is done in caller, no need to repeat
Signed-off-by: default avatarDavid Sterba <dsterba@suse.cz>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d54c2752
...@@ -400,19 +400,14 @@ static void swap_packet_bitfield_from_le(unsigned char *data) ...@@ -400,19 +400,14 @@ static void swap_packet_bitfield_from_le(unsigned char *data)
#endif #endif
} }
static int do_send_fragment(struct ipw_hardware *hw, unsigned char *data, static void do_send_fragment(struct ipw_hardware *hw, unsigned char *data,
unsigned length) unsigned length)
{ {
unsigned i; unsigned i;
unsigned long flags; unsigned long flags;
start_timing(); start_timing();
BUG_ON(length > hw->ll_mtu);
if (length == 0)
return 0;
if (length > hw->ll_mtu)
return -1;
if (ipwireless_debug) if (ipwireless_debug)
dump_data_bytes("send", data, length); dump_data_bytes("send", data, length);
...@@ -458,11 +453,9 @@ static int do_send_fragment(struct ipw_hardware *hw, unsigned char *data, ...@@ -458,11 +453,9 @@ static int do_send_fragment(struct ipw_hardware *hw, unsigned char *data,
spin_unlock_irqrestore(&hw->lock, flags); spin_unlock_irqrestore(&hw->lock, flags);
end_write_timing(length); end_write_timing(length);
return 0;
} }
static int do_send_packet(struct ipw_hardware *hw, struct ipw_tx_packet *packet) static void do_send_packet(struct ipw_hardware *hw, struct ipw_tx_packet *packet)
{ {
unsigned short fragment_data_len; unsigned short fragment_data_len;
unsigned short data_left = packet->length - packet->offset; unsigned short data_left = packet->length - packet->offset;
...@@ -522,8 +515,6 @@ static int do_send_packet(struct ipw_hardware *hw, struct ipw_tx_packet *packet) ...@@ -522,8 +515,6 @@ static int do_send_packet(struct ipw_hardware *hw, struct ipw_tx_packet *packet)
packet->length); packet->length);
kfree(packet); kfree(packet);
} }
return 0;
} }
static void ipw_setup_hardware(struct ipw_hardware *hw) static void ipw_setup_hardware(struct ipw_hardware *hw)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment