summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>2011-10-10 12:17:09 +0200
committerPhilippe LANGLAIS <philippe.langlais@stericsson.com>2011-10-13 10:24:06 +0200
commit76d54824478f3d14eadde3e83f12ced24483739f (patch)
tree20f4ac68d18d38d74553de77a01aa84a8feb5c39
parent847817a7ac38983d030d87d4c1b38e379a26fe8e (diff)
cw1200: Fix checkpatch warnings.
Change-Id: Ibda6002f9ce429dabcc098bb2a88a4ca7e3cf5a4 Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33543 Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com> Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
-rwxr-xr-xdrivers/staging/cw1200/ap.c54
-rw-r--r--drivers/staging/cw1200/bh.c2
-rw-r--r--drivers/staging/cw1200/cw1200.h2
-rw-r--r--drivers/staging/cw1200/cw1200_sdio.c2
-rw-r--r--drivers/staging/cw1200/fwio.c4
-rw-r--r--drivers/staging/cw1200/pm.c4
-rw-r--r--drivers/staging/cw1200/sta.c27
-rw-r--r--drivers/staging/cw1200/txrx.c18
-rw-r--r--drivers/staging/cw1200/wsm.c10
9 files changed, 64 insertions, 59 deletions
diff --git a/drivers/staging/cw1200/ap.c b/drivers/staging/cw1200/ap.c
index 7b1ac0dfada..cd74143e47e 100755
--- a/drivers/staging/cw1200/ap.c
+++ b/drivers/staging/cw1200/ap.c
@@ -38,7 +38,7 @@ static void __cw1200_sta_notify(struct ieee80211_hw *dev,
/* AP API */
int cw1200_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
- struct ieee80211_sta *sta)
+ struct ieee80211_sta *sta)
{
struct cw1200_common *priv = hw->priv;
struct cw1200_sta_priv *sta_priv =
@@ -67,7 +67,7 @@ int cw1200_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
}
int cw1200_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
- struct ieee80211_sta *sta)
+ struct ieee80211_sta *sta)
{
struct cw1200_common *priv = hw->priv;
struct cw1200_sta_priv *sta_priv =
@@ -101,26 +101,26 @@ static void __cw1200_sta_notify(struct ieee80211_hw *dev,
u32 prev = priv->sta_asleep_mask & bit;
switch (notify_cmd) {
- case STA_NOTIFY_SLEEP:
- if (!prev) {
- if (priv->buffered_multicasts &&
+ case STA_NOTIFY_SLEEP:
+ if (!prev) {
+ if (priv->buffered_multicasts &&
!priv->sta_asleep_mask)
queue_work(priv->workqueue,
&priv->multicast_start_work);
- priv->sta_asleep_mask |= bit;
- }
- break;
- case STA_NOTIFY_AWAKE:
- if (prev) {
- priv->sta_asleep_mask &= ~bit;
- priv->pspoll_mask &= ~bit;
- if (priv->tx_multicast &&
- !priv->sta_asleep_mask)
- queue_work(priv->workqueue,
- &priv->multicast_stop_work);
- cw1200_bh_wakeup(priv);
- }
- break;
+ priv->sta_asleep_mask |= bit;
+ }
+ break;
+ case STA_NOTIFY_AWAKE:
+ if (prev) {
+ priv->sta_asleep_mask &= ~bit;
+ priv->pspoll_mask &= ~bit;
+ if (priv->tx_multicast &&
+ !priv->sta_asleep_mask)
+ queue_work(priv->workqueue,
+ &priv->multicast_stop_work);
+ cw1200_bh_wakeup(priv);
+ }
+ break;
}
}
@@ -172,7 +172,7 @@ static int cw1200_set_tim_impl(struct cw1200_common *priv, bool aid0_bit_set)
skb = ieee80211_beacon_get_tim(priv->hw, priv->vif,
&tim_offset, &tim_length);
if (!skb) {
- if (!__cw1200_flush(priv, true));
+ if (!__cw1200_flush(priv, true))
wsm_unlock_tx(priv);
return -ENOENT;
}
@@ -295,7 +295,7 @@ void cw1200_bss_info_changed(struct ieee80211_hw *dev,
* In case of more IPs arp filtering will be disabled. */
if (info->arp_addr_cnt > 0 &&
info->arp_addr_cnt <= WSM_MAX_ARP_IP_ADDRTABLE_ENTRIES) {
- for(i=0; i<info->arp_addr_cnt;i++) {
+ for (i = 0; i < info->arp_addr_cnt; i++) {
filter.ipv4Address[i] = info->arp_addr_list[i];
ap_printk(KERN_DEBUG "[STA] addr[%d]: 0x%X\n",
i, filter.ipv4Address[i]);
@@ -330,7 +330,7 @@ void cw1200_bss_info_changed(struct ieee80211_hw *dev,
if (changed & BSS_CHANGED_BEACON_INT) {
ap_printk(KERN_DEBUG "CHANGED_BEACON_INT\n");
/* Restart AP only when connected */
- if(priv->join_status == CW1200_JOIN_STATUS_AP)
+ if (priv->join_status == CW1200_JOIN_STATUS_AP)
WARN_ON(cw1200_update_beaconing(priv));
}
@@ -520,7 +520,8 @@ void cw1200_bss_info_changed(struct ieee80211_hw *dev,
info->cqm_rssi_hyst = 4;
#endif /* 0 */
- ap_printk(KERN_DEBUG "[CQM] RSSI threshold subscribe: %d +- %d\n",
+ ap_printk(KERN_DEBUG "[CQM] RSSI threshold "
+ "subscribe: %d +- %d\n",
info->cqm_rssi_thold, info->cqm_rssi_hyst);
#if defined(CONFIG_CW1200_USE_STE_EXTENSIONS)
ap_printk(KERN_DEBUG "[CQM] Beacon loss subscribe: %d\n",
@@ -590,8 +591,8 @@ void cw1200_multicast_start_work(struct work_struct *work)
void cw1200_multicast_stop_work(struct work_struct *work)
{
- struct cw1200_common *priv =
- container_of(work, struct cw1200_common, multicast_stop_work);
+ struct cw1200_common *priv =
+ container_of(work, struct cw1200_common, multicast_stop_work);
if (priv->aid0_bit_set) {
wsm_lock_tx(priv);
@@ -803,7 +804,8 @@ static int cw1200_start_ap(struct cw1200_common *priv)
memset(&priv->link_id_db, 0, sizeof(priv->link_id_db));
- ap_printk(KERN_DEBUG "[AP] ch: %d(%d), bcn: %d(%d), brt: 0x%.8X, ssid: %.*s.\n",
+ ap_printk(KERN_DEBUG "[AP] ch: %d(%d), bcn: %d(%d), "
+ "brt: 0x%.8X, ssid: %.*s.\n",
start.channelNumber, start.band,
start.beaconInterval, start.DTIMPeriod,
start.basicRateSet,
diff --git a/drivers/staging/cw1200/bh.c b/drivers/staging/cw1200/bh.c
index 80efc7dba67..978e97592ce 100644
--- a/drivers/staging/cw1200/bh.c
+++ b/drivers/staging/cw1200/bh.c
@@ -433,7 +433,7 @@ tx:
u8 *data;
int ret;
- if (priv->device_can_sleep) {
+ if (priv->device_can_sleep) {
ret = cw1200_device_wakeup(priv);
if (WARN_ON(ret < 0))
break;
diff --git a/drivers/staging/cw1200/cw1200.h b/drivers/staging/cw1200/cw1200.h
index ae08d82fe19..239c3a9f3b9 100644
--- a/drivers/staging/cw1200/cw1200.h
+++ b/drivers/staging/cw1200/cw1200.h
@@ -233,7 +233,7 @@ struct cw1200_common {
};
struct cw1200_sta_priv {
- int link_id;
+ int link_id;
};
/* interfaces for the drivers */
diff --git a/drivers/staging/cw1200/cw1200_sdio.c b/drivers/staging/cw1200/cw1200_sdio.c
index fb594ff1567..b04f31e0684 100644
--- a/drivers/staging/cw1200/cw1200_sdio.c
+++ b/drivers/staging/cw1200/cw1200_sdio.c
@@ -286,7 +286,7 @@ static size_t cw1200_sdio_align_size(struct sbus_priv *self, size_t size)
static int cw1200_sdio_pm(struct sbus_priv *self, bool suspend)
{
int ret;
- const struct resource *irq = self->pdata->irq;
+ const struct resource *irq = self->pdata->irq;
struct sdio_func *func = self->func;
sdio_claim_host(func);
diff --git a/drivers/staging/cw1200/fwio.c b/drivers/staging/cw1200/fwio.c
index da6d3705e6c..72b77bc8bb0 100644
--- a/drivers/staging/cw1200/fwio.c
+++ b/drivers/staging/cw1200/fwio.c
@@ -438,7 +438,7 @@ int cw1200_load_firmware(struct cw1200_common *priv)
ret = cw1200_ahb_read_32(priv, CW1200_CUT2_ID_ADDR + 4, &ar2);
if (ret) {
cw1200_dbg(CW1200_DBG_ERROR,
- "%s: (2) HW detection: can't read CUT ID.\n",
+ "%s: (2) HW detection: can't read CUT ID.\n",
__func__);
goto out;
}
@@ -446,7 +446,7 @@ int cw1200_load_firmware(struct cw1200_common *priv)
ret = cw1200_ahb_read_32(priv, CW1200_CUT2_ID_ADDR + 8, &ar3);
if (ret) {
cw1200_dbg(CW1200_DBG_ERROR,
- "%s: (3) HW detection: can't read CUT ID.\n",
+ "%s: (3) HW detection: can't read CUT ID.\n",
__func__);
goto out;
}
diff --git a/drivers/staging/cw1200/pm.c b/drivers/staging/cw1200/pm.c
index 3d7570767ed..7b2ba504cb2 100644
--- a/drivers/staging/cw1200/pm.c
+++ b/drivers/staging/cw1200/pm.c
@@ -17,7 +17,7 @@
#include "sbus.h"
static int cw1200_suspend_late(struct device *dev);
-static void cw1200_pm_release(struct device * dev);
+static void cw1200_pm_release(struct device *dev);
static int cw1200_pm_probe(struct platform_device *pdev);
/* private */
@@ -29,7 +29,7 @@ struct cw1200_suspend_state {
unsigned long link_id_gc;
};
-static struct dev_pm_ops cw1200_pm_ops = {
+static const struct dev_pm_ops cw1200_pm_ops = {
.suspend_noirq = cw1200_suspend_late,
};
diff --git a/drivers/staging/cw1200/sta.c b/drivers/staging/cw1200/sta.c
index 1ba769df65d..ddc73e45744 100644
--- a/drivers/staging/cw1200/sta.c
+++ b/drivers/staging/cw1200/sta.c
@@ -140,8 +140,8 @@ void cw1200_stop(struct ieee80211_hw *dev)
/* HACK! */
if (atomic_xchg(&priv->tx_lock, 1) != 1)
- sta_printk(KERN_DEBUG "[STA] TX is force-unlocked due to stop " \
- "request.\n");
+ sta_printk(KERN_DEBUG "[STA] TX is force-unlocked "
+ "due to stop request.\n");
wsm_unlock_tx(priv);
@@ -255,7 +255,8 @@ int cw1200_config(struct ieee80211_hw *dev, u32 changed)
/* TODO: IEEE80211_CONF_CHANGE_QOS */
if (changed & IEEE80211_CONF_CHANGE_POWER) {
priv->output_power = conf->power_level;
- sta_printk(KERN_DEBUG "[STA] TX power: %d\n", priv->output_power);
+ sta_printk(KERN_DEBUG "[STA] TX power: %d\n",
+ priv->output_power);
WARN_ON(wsm_set_output_power(priv, priv->output_power * 10));
}
@@ -332,14 +333,14 @@ int cw1200_config(struct ieee80211_hw *dev, u32 changed)
modeinfo->oppPsCTWindow = conf->p2p_ps.ctwindow;
switch (conf->p2p_ps.opp_ps) {
- case 0:
- modeinfo->oppPsCTWindow &= ~(BIT(7));
- break;
- case 1:
- modeinfo->oppPsCTWindow |= BIT(7);
- break;
- default:
- break;
+ case 0:
+ modeinfo->oppPsCTWindow &= ~(BIT(7));
+ break;
+ case 1:
+ modeinfo->oppPsCTWindow |= BIT(7);
+ break;
+ default:
+ break;
}
/* Notice of Absence */
@@ -348,7 +349,7 @@ int cw1200_config(struct ieee80211_hw *dev, u32 changed)
modeinfo->duration = __cpu_to_le32(conf->p2p_ps.duration);
modeinfo->interval = __cpu_to_le32(conf->p2p_ps.interval);
- if(conf->p2p_ps.count)
+ if (conf->p2p_ps.count)
modeinfo->dtimCount = 1;
else
modeinfo->dtimCount = 0;
@@ -358,7 +359,7 @@ int cw1200_config(struct ieee80211_hw *dev, u32 changed)
#if defined(CONFIG_CW1200_STA_DEBUG)
print_hex_dump_bytes("p2p_ps_modeinfo: ",
DUMP_PREFIX_NONE,
- (u8*) modeinfo,
+ (u8 *)modeinfo,
sizeof(*modeinfo));
#endif
WARN_ON(wsm_set_p2p_ps_modeinfo(priv, modeinfo));
diff --git a/drivers/staging/cw1200/txrx.c b/drivers/staging/cw1200/txrx.c
index 72f5acdccdc..109ea2a0286 100644
--- a/drivers/staging/cw1200/txrx.c
+++ b/drivers/staging/cw1200/txrx.c
@@ -468,9 +468,8 @@ cw1200_tx_h_crypt(struct cw1200_common *priv,
iv_len = t->tx_info->control.hw_key->iv_len;
icv_len = t->tx_info->control.hw_key->icv_len;
- if (t->tx_info->control.hw_key->cipher == WLAN_CIPHER_SUITE_TKIP) {
+ if (t->tx_info->control.hw_key->cipher == WLAN_CIPHER_SUITE_TKIP)
icv_len += 8; /* MIC */
- }
if ((skb_headroom(t->skb) + skb_tailroom(t->skb) <
iv_len + icv_len + WSM_TX_EXTRA_HEADROOM) ||
@@ -587,8 +586,7 @@ cw1200_tx_h_bt(struct cw1200_common *priv,
u16 *ethertype = (u16 *) &payload[6];
if (unlikely(*ethertype == __be16_to_cpu(ETH_P_PAE)))
priority = WSM_EPTA_PRIORITY_EAPOL;
- }
- else if (unlikely(ieee80211_is_assoc_req(t->hdr->frame_control) ||
+ } else if (unlikely(ieee80211_is_assoc_req(t->hdr->frame_control) ||
ieee80211_is_reassoc_req(t->hdr->frame_control))) {
struct ieee80211_mgmt *mgt_frame =
(struct ieee80211_mgmt *)t->hdr;
@@ -708,7 +706,8 @@ void cw1200_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
if (WARN_ON(t.queue >= 4 || !t.rate))
goto drop;
- if ((ret = cw1200_tx_h_calc_link_ids(priv, &t)))
+ ret = cw1200_tx_h_calc_link_ids(priv, &t);
+ if (ret)
goto drop;
txrx_printk(KERN_DEBUG "[TX] TX %d bytes "
@@ -718,11 +717,14 @@ void cw1200_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
cw1200_tx_h_pm(priv, &t);
cw1200_tx_h_calc_tid(priv, &t);
- if ((ret = cw1200_tx_h_crypt(priv, &t)))
+ ret = cw1200_tx_h_crypt(priv, &t);
+ if (ret)
goto drop;
- if ((ret = cw1200_tx_h_align(priv, &t)))
+ ret = cw1200_tx_h_align(priv, &t);
+ if (ret)
goto drop;
- if ((ret = cw1200_tx_h_action(priv, &t)))
+ ret = cw1200_tx_h_action(priv, &t);
+ if (ret)
goto drop;
wsm = cw1200_tx_h_wsm(priv, &t);
if (!wsm) {
diff --git a/drivers/staging/cw1200/wsm.c b/drivers/staging/cw1200/wsm.c
index 16996def7b2..f279b5a310d 100644
--- a/drivers/staging/cw1200/wsm.c
+++ b/drivers/staging/cw1200/wsm.c
@@ -422,9 +422,8 @@ static int wsm_join_confirm(struct cw1200_common *priv,
struct wsm_join *arg,
struct wsm_buf *buf)
{
- if (WARN_ON(WSM_GET32(buf) != WSM_STATUS_SUCCESS)) {
+ if (WARN_ON(WSM_GET32(buf) != WSM_STATUS_SUCCESS))
return -EINVAL;
- }
arg->minPowerLevel = WSM_GET32(buf);
arg->maxPowerLevel = WSM_GET32(buf);
@@ -1172,7 +1171,7 @@ underflow:
"Firmware exception.\n");
print_hex_dump_bytes("Exception: ", DUMP_PREFIX_NONE,
data, len);
- return -EINVAL;
+ return -EINVAL;
}
int wsm_handle_rx(struct cw1200_common *priv, int id,
@@ -1297,7 +1296,8 @@ int wsm_handle_rx(struct cw1200_common *priv, int id,
ret = wsm_find_complete_indication(priv, &wsm_buf);
break;
case 0x080C:
- ret = wsm_suspend_resume_indication(priv, link_id, &wsm_buf);
+ ret = wsm_suspend_resume_indication(priv,
+ link_id, &wsm_buf);
break;
default:
STUB();
@@ -1513,7 +1513,7 @@ static bool wsm_handle_tx_data(struct cw1200_common *priv,
static int wsm_get_tx_queue_and_mask(struct cw1200_common *priv,
struct cw1200_queue **queue_p,
- u32* tx_allowed_mask_p,
+ u32 *tx_allowed_mask_p,
bool *more)
{
int i;