Commit 27575665 authored by Tim Collier's avatar Tim Collier Committed by Greg Kroah-Hartman

staging: wlan-ng: make switch case block format consistent

For switch statements with case blocks make the format consistent by
applying K&R formatting, a space before the opening brace, single
indentation of contained code, break inside the block and closing
brace aligned with case.
Signed-off-by: default avatarTim Collier <osdevtc@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 04950c3f
......@@ -3605,36 +3605,34 @@ static void hfa384x_usbout_callback(struct urb *urb)
prism2sta_ev_alloc(wlandev);
break;
case -EPIPE:
{
struct hfa384x *hw = wlandev->priv;
case -EPIPE: {
struct hfa384x *hw = wlandev->priv;
netdev_warn(hw->wlandev->netdev,
"%s tx pipe stalled: requesting reset\n",
wlandev->netdev->name);
if (!test_and_set_bit
(WORK_TX_HALT, &hw->usb_flags))
schedule_work(&hw->usb_work);
wlandev->netdev->stats.tx_errors++;
break;
}
netdev_warn(hw->wlandev->netdev,
"%s tx pipe stalled: requesting reset\n",
wlandev->netdev->name);
if (!test_and_set_bit
(WORK_TX_HALT, &hw->usb_flags))
schedule_work(&hw->usb_work);
wlandev->netdev->stats.tx_errors++;
break;
}
case -EPROTO:
case -ETIMEDOUT:
case -EILSEQ:
{
struct hfa384x *hw = wlandev->priv;
if (!test_and_set_bit
(THROTTLE_TX, &hw->usb_flags) &&
!timer_pending(&hw->throttle)) {
mod_timer(&hw->throttle,
jiffies + THROTTLE_JIFFIES);
}
wlandev->netdev->stats.tx_errors++;
netif_stop_queue(wlandev->netdev);
break;
case -EILSEQ: {
struct hfa384x *hw = wlandev->priv;
if (!test_and_set_bit
(THROTTLE_TX, &hw->usb_flags) &&
!timer_pending(&hw->throttle)) {
mod_timer(&hw->throttle,
jiffies + THROTTLE_JIFFIES);
}
wlandev->netdev->stats.tx_errors++;
netif_stop_queue(wlandev->netdev);
break;
}
case -ENOENT:
case -ESHUTDOWN:
......
......@@ -172,7 +172,7 @@ static void p80211req_handlemsg(struct wlandevice *wlandev,
struct p80211msg *msg)
{
switch (msg->msgcode) {
case DIDMSG_LNXREQ_HOSTWEP:{
case DIDMSG_LNXREQ_HOSTWEP: {
struct p80211msg_lnxreq_hostwep *req =
(struct p80211msg_lnxreq_hostwep *)msg;
wlandev->hostwep &=
......@@ -182,15 +182,15 @@ static void p80211req_handlemsg(struct wlandevice *wlandev,
if (req->encrypt.data == P80211ENUM_truth_true)
wlandev->hostwep |= HOSTWEP_ENCRYPT;
break;
break;
}
case DIDMSG_DOT11REQ_MIBGET:
case DIDMSG_DOT11REQ_MIBSET:{
case DIDMSG_DOT11REQ_MIBSET: {
int isget = (msg->msgcode == DIDMSG_DOT11REQ_MIBGET);
struct p80211msg_dot11req_mibget *mib_msg =
(struct p80211msg_dot11req_mibget *)msg;
p80211req_mibset_mibget(wlandev, mib_msg, isget);
break;
break;
}
} /* switch msg->msgcode */
}
......@@ -215,7 +215,7 @@ static void p80211req_mibset_mibget(struct wlandevice *wlandev,
key, pstr->len);
break;
case DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID:{
case DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID: {
u32 *data = (u32 *)mibitem->data;
if (isget) {
......@@ -224,21 +224,21 @@ static void p80211req_mibset_mibget(struct wlandevice *wlandev,
wlandev->hostwep &= ~(HOSTWEP_DEFAULTKEY_MASK);
wlandev->hostwep |= (*data & HOSTWEP_DEFAULTKEY_MASK);
}
break;
break;
}
case DIDMIB_DOT11SMT_PRIVACYTABLE_PRIVACYINVOKED:{
case DIDMIB_DOT11SMT_PRIVACYTABLE_PRIVACYINVOKED: {
u32 *data = (u32 *)mibitem->data;
p80211req_handle_action(wlandev, data, isget,
HOSTWEP_PRIVACYINVOKED);
break;
break;
}
case DIDMIB_DOT11SMT_PRIVACYTABLE_EXCLUDEUNENCRYPTED:{
case DIDMIB_DOT11SMT_PRIVACYTABLE_EXCLUDEUNENCRYPTED: {
u32 *data = (u32 *)mibitem->data;
p80211req_handle_action(wlandev, data, isget,
HOSTWEP_EXCLUDEUNENCRYPTED);
break;
break;
}
}
}
......@@ -707,27 +707,27 @@ static int prism2mib_priv(struct mibrec *mib,
struct p80211pstrd *pstr = data;
switch (mib->did) {
case DIDMIB_LNX_CONFIGTABLE_RSNAIE:{
struct hfa384x_wpa_data wpa;
case DIDMIB_LNX_CONFIGTABLE_RSNAIE: {
struct hfa384x_wpa_data wpa;
if (isget) {
hfa384x_drvr_getconfig(hw,
HFA384x_RID_CNFWPADATA,
(u8 *)&wpa,
sizeof(wpa));
pstr->len = le16_to_cpu(wpa.datalen);
memcpy(pstr->data, wpa.data, pstr->len);
} else {
wpa.datalen = cpu_to_le16(pstr->len);
memcpy(wpa.data, pstr->data, pstr->len);
hfa384x_drvr_setconfig(hw,
HFA384x_RID_CNFWPADATA,
(u8 *)&wpa,
sizeof(wpa));
}
break;
if (isget) {
hfa384x_drvr_getconfig(hw,
HFA384x_RID_CNFWPADATA,
(u8 *)&wpa,
sizeof(wpa));
pstr->len = le16_to_cpu(wpa.datalen);
memcpy(pstr->data, wpa.data, pstr->len);
} else {
wpa.datalen = cpu_to_le16(pstr->len);
memcpy(wpa.data, pstr->data, pstr->len);
hfa384x_drvr_setconfig(hw,
HFA384x_RID_CNFWPADATA,
(u8 *)&wpa,
sizeof(wpa));
}
break;
}
default:
netdev_err(wlandev->netdev, "Unhandled DID 0x%08x\n", mib->did);
}
......
......@@ -336,21 +336,20 @@ static int prism2sta_mlmerequest(struct wlandevice *wlandev,
*/
case DIDMSG_LNXREQ_HOSTWEP:
break; /* ignore me. */
case DIDMSG_LNXREQ_IFSTATE:
{
struct p80211msg_lnxreq_ifstate *ifstatemsg;
pr_debug("Received mlme ifstate request\n");
ifstatemsg = (struct p80211msg_lnxreq_ifstate *)msg;
result =
prism2sta_ifstate(wlandev,
ifstatemsg->ifstate.data);
ifstatemsg->resultcode.status =
P80211ENUM_msgitem_status_data_ok;
ifstatemsg->resultcode.data = result;
result = 0;
}
case DIDMSG_LNXREQ_IFSTATE: {
struct p80211msg_lnxreq_ifstate *ifstatemsg;
pr_debug("Received mlme ifstate request\n");
ifstatemsg = (struct p80211msg_lnxreq_ifstate *)msg;
result =
prism2sta_ifstate(wlandev,
ifstatemsg->ifstate.data);
ifstatemsg->resultcode.status =
P80211ENUM_msgitem_status_data_ok;
ifstatemsg->resultcode.data = result;
result = 0;
break;
}
case DIDMSG_LNXREQ_WLANSNIFF:
pr_debug("Received mlme wlansniff request\n");
result = prism2mgmt_wlansniff(wlandev, msg);
......@@ -359,28 +358,28 @@ static int prism2sta_mlmerequest(struct wlandevice *wlandev,
pr_debug("Received mlme autojoin request\n");
result = prism2mgmt_autojoin(wlandev, msg);
break;
case DIDMSG_LNXREQ_COMMSQUALITY:{
struct p80211msg_lnxreq_commsquality *qualmsg;
case DIDMSG_LNXREQ_COMMSQUALITY: {
struct p80211msg_lnxreq_commsquality *qualmsg;
pr_debug("Received commsquality request\n");
pr_debug("Received commsquality request\n");
qualmsg = (struct p80211msg_lnxreq_commsquality *)msg;
qualmsg = (struct p80211msg_lnxreq_commsquality *)msg;
qualmsg->link.status =
P80211ENUM_msgitem_status_data_ok;
qualmsg->level.status =
P80211ENUM_msgitem_status_data_ok;
qualmsg->noise.status =
P80211ENUM_msgitem_status_data_ok;
qualmsg->link.status =
P80211ENUM_msgitem_status_data_ok;
qualmsg->level.status =
P80211ENUM_msgitem_status_data_ok;
qualmsg->noise.status =
P80211ENUM_msgitem_status_data_ok;
qualmsg->link.data = le16_to_cpu(hw->qual.cq_curr_bss);
qualmsg->level.data =
le16_to_cpu(hw->qual.asl_curr_bss);
qualmsg->noise.data = le16_to_cpu(hw->qual.anl_curr_fc);
qualmsg->txrate.data = hw->txrate;
qualmsg->link.data = le16_to_cpu(hw->qual.cq_curr_bss);
qualmsg->level.data =
le16_to_cpu(hw->qual.asl_curr_bss);
qualmsg->noise.data = le16_to_cpu(hw->qual.anl_curr_fc);
qualmsg->txrate.data = hw->txrate;
break;
}
break;
}
default:
netdev_warn(wlandev->netdev,
"Unknown mgmt request message 0x%08x",
......
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