Commit b2f30a0a authored by David Kilroy's avatar David Kilroy Committed by John W. Linville

orinoco: keep line length below 80 characters

Remove most checkpatch warnings of the type
WARNING: line over 80 characters
Signed-off-by: default avatarDavid Kilroy <kilroyd@googlemail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 566f2d9e
...@@ -101,8 +101,10 @@ ...@@ -101,8 +101,10 @@
/* Module information */ /* Module information */
/********************************************************************/ /********************************************************************/
MODULE_AUTHOR("Pavel Roskin <proski@gnu.org> & David Gibson <hermes@gibson.dropbear.id.au>"); MODULE_AUTHOR("Pavel Roskin <proski@gnu.org> & "
MODULE_DESCRIPTION("Driver for Lucent Orinoco, Prism II based and similar wireless cards"); "David Gibson <hermes@gibson.dropbear.id.au>");
MODULE_DESCRIPTION("Driver for Lucent Orinoco, Prism II based "
"and similar wireless cards");
MODULE_LICENSE("Dual MPL/GPL"); MODULE_LICENSE("Dual MPL/GPL");
/* Level of debugging. Used in the macros in orinoco.h */ /* Level of debugging. Used in the macros in orinoco.h */
...@@ -116,9 +118,11 @@ EXPORT_SYMBOL(orinoco_debug); ...@@ -116,9 +118,11 @@ EXPORT_SYMBOL(orinoco_debug);
static int suppress_linkstatus; /* = 0 */ static int suppress_linkstatus; /* = 0 */
module_param(suppress_linkstatus, bool, 0644); module_param(suppress_linkstatus, bool, 0644);
MODULE_PARM_DESC(suppress_linkstatus, "Don't log link status changes"); MODULE_PARM_DESC(suppress_linkstatus, "Don't log link status changes");
static int ignore_disconnect; /* = 0 */ static int ignore_disconnect; /* = 0 */
module_param(ignore_disconnect, int, 0644); module_param(ignore_disconnect, int, 0644);
MODULE_PARM_DESC(ignore_disconnect, "Don't report lost link to the network layer"); MODULE_PARM_DESC(ignore_disconnect,
"Don't report lost link to the network layer");
static int force_monitor; /* = 0 */ static int force_monitor; /* = 0 */
module_param(force_monitor, int, 0644); module_param(force_monitor, int, 0644);
...@@ -840,7 +844,8 @@ static struct iw_statistics *orinoco_get_wireless_stats(struct net_device *dev) ...@@ -840,7 +844,8 @@ static struct iw_statistics *orinoco_get_wireless_stats(struct net_device *dev)
wstats->qual.qual = priv->spy_data.spy_stat[0].qual; wstats->qual.qual = priv->spy_data.spy_stat[0].qual;
wstats->qual.level = priv->spy_data.spy_stat[0].level; wstats->qual.level = priv->spy_data.spy_stat[0].level;
wstats->qual.noise = priv->spy_data.spy_stat[0].noise; wstats->qual.noise = priv->spy_data.spy_stat[0].noise;
wstats->qual.updated = priv->spy_data.spy_stat[0].updated; wstats->qual.updated =
priv->spy_data.spy_stat[0].updated;
} }
} else { } else {
struct { struct {
...@@ -854,7 +859,8 @@ static struct iw_statistics *orinoco_get_wireless_stats(struct net_device *dev) ...@@ -854,7 +859,8 @@ static struct iw_statistics *orinoco_get_wireless_stats(struct net_device *dev)
wstats->qual.qual = (int)le16_to_cpu(cq.qual); wstats->qual.qual = (int)le16_to_cpu(cq.qual);
wstats->qual.level = (int)le16_to_cpu(cq.signal) - 0x95; wstats->qual.level = (int)le16_to_cpu(cq.signal) - 0x95;
wstats->qual.noise = (int)le16_to_cpu(cq.noise) - 0x95; wstats->qual.noise = (int)le16_to_cpu(cq.noise) - 0x95;
wstats->qual.updated = IW_QUAL_ALL_UPDATED | IW_QUAL_DBM; wstats->qual.updated =
IW_QUAL_ALL_UPDATED | IW_QUAL_DBM;
} }
} }
...@@ -1571,7 +1577,8 @@ static void orinoco_rx(struct net_device *dev, ...@@ -1571,7 +1577,8 @@ static void orinoco_rx(struct net_device *dev,
/* These indicate a SNAP within 802.2 LLC within /* These indicate a SNAP within 802.2 LLC within
802.11 frame which we'll need to de-encapsulate to 802.11 frame which we'll need to de-encapsulate to
the original EthernetII frame. */ the original EthernetII frame. */
hdr = (struct ethhdr *)skb_push(skb, ETH_HLEN - ENCAPS_OVERHEAD); hdr = (struct ethhdr *)skb_push(skb,
ETH_HLEN - ENCAPS_OVERHEAD);
} else { } else {
/* 802.3 frame - prepend 802.3 header as is */ /* 802.3 frame - prepend 802.3 header as is */
hdr = (struct ethhdr *)skb_push(skb, ETH_HLEN); hdr = (struct ethhdr *)skb_push(skb, ETH_HLEN);
...@@ -2379,25 +2386,26 @@ int orinoco_reinit_firmware(struct net_device *dev) ...@@ -2379,25 +2386,26 @@ int orinoco_reinit_firmware(struct net_device *dev)
static int __orinoco_hw_set_bitrate(struct orinoco_private *priv) static int __orinoco_hw_set_bitrate(struct orinoco_private *priv)
{ {
hermes_t *hw = &priv->hw; hermes_t *hw = &priv->hw;
int ratemode = priv->bitratemode;
int err = 0; int err = 0;
if (priv->bitratemode >= BITRATE_TABLE_SIZE) { if (ratemode >= BITRATE_TABLE_SIZE) {
printk(KERN_ERR "%s: BUG: Invalid bitrate mode %d\n", printk(KERN_ERR "%s: BUG: Invalid bitrate mode %d\n",
priv->ndev->name, priv->bitratemode); priv->ndev->name, ratemode);
return -EINVAL; return -EINVAL;
} }
switch (priv->firmware_type) { switch (priv->firmware_type) {
case FIRMWARE_TYPE_AGERE: case FIRMWARE_TYPE_AGERE:
err = hermes_write_wordrec(hw, USER_BAP, err = hermes_write_wordrec(hw, USER_BAP,
HERMES_RID_CNFTXRATECONTROL, HERMES_RID_CNFTXRATECONTROL,
bitrate_table[priv->bitratemode].agere_txratectrl); bitrate_table[ratemode].agere_txratectrl);
break; break;
case FIRMWARE_TYPE_INTERSIL: case FIRMWARE_TYPE_INTERSIL:
case FIRMWARE_TYPE_SYMBOL: case FIRMWARE_TYPE_SYMBOL:
err = hermes_write_wordrec(hw, USER_BAP, err = hermes_write_wordrec(hw, USER_BAP,
HERMES_RID_CNFTXRATECONTROL, HERMES_RID_CNFTXRATECONTROL,
bitrate_table[priv->bitratemode].intersil_txratectrl); bitrate_table[ratemode].intersil_txratectrl);
break; break;
default: default:
BUG(); BUG();
...@@ -2465,7 +2473,8 @@ static int __orinoco_hw_setup_wepkeys(struct orinoco_private *priv) ...@@ -2465,7 +2473,8 @@ static int __orinoco_hw_setup_wepkeys(struct orinoco_private *priv)
int keylen; int keylen;
int i; int i;
/* Force uniform key length to work around firmware bugs */ /* Force uniform key length to work around
* firmware bugs */
keylen = le16_to_cpu(priv->keys[priv->tx_key].len); keylen = le16_to_cpu(priv->keys[priv->tx_key].len);
if (keylen > LARGE_KEY_SIZE) { if (keylen > LARGE_KEY_SIZE) {
...@@ -2477,17 +2486,17 @@ static int __orinoco_hw_setup_wepkeys(struct orinoco_private *priv) ...@@ -2477,17 +2486,17 @@ static int __orinoco_hw_setup_wepkeys(struct orinoco_private *priv)
/* Write all 4 keys */ /* Write all 4 keys */
for (i = 0; i < ORINOCO_MAX_KEYS; i++) { for (i = 0; i < ORINOCO_MAX_KEYS; i++) {
err = hermes_write_ltv(hw, USER_BAP, err = hermes_write_ltv(hw, USER_BAP,
HERMES_RID_CNFDEFAULTKEY0 + i, HERMES_RID_CNFDEFAULTKEY0 + i,
HERMES_BYTES_TO_RECLEN(keylen), HERMES_BYTES_TO_RECLEN(keylen),
priv->keys[i].data); priv->keys[i].data);
if (err) if (err)
return err; return err;
} }
/* Write the index of the key used in transmission */ /* Write the index of the key used in transmission */
err = hermes_write_wordrec(hw, USER_BAP, err = hermes_write_wordrec(hw, USER_BAP,
HERMES_RID_CNFWEPDEFAULTKEYID, HERMES_RID_CNFWEPDEFAULTKEYID,
priv->tx_key); priv->tx_key);
if (err) if (err)
return err; return err;
} }
...@@ -2526,8 +2535,8 @@ static int __orinoco_hw_setup_enc(struct orinoco_private *priv) ...@@ -2526,8 +2535,8 @@ static int __orinoco_hw_setup_enc(struct orinoco_private *priv)
if (priv->encode_alg == IW_ENCODE_ALG_WEP) { if (priv->encode_alg == IW_ENCODE_ALG_WEP) {
/* Enable the shared-key authentication. */ /* Enable the shared-key authentication. */
err = hermes_write_wordrec(hw, USER_BAP, err = hermes_write_wordrec(hw, USER_BAP,
HERMES_RID_CNFAUTHENTICATION_AGERE, HERMES_RID_CNFAUTHENTICATION_AGERE,
auth_flag); auth_flag);
} }
err = hermes_write_wordrec(hw, USER_BAP, err = hermes_write_wordrec(hw, USER_BAP,
HERMES_RID_CNFWEPENABLED_AGERE, HERMES_RID_CNFWEPENABLED_AGERE,
...@@ -2730,16 +2739,16 @@ static int __orinoco_program_rids(struct net_device *dev) ...@@ -2730,16 +2739,16 @@ static int __orinoco_program_rids(struct net_device *dev)
memcpy(&idbuf.val, priv->desired_essid, sizeof(idbuf.val)); memcpy(&idbuf.val, priv->desired_essid, sizeof(idbuf.val));
/* WinXP wants partner to configure OWNSSID even in IBSS mode. (jimc) */ /* WinXP wants partner to configure OWNSSID even in IBSS mode. (jimc) */
err = hermes_write_ltv(hw, USER_BAP, HERMES_RID_CNFOWNSSID, err = hermes_write_ltv(hw, USER_BAP, HERMES_RID_CNFOWNSSID,
HERMES_BYTES_TO_RECLEN(strlen(priv->desired_essid)+2), HERMES_BYTES_TO_RECLEN(strlen(priv->desired_essid)+2),
&idbuf); &idbuf);
if (err) { if (err) {
printk(KERN_ERR "%s: Error %d setting OWNSSID\n", printk(KERN_ERR "%s: Error %d setting OWNSSID\n",
dev->name, err); dev->name, err);
return err; return err;
} }
err = hermes_write_ltv(hw, USER_BAP, HERMES_RID_CNFDESIREDSSID, err = hermes_write_ltv(hw, USER_BAP, HERMES_RID_CNFDESIREDSSID,
HERMES_BYTES_TO_RECLEN(strlen(priv->desired_essid)+2), HERMES_BYTES_TO_RECLEN(strlen(priv->desired_essid)+2),
&idbuf); &idbuf);
if (err) { if (err) {
printk(KERN_ERR "%s: Error %d setting DESIREDSSID\n", printk(KERN_ERR "%s: Error %d setting DESIREDSSID\n",
dev->name, err); dev->name, err);
...@@ -2764,7 +2773,7 @@ static int __orinoco_program_rids(struct net_device *dev) ...@@ -2764,7 +2773,7 @@ static int __orinoco_program_rids(struct net_device *dev)
HERMES_RID_CNFSYSTEMSCALE, HERMES_RID_CNFSYSTEMSCALE,
priv->ap_density); priv->ap_density);
if (err) { if (err) {
printk(KERN_WARNING "%s: Error %d setting SYSTEMSCALE. " printk(KERN_WARNING "%s: Error %d setting SYSTEMSCALE. "
"Disabling sensitivity control\n", "Disabling sensitivity control\n",
dev->name, err); dev->name, err);
...@@ -3002,7 +3011,8 @@ static void orinoco_reset(struct work_struct *work) ...@@ -3002,7 +3011,8 @@ static void orinoco_reset(struct work_struct *work)
goto disable; goto disable;
} }
spin_lock_irq(&priv->lock); /* This has to be called from user context */ /* This has to be called from user context */
spin_lock_irq(&priv->lock);
priv->hw_unavailable--; priv->hw_unavailable--;
...@@ -3293,7 +3303,8 @@ static int determine_firmware(struct net_device *dev) ...@@ -3293,7 +3303,8 @@ static int determine_firmware(struct net_device *dev)
SYMBOL_MAX_VER_LEN, NULL, &tmp); SYMBOL_MAX_VER_LEN, NULL, &tmp);
if (err) { if (err) {
printk(KERN_WARNING printk(KERN_WARNING
"%s: Error %d reading Symbol firmware info. Wildly guessing capabilities...\n", "%s: Error %d reading Symbol firmware info. "
"Wildly guessing capabilities...\n",
dev->name, err); dev->name, err);
firmver = 0; firmver = 0;
tmp[0] = '\0'; tmp[0] = '\0';
...@@ -3302,8 +3313,10 @@ static int determine_firmware(struct net_device *dev) ...@@ -3302,8 +3313,10 @@ static int determine_firmware(struct net_device *dev)
* something like : "V2.20-01". * something like : "V2.20-01".
* Quick and dirty parsing... - Jean II * Quick and dirty parsing... - Jean II
*/ */
firmver = ((tmp[1] - '0') << 16) | ((tmp[3] - '0') << 12) firmver = ((tmp[1] - '0') << 16)
| ((tmp[4] - '0') << 8) | ((tmp[6] - '0') << 4) | ((tmp[3] - '0') << 12)
| ((tmp[4] - '0') << 8)
| ((tmp[6] - '0') << 4)
| (tmp[7] - '0'); | (tmp[7] - '0');
tmp[SYMBOL_MAX_VER_LEN] = '\0'; tmp[SYMBOL_MAX_VER_LEN] = '\0';
...@@ -3336,7 +3349,7 @@ static int determine_firmware(struct net_device *dev) ...@@ -3336,7 +3349,7 @@ static int determine_firmware(struct net_device *dev)
priv->do_fw_download = (priv->stop_fw != NULL); priv->do_fw_download = (priv->stop_fw != NULL);
priv->broken_disableport = (firmver == 0x25013) || priv->broken_disableport = (firmver == 0x25013) ||
(firmver >= 0x30000 && firmver <= 0x31000); (firmver >= 0x30000 && firmver <= 0x31000);
priv->has_hostscan = (firmver >= 0x31001) || priv->has_hostscan = (firmver >= 0x31001) ||
(firmver >= 0x29057 && firmver < 0x30000); (firmver >= 0x29057 && firmver < 0x30000);
/* Tested with Intel firmware : 0x20015 => Jean II */ /* Tested with Intel firmware : 0x20015 => Jean II */
...@@ -3423,7 +3436,8 @@ static int orinoco_init(struct net_device *dev) ...@@ -3423,7 +3436,8 @@ static int orinoco_init(struct net_device *dev)
} }
if (priv->has_port3) if (priv->has_port3)
printk(KERN_DEBUG "%s: Ad-hoc demo mode supported\n", dev->name); printk(KERN_DEBUG "%s: Ad-hoc demo mode supported\n",
dev->name);
if (priv->has_ibss) if (priv->has_ibss)
printk(KERN_DEBUG "%s: IEEE standard IBSS ad-hoc mode supported\n", printk(KERN_DEBUG "%s: IEEE standard IBSS ad-hoc mode supported\n",
dev->name); dev->name);
...@@ -3515,7 +3529,8 @@ static int orinoco_init(struct net_device *dev) ...@@ -3515,7 +3529,8 @@ static int orinoco_init(struct net_device *dev)
HERMES_RID_CNFMWOROBUST_AGERE, HERMES_RID_CNFMWOROBUST_AGERE,
&priv->mwo_robust); &priv->mwo_robust);
else else
err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_CNFFRAGMENTATIONTHRESHOLD, err = hermes_read_wordrec(hw, USER_BAP,
HERMES_RID_CNFFRAGMENTATIONTHRESHOLD,
&priv->frag_thresh); &priv->frag_thresh);
if (err) { if (err) {
printk(KERN_ERR "%s: failed to read fragmentation settings!\n", printk(KERN_ERR "%s: failed to read fragmentation settings!\n",
...@@ -3758,7 +3773,8 @@ static int orinoco_hw_get_freq(struct orinoco_private *priv) ...@@ -3758,7 +3773,8 @@ static int orinoco_hw_get_freq(struct orinoco_private *priv)
if (orinoco_lock(priv, &flags) != 0) if (orinoco_lock(priv, &flags) != 0)
return -EBUSY; return -EBUSY;
err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_CURRENTCHANNEL, &channel); err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_CURRENTCHANNEL,
&channel);
if (err) if (err)
goto out; goto out;
...@@ -4064,7 +4080,8 @@ static int orinoco_ioctl_getiwrange(struct net_device *dev, ...@@ -4064,7 +4080,8 @@ static int orinoco_ioctl_getiwrange(struct net_device *dev,
range->max_pmt = 65535 * 1000; /* ??? */ range->max_pmt = 65535 * 1000; /* ??? */
range->pmp_flags = IW_POWER_PERIOD; range->pmp_flags = IW_POWER_PERIOD;
range->pmt_flags = IW_POWER_TIMEOUT; range->pmt_flags = IW_POWER_TIMEOUT;
range->pm_capa = IW_POWER_PERIOD | IW_POWER_TIMEOUT | IW_POWER_UNICAST_R; range->pm_capa = (IW_POWER_PERIOD | IW_POWER_TIMEOUT |
IW_POWER_UNICAST_R);
range->retry_capa = IW_RETRY_LIMIT | IW_RETRY_LIFETIME; range->retry_capa = IW_RETRY_LIMIT | IW_RETRY_LIFETIME;
range->retry_flags = IW_RETRY_LIMIT; range->retry_flags = IW_RETRY_LIMIT;
...@@ -4506,9 +4523,10 @@ static int orinoco_ioctl_setfrag(struct net_device *dev, ...@@ -4506,9 +4523,10 @@ static int orinoco_ioctl_setfrag(struct net_device *dev,
priv->mwo_robust = 0; priv->mwo_robust = 0;
else { else {
if (frq->fixed) if (frq->fixed)
printk(KERN_WARNING "%s: Fixed fragmentation is " printk(KERN_WARNING "%s: Fixed fragmentation "
"not supported on this firmware. " "is not supported on this firmware. "
"Using MWO robust instead.\n", dev->name); "Using MWO robust instead.\n",
dev->name);
priv->mwo_robust = 1; priv->mwo_robust = 1;
} }
} else { } else {
...@@ -4518,7 +4536,8 @@ static int orinoco_ioctl_setfrag(struct net_device *dev, ...@@ -4518,7 +4536,8 @@ static int orinoco_ioctl_setfrag(struct net_device *dev,
if ((frq->value < 256) || (frq->value > 2346)) if ((frq->value < 256) || (frq->value > 2346))
err = -EINVAL; err = -EINVAL;
else else
priv->frag_thresh = frq->value & ~0x1; /* must be even */ /* must be even */
priv->frag_thresh = frq->value & ~0x1;
} }
} }
...@@ -4552,7 +4571,8 @@ static int orinoco_ioctl_getfrag(struct net_device *dev, ...@@ -4552,7 +4571,8 @@ static int orinoco_ioctl_getfrag(struct net_device *dev,
frq->disabled = !val; frq->disabled = !val;
frq->fixed = 0; frq->fixed = 0;
} else { } else {
err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_CNFFRAGMENTATIONTHRESHOLD, err = hermes_read_wordrec(hw, USER_BAP,
HERMES_RID_CNFFRAGMENTATIONTHRESHOLD,
&val); &val);
if (err) if (err)
val = 0; val = 0;
...@@ -4747,7 +4767,8 @@ static int orinoco_ioctl_getpower(struct net_device *dev, ...@@ -4747,7 +4767,8 @@ static int orinoco_ioctl_getpower(struct net_device *dev,
if (orinoco_lock(priv, &flags) != 0) if (orinoco_lock(priv, &flags) != 0)
return -EBUSY; return -EBUSY;
err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_CNFPMENABLED, &enable); err = hermes_read_wordrec(hw, USER_BAP,
HERMES_RID_CNFPMENABLED, &enable);
if (err) if (err)
goto out; goto out;
...@@ -4756,11 +4777,13 @@ static int orinoco_ioctl_getpower(struct net_device *dev, ...@@ -4756,11 +4777,13 @@ static int orinoco_ioctl_getpower(struct net_device *dev,
if (err) if (err)
goto out; goto out;
err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_CNFPMHOLDOVERDURATION, &timeout); err = hermes_read_wordrec(hw, USER_BAP,
HERMES_RID_CNFPMHOLDOVERDURATION, &timeout);
if (err) if (err)
goto out; goto out;
err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_CNFMULTICASTRECEIVE, &mcast); err = hermes_read_wordrec(hw, USER_BAP,
HERMES_RID_CNFMULTICASTRECEIVE, &mcast);
if (err) if (err)
goto out; goto out;
...@@ -5486,9 +5509,9 @@ static int orinoco_ioctl_setscan(struct net_device *dev, ...@@ -5486,9 +5509,9 @@ static int orinoco_ioctl_setscan(struct net_device *dev,
switch (priv->firmware_type) { switch (priv->firmware_type) {
case FIRMWARE_TYPE_SYMBOL: case FIRMWARE_TYPE_SYMBOL:
err = hermes_write_wordrec(hw, USER_BAP, err = hermes_write_wordrec(hw, USER_BAP,
HERMES_RID_CNFHOSTSCAN_SYMBOL, HERMES_RID_CNFHOSTSCAN_SYMBOL,
HERMES_HOSTSCAN_SYMBOL_ONCE | HERMES_HOSTSCAN_SYMBOL_ONCE |
HERMES_HOSTSCAN_SYMBOL_BCAST); HERMES_HOSTSCAN_SYMBOL_BCAST);
break; break;
case FIRMWARE_TYPE_INTERSIL: { case FIRMWARE_TYPE_INTERSIL: {
__le16 req[3]; __le16 req[3];
......
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