Staging: wlan-ng : fixing coding style issues in prism2sta.c

Signed-off-by: Christos Tzoumakis <ctzocy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Christos Tzoumakis 2010-05-07 06:17:24 +03:00 committed by Greg Kroah-Hartman
parent 717f4a5f55
commit f9bd649520
1 changed files with 37 additions and 34 deletions

View File

@ -426,7 +426,7 @@ static int prism2sta_mlmerequest(wlandevice_t *wlandev, p80211msg_t *msg)
* msgp ptr to msg buffer * msgp ptr to msg buffer
* *
* Returns: * Returns:
* A p80211 message resultcode value. * A p80211 message resultcode value.
* *
* Side effects: * Side effects:
* *
@ -458,7 +458,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
"hfa384x_drvr_start() failed," "hfa384x_drvr_start() failed,"
"result=%d\n", (int)result); "result=%d\n", (int)result);
result = result =
P80211ENUM_resultcode_implementation_failure; P80211ENUM_resultcode_implementation_failure;
wlandev->msdstate = WLAN_MSD_HWPRESENT; wlandev->msdstate = WLAN_MSD_HWPRESENT;
break; break;
} }
@ -503,7 +503,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
"hfa384x_drvr_start() failed," "hfa384x_drvr_start() failed,"
"result=%d\n", (int)result); "result=%d\n", (int)result);
result = result =
P80211ENUM_resultcode_implementation_failure; P80211ENUM_resultcode_implementation_failure;
wlandev->msdstate = WLAN_MSD_HWPRESENT; wlandev->msdstate = WLAN_MSD_HWPRESENT;
break; break;
} }
@ -514,7 +514,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
"prism2sta_getcardinfo() failed," "prism2sta_getcardinfo() failed,"
"result=%d\n", (int)result); "result=%d\n", (int)result);
result = result =
P80211ENUM_resultcode_implementation_failure; P80211ENUM_resultcode_implementation_failure;
hfa384x_drvr_stop(hw); hfa384x_drvr_stop(hw);
wlandev->msdstate = WLAN_MSD_HWPRESENT; wlandev->msdstate = WLAN_MSD_HWPRESENT;
break; break;
@ -525,7 +525,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
"prism2sta_globalsetup() failed," "prism2sta_globalsetup() failed,"
"result=%d\n", (int)result); "result=%d\n", (int)result);
result = result =
P80211ENUM_resultcode_implementation_failure; P80211ENUM_resultcode_implementation_failure;
hfa384x_drvr_stop(hw); hfa384x_drvr_stop(hw);
wlandev->msdstate = WLAN_MSD_HWPRESENT; wlandev->msdstate = WLAN_MSD_HWPRESENT;
break; break;
@ -1178,8 +1178,8 @@ static void prism2sta_inf_chinforesults(wlandevice_t *wlandev,
chinforesult->active = chinforesult->active =
le16_to_cpu(inf->info.chinforesult.result[n]. le16_to_cpu(inf->info.chinforesult.result[n].
active); active);
pr_debug pr_debug
("chinfo: channel %d, %s level (avg/peak)=%d/%d dB, pcf %d\n", ("chinfo: channel %d, %s level (avg/peak)=%d/%d dB, pcf %d\n",
channel + 1, channel + 1,
chinforesult-> chinforesult->
active & HFA384x_CHINFORESULT_BSSACTIVE ? "signal" active & HFA384x_CHINFORESULT_BSSACTIVE ? "signal"
@ -1246,7 +1246,9 @@ void prism2sta_processing_defer(struct work_struct *data)
netif_carrier_on(wlandev->netdev); netif_carrier_on(wlandev->netdev);
/* If we are joining a specific AP, set our state and reset retries */ /* If we are joining a specific AP, set our
* state and reset retries
*/
if (hw->join_ap == 1) if (hw->join_ap == 1)
hw->join_ap = 2; hw->join_ap = 2;
hw->join_retries = 60; hw->join_retries = 60;
@ -1261,9 +1263,9 @@ void prism2sta_processing_defer(struct work_struct *data)
/* Collect the BSSID, and set state to allow tx */ /* Collect the BSSID, and set state to allow tx */
result = hfa384x_drvr_getconfig(hw, result = hfa384x_drvr_getconfig(hw,
HFA384x_RID_CURRENTBSSID, HFA384x_RID_CURRENTBSSID,
wlandev->bssid, wlandev->bssid,
WLAN_BSSID_LEN); WLAN_BSSID_LEN);
if (result) { if (result) {
pr_debug pr_debug
("getconfig(0x%02x) failed, result = %d\n", ("getconfig(0x%02x) failed, result = %d\n",
@ -1286,8 +1288,8 @@ void prism2sta_processing_defer(struct work_struct *data)
/* Collect the port status */ /* Collect the port status */
result = hfa384x_drvr_getconfig16(hw, result = hfa384x_drvr_getconfig16(hw,
HFA384x_RID_PORTSTATUS, HFA384x_RID_PORTSTATUS,
&portstatus); &portstatus);
if (result) { if (result) {
pr_debug pr_debug
("getconfig(0x%02x) failed, result = %d\n", ("getconfig(0x%02x) failed, result = %d\n",
@ -1322,7 +1324,7 @@ void prism2sta_processing_defer(struct work_struct *data)
&joinreq, &joinreq,
HFA384x_RID_JOINREQUEST_LEN); HFA384x_RID_JOINREQUEST_LEN);
printk(KERN_INFO printk(KERN_INFO
"linkstatus=DISCONNECTED (re-submitting join)\n"); "linkstatus=DISCONNECTED (re-submitting join)\n");
} else { } else {
if (wlandev->netdev->type == ARPHRD_ETHER) if (wlandev->netdev->type == ARPHRD_ETHER)
printk(KERN_INFO printk(KERN_INFO
@ -1509,14 +1511,15 @@ static void prism2sta_inf_assocstatus(wlandevice_t *wlandev,
rec.reason = le16_to_cpu(rec.reason); rec.reason = le16_to_cpu(rec.reason);
/* /*
** Find the address in the list of authenticated stations. If it wasn't ** Find the address in the list of authenticated stations.
** found, then this address has not been previously authenticated and ** If it wasn't found, then this address has not been previously
** something weird has happened if this is anything other than an ** authenticated and something weird has happened if this is
** "authentication failed" message. If the address was found, then ** anything other than an "authentication failed" message.
** set the "associated" flag for that station, based on whether the ** If the address was found, then set the "associated" flag for
** station is associating or losing its association. Something weird ** that station, based on whether the station is associating or
** has also happened if we find the address in the list of authenticated ** losing its association. Something weird has also happened
** stations but we are getting an "authentication failed" message. ** if we find the address in the list of authenticated stations
** but we are getting an "authentication failed" message.
*/ */
for (i = 0; i < hw->authlist.cnt; i++) for (i = 0; i < hw->authlist.cnt; i++)
@ -1526,7 +1529,7 @@ static void prism2sta_inf_assocstatus(wlandevice_t *wlandev,
if (i >= hw->authlist.cnt) { if (i >= hw->authlist.cnt) {
if (rec.assocstatus != HFA384x_ASSOCSTATUS_AUTHFAIL) if (rec.assocstatus != HFA384x_ASSOCSTATUS_AUTHFAIL)
printk(KERN_WARNING printk(KERN_WARNING
"assocstatus info frame received for non-authenticated station.\n"); "assocstatus info frame received for non-authenticated station.\n");
} else { } else {
hw->authlist.assoc[i] = hw->authlist.assoc[i] =
(rec.assocstatus == HFA384x_ASSOCSTATUS_STAASSOC || (rec.assocstatus == HFA384x_ASSOCSTATUS_STAASSOC ||
@ -1534,7 +1537,7 @@ static void prism2sta_inf_assocstatus(wlandevice_t *wlandev,
if (rec.assocstatus == HFA384x_ASSOCSTATUS_AUTHFAIL) if (rec.assocstatus == HFA384x_ASSOCSTATUS_AUTHFAIL)
printk(KERN_WARNING printk(KERN_WARNING
"authfail assocstatus info frame received for authenticated station.\n"); "authfail assocstatus info frame received for authenticated station.\n");
} }
return; return;
@ -1681,12 +1684,12 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev,
} }
/* /*
** If the authentication is okay, then add the MAC address to the list ** If the authentication is okay, then add the MAC address to the
** of authenticated stations. Don't add the address if it is already in ** list of authenticated stations. Don't add the address if it
** the list. (802.11b does not seem to disallow a station from issuing ** is already in the list. (802.11b does not seem to disallow
** an authentication request when the station is already authenticated. ** a station from issuing an authentication request when the
** Does this sort of thing ever happen? We might as well do the check ** station is already authenticated. Does this sort of thing
** just in case.) ** ever happen? We might as well do the check just in case.)
*/ */
added = 0; added = 0;
@ -1931,7 +1934,7 @@ void prism2sta_ev_alloc(wlandevice_t *wlandev)
* the created wlandevice_t structure. * the created wlandevice_t structure.
* *
* Side effects: * Side effects:
* also allocates the priv/hw structures. * also allocates the priv/hw structures.
* *
* Call context: * Call context:
* process thread * process thread
@ -1995,9 +1998,9 @@ void prism2sta_commsqual_defer(struct work_struct *data)
/* It only makes sense to poll these in non-IBSS */ /* It only makes sense to poll these in non-IBSS */
if (wlandev->macmode != WLAN_MACMODE_IBSS_STA) { if (wlandev->macmode != WLAN_MACMODE_IBSS_STA) {
result = hfa384x_drvr_getconfig(hw, HFA384x_RID_DBMCOMMSQUALITY, result = hfa384x_drvr_getconfig(
&hw->qual, hw, HFA384x_RID_DBMCOMMSQUALITY,
HFA384x_RID_DBMCOMMSQUALITY_LEN); &hw->qual, HFA384x_RID_DBMCOMMSQUALITY_LEN);
if (result) { if (result) {
printk(KERN_ERR "error fetching commsqual\n"); printk(KERN_ERR "error fetching commsqual\n");