net: cdc_ncm: refactoring cdc_ncm_setup
authorBjørn Mork <bjorn@mork.no>
Fri, 1 Nov 2013 10:16:58 +0000 (11:16 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 2 Nov 2013 06:02:04 +0000 (02:02 -0400)
commit47175e5f283f8c78ff325edde0aec2018ce607e5
tree39565463b6f55584e12e4f62e9d2adb25a36530d
parent6dd13e83ce37f716e36085cb8b58779da1e98f6d
net: cdc_ncm: refactoring cdc_ncm_setup

Rewriting the "set max datagram" part of dc_ncm_setup to
separate the selection and validatation of the size from
the code which optionally informs the device of this
value.  This ensures that we use the correct value
regardless of device support for the get and set commands.

Removing some of the many indent levels while doing this
to make the code more readable.

Cc: Alexey Orishko <alexey.orishko@gmail.com>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/cdc_ncm.c