diff options
author | Christian Lamparter <chunkeey@web.de> | 2009-01-07 10:40:08 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 15:59:57 -0500 |
commit | acbaf32e94cb70218792cac68e5149e482e77441 (patch) | |
tree | 409e171a6033421da5f7ea0c610ff0db6bb4a40b | |
parent | 64d74681433415855da02d2516f28d2ed859cde9 (diff) |
p54: return NETDEV_TX_OK in p54_tx and fix sparse warnings
This patch addresses all recent comments from Johannes Berg:
1st: (reference http://marc.info/?l=linux-wireless&m=123124685019631 )
>First off: all those should return NETDEV_TX_OK/BUSY.
>iwl-agn: returns 0 (== NETDEV_TX_OK, but still should be changed)
>[...]
>p54: same (some paths)
2nd:
> due to your PS patch ("p54: power save management"), please run sparse:
> make C=2 CF=-D__CHECK_ENDIAN__ M=...
> +drivers/net/wireless/p54/p54common.c:1753:8: warning: incorrect type in assignment (different base types)
> +drivers/net/wireless/p54/p54common.c:1769:29: warning: incorrect type in assignment (different base types)
The cpu_to_le16 ended up in the wrong line... Sorry!
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/p54/p54common.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c index 6c175df48b0d..e463c7c3a7e0 100644 --- a/drivers/net/wireless/p54/p54common.c +++ b/drivers/net/wireless/p54/p54common.c | |||
@@ -1532,7 +1532,7 @@ static int p54_tx(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
1532 | queue_delayed_work(dev->workqueue, &priv->work, | 1532 | queue_delayed_work(dev->workqueue, &priv->work, |
1533 | msecs_to_jiffies(P54_TX_FRAME_LIFETIME)); | 1533 | msecs_to_jiffies(P54_TX_FRAME_LIFETIME)); |
1534 | 1534 | ||
1535 | return 0; | 1535 | return NETDEV_TX_OK; |
1536 | 1536 | ||
1537 | err: | 1537 | err: |
1538 | skb_pull(skb, sizeof(*hdr) + sizeof(*txhdr) + padding); | 1538 | skb_pull(skb, sizeof(*hdr) + sizeof(*txhdr) + padding); |
@@ -1774,7 +1774,7 @@ static int p54_set_ps(struct ieee80211_hw *dev) | |||
1774 | int i; | 1774 | int i; |
1775 | 1775 | ||
1776 | if (dev->conf.flags & IEEE80211_CONF_PS) | 1776 | if (dev->conf.flags & IEEE80211_CONF_PS) |
1777 | mode = cpu_to_le16(P54_PSM | P54_PSM_DTIM | P54_PSM_MCBC); | 1777 | mode = P54_PSM | P54_PSM_DTIM | P54_PSM_MCBC; |
1778 | else | 1778 | else |
1779 | mode = P54_PSM_CAM; | 1779 | mode = P54_PSM_CAM; |
1780 | 1780 | ||
@@ -1790,7 +1790,7 @@ static int p54_set_ps(struct ieee80211_hw *dev) | |||
1790 | for (i = 0; i < ARRAY_SIZE(psm->intervals); i++) { | 1790 | for (i = 0; i < ARRAY_SIZE(psm->intervals); i++) { |
1791 | psm->intervals[i].interval = | 1791 | psm->intervals[i].interval = |
1792 | cpu_to_le16(dev->conf.listen_interval); | 1792 | cpu_to_le16(dev->conf.listen_interval); |
1793 | psm->intervals[i].periods = 1; | 1793 | psm->intervals[i].periods = cpu_to_le16(1); |
1794 | } | 1794 | } |
1795 | 1795 | ||
1796 | psm->beacon_rssi_skip_max = 60; | 1796 | psm->beacon_rssi_skip_max = 60; |