diff options
author | Eliad Peller <eliad@wizery.com> | 2014-07-10 20:01:39 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-07-15 16:00:02 -0400 |
commit | 5e74b3aa6ffd80128e3df605bf27d8a6a3c04997 (patch) | |
tree | bd4a489fad7a81801500bf6c035c3288631ff234 /drivers/net/wireless/ti | |
parent | 9bccb8ae054fda9ab51e3291eeee545ecc1f1854 (diff) |
wlcore/wl18xx/wl12xx: convert bitmaps to unsigned longs
The *_bit operations expect unsigned longs.
Instead of casting the pointers, simply define various
bitmaps as unsigned long (instead of u32).
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ti')
-rw-r--r-- | drivers/net/wireless/ti/wl12xx/main.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wl18xx/main.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/debugfs.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/main.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/tx.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/wlcore.h | 4 |
6 files changed, 17 insertions, 17 deletions
diff --git a/drivers/net/wireless/ti/wl12xx/main.c b/drivers/net/wireless/ti/wl12xx/main.c index d50dfac91631..0bccf123831e 100644 --- a/drivers/net/wireless/ti/wl12xx/main.c +++ b/drivers/net/wireless/ti/wl12xx/main.c | |||
@@ -1668,7 +1668,7 @@ static bool wl12xx_lnk_high_prio(struct wl1271 *wl, u8 hlid, | |||
1668 | { | 1668 | { |
1669 | u8 thold; | 1669 | u8 thold; |
1670 | 1670 | ||
1671 | if (test_bit(hlid, (unsigned long *)&wl->fw_fast_lnk_map)) | 1671 | if (test_bit(hlid, &wl->fw_fast_lnk_map)) |
1672 | thold = wl->conf.tx.fast_link_thold; | 1672 | thold = wl->conf.tx.fast_link_thold; |
1673 | else | 1673 | else |
1674 | thold = wl->conf.tx.slow_link_thold; | 1674 | thold = wl->conf.tx.slow_link_thold; |
diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c index edc3e4d8966d..7af1936719eb 100644 --- a/drivers/net/wireless/ti/wl18xx/main.c +++ b/drivers/net/wireless/ti/wl18xx/main.c | |||
@@ -1609,7 +1609,7 @@ static bool wl18xx_lnk_high_prio(struct wl1271 *wl, u8 hlid, | |||
1609 | u8 thold; | 1609 | u8 thold; |
1610 | struct wl18xx_fw_status_priv *status_priv = | 1610 | struct wl18xx_fw_status_priv *status_priv = |
1611 | (struct wl18xx_fw_status_priv *)wl->fw_status->priv; | 1611 | (struct wl18xx_fw_status_priv *)wl->fw_status->priv; |
1612 | u32 suspend_bitmap; | 1612 | unsigned long suspend_bitmap; |
1613 | 1613 | ||
1614 | /* if we don't have the link map yet, assume they all low prio */ | 1614 | /* if we don't have the link map yet, assume they all low prio */ |
1615 | if (!status_priv) | 1615 | if (!status_priv) |
@@ -1617,12 +1617,12 @@ static bool wl18xx_lnk_high_prio(struct wl1271 *wl, u8 hlid, | |||
1617 | 1617 | ||
1618 | /* suspended links are never high priority */ | 1618 | /* suspended links are never high priority */ |
1619 | suspend_bitmap = le32_to_cpu(status_priv->link_suspend_bitmap); | 1619 | suspend_bitmap = le32_to_cpu(status_priv->link_suspend_bitmap); |
1620 | if (test_bit(hlid, (unsigned long *)&suspend_bitmap)) | 1620 | if (test_bit(hlid, &suspend_bitmap)) |
1621 | return false; | 1621 | return false; |
1622 | 1622 | ||
1623 | /* the priority thresholds are taken from FW */ | 1623 | /* the priority thresholds are taken from FW */ |
1624 | if (test_bit(hlid, (unsigned long *)&wl->fw_fast_lnk_map) && | 1624 | if (test_bit(hlid, &wl->fw_fast_lnk_map) && |
1625 | !test_bit(hlid, (unsigned long *)&wl->ap_fw_ps_map)) | 1625 | !test_bit(hlid, &wl->ap_fw_ps_map)) |
1626 | thold = status_priv->tx_fast_link_prio_threshold; | 1626 | thold = status_priv->tx_fast_link_prio_threshold; |
1627 | else | 1627 | else |
1628 | thold = status_priv->tx_slow_link_prio_threshold; | 1628 | thold = status_priv->tx_slow_link_prio_threshold; |
@@ -1636,17 +1636,17 @@ static bool wl18xx_lnk_low_prio(struct wl1271 *wl, u8 hlid, | |||
1636 | u8 thold; | 1636 | u8 thold; |
1637 | struct wl18xx_fw_status_priv *status_priv = | 1637 | struct wl18xx_fw_status_priv *status_priv = |
1638 | (struct wl18xx_fw_status_priv *)wl->fw_status->priv; | 1638 | (struct wl18xx_fw_status_priv *)wl->fw_status->priv; |
1639 | u32 suspend_bitmap; | 1639 | unsigned long suspend_bitmap; |
1640 | 1640 | ||
1641 | /* if we don't have the link map yet, assume they all low prio */ | 1641 | /* if we don't have the link map yet, assume they all low prio */ |
1642 | if (!status_priv) | 1642 | if (!status_priv) |
1643 | return true; | 1643 | return true; |
1644 | 1644 | ||
1645 | suspend_bitmap = le32_to_cpu(status_priv->link_suspend_bitmap); | 1645 | suspend_bitmap = le32_to_cpu(status_priv->link_suspend_bitmap); |
1646 | if (test_bit(hlid, (unsigned long *)&suspend_bitmap)) | 1646 | if (test_bit(hlid, &suspend_bitmap)) |
1647 | thold = status_priv->tx_suspend_threshold; | 1647 | thold = status_priv->tx_suspend_threshold; |
1648 | else if (test_bit(hlid, (unsigned long *)&wl->fw_fast_lnk_map) && | 1648 | else if (test_bit(hlid, &wl->fw_fast_lnk_map) && |
1649 | !test_bit(hlid, (unsigned long *)&wl->ap_fw_ps_map)) | 1649 | !test_bit(hlid, &wl->ap_fw_ps_map)) |
1650 | thold = status_priv->tx_fast_stop_threshold; | 1650 | thold = status_priv->tx_fast_stop_threshold; |
1651 | else | 1651 | else |
1652 | thold = status_priv->tx_slow_stop_threshold; | 1652 | thold = status_priv->tx_slow_stop_threshold; |
diff --git a/drivers/net/wireless/ti/wlcore/debugfs.c b/drivers/net/wireless/ti/wlcore/debugfs.c index 89893c717025..0be21f62fcb0 100644 --- a/drivers/net/wireless/ti/wlcore/debugfs.c +++ b/drivers/net/wireless/ti/wlcore/debugfs.c | |||
@@ -496,7 +496,7 @@ static ssize_t driver_state_read(struct file *file, char __user *user_buf, | |||
496 | DRIVER_STATE_PRINT_INT(sg_enabled); | 496 | DRIVER_STATE_PRINT_INT(sg_enabled); |
497 | DRIVER_STATE_PRINT_INT(enable_11a); | 497 | DRIVER_STATE_PRINT_INT(enable_11a); |
498 | DRIVER_STATE_PRINT_INT(noise); | 498 | DRIVER_STATE_PRINT_INT(noise); |
499 | DRIVER_STATE_PRINT_HEX(ap_fw_ps_map); | 499 | DRIVER_STATE_PRINT_LHEX(ap_fw_ps_map); |
500 | DRIVER_STATE_PRINT_LHEX(ap_ps_map); | 500 | DRIVER_STATE_PRINT_LHEX(ap_ps_map); |
501 | DRIVER_STATE_PRINT_HEX(quirks); | 501 | DRIVER_STATE_PRINT_HEX(quirks); |
502 | DRIVER_STATE_PRINT_HEX(irq); | 502 | DRIVER_STATE_PRINT_HEX(irq); |
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index ec211413ffe6..575c8f6d4009 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c | |||
@@ -333,7 +333,7 @@ static void wl12xx_irq_ps_regulate_link(struct wl1271 *wl, | |||
333 | { | 333 | { |
334 | bool fw_ps; | 334 | bool fw_ps; |
335 | 335 | ||
336 | fw_ps = test_bit(hlid, (unsigned long *)&wl->ap_fw_ps_map); | 336 | fw_ps = test_bit(hlid, &wl->ap_fw_ps_map); |
337 | 337 | ||
338 | /* | 338 | /* |
339 | * Wake up from high level PS if the STA is asleep with too little | 339 | * Wake up from high level PS if the STA is asleep with too little |
@@ -360,13 +360,13 @@ static void wl12xx_irq_update_links_status(struct wl1271 *wl, | |||
360 | struct wl12xx_vif *wlvif, | 360 | struct wl12xx_vif *wlvif, |
361 | struct wl_fw_status *status) | 361 | struct wl_fw_status *status) |
362 | { | 362 | { |
363 | u32 cur_fw_ps_map; | 363 | unsigned long cur_fw_ps_map; |
364 | u8 hlid; | 364 | u8 hlid; |
365 | 365 | ||
366 | cur_fw_ps_map = status->link_ps_bitmap; | 366 | cur_fw_ps_map = status->link_ps_bitmap; |
367 | if (wl->ap_fw_ps_map != cur_fw_ps_map) { | 367 | if (wl->ap_fw_ps_map != cur_fw_ps_map) { |
368 | wl1271_debug(DEBUG_PSM, | 368 | wl1271_debug(DEBUG_PSM, |
369 | "link ps prev 0x%x cur 0x%x changed 0x%x", | 369 | "link ps prev 0x%lx cur 0x%lx changed 0x%lx", |
370 | wl->ap_fw_ps_map, cur_fw_ps_map, | 370 | wl->ap_fw_ps_map, cur_fw_ps_map, |
371 | wl->ap_fw_ps_map ^ cur_fw_ps_map); | 371 | wl->ap_fw_ps_map ^ cur_fw_ps_map); |
372 | 372 | ||
@@ -4754,7 +4754,7 @@ void wl1271_free_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 hlid) | |||
4754 | 4754 | ||
4755 | clear_bit(hlid, wlvif->ap.sta_hlid_map); | 4755 | clear_bit(hlid, wlvif->ap.sta_hlid_map); |
4756 | __clear_bit(hlid, &wl->ap_ps_map); | 4756 | __clear_bit(hlid, &wl->ap_ps_map); |
4757 | __clear_bit(hlid, (unsigned long *)&wl->ap_fw_ps_map); | 4757 | __clear_bit(hlid, &wl->ap_fw_ps_map); |
4758 | 4758 | ||
4759 | /* | 4759 | /* |
4760 | * save the last used PN in the private part of iee80211_sta, | 4760 | * save the last used PN in the private part of iee80211_sta, |
diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c index 40b43115f835..f0ac36139bcc 100644 --- a/drivers/net/wireless/ti/wlcore/tx.c +++ b/drivers/net/wireless/ti/wlcore/tx.c | |||
@@ -126,7 +126,7 @@ static void wl1271_tx_regulate_link(struct wl1271 *wl, | |||
126 | if (WARN_ON(!test_bit(hlid, wlvif->links_map))) | 126 | if (WARN_ON(!test_bit(hlid, wlvif->links_map))) |
127 | return; | 127 | return; |
128 | 128 | ||
129 | fw_ps = test_bit(hlid, (unsigned long *)&wl->ap_fw_ps_map); | 129 | fw_ps = test_bit(hlid, &wl->ap_fw_ps_map); |
130 | tx_pkts = wl->links[hlid].allocated_pkts; | 130 | tx_pkts = wl->links[hlid].allocated_pkts; |
131 | 131 | ||
132 | /* | 132 | /* |
diff --git a/drivers/net/wireless/ti/wlcore/wlcore.h b/drivers/net/wireless/ti/wlcore/wlcore.h index 13459c4f74d0..df78cf12ef15 100644 --- a/drivers/net/wireless/ti/wlcore/wlcore.h +++ b/drivers/net/wireless/ti/wlcore/wlcore.h | |||
@@ -388,10 +388,10 @@ struct wl1271 { | |||
388 | int active_link_count; | 388 | int active_link_count; |
389 | 389 | ||
390 | /* Fast/slow links bitmap according to FW */ | 390 | /* Fast/slow links bitmap according to FW */ |
391 | u32 fw_fast_lnk_map; | 391 | unsigned long fw_fast_lnk_map; |
392 | 392 | ||
393 | /* AP-mode - a bitmap of links currently in PS mode according to FW */ | 393 | /* AP-mode - a bitmap of links currently in PS mode according to FW */ |
394 | u32 ap_fw_ps_map; | 394 | unsigned long ap_fw_ps_map; |
395 | 395 | ||
396 | /* AP-mode - a bitmap of links currently in PS mode in mac80211 */ | 396 | /* AP-mode - a bitmap of links currently in PS mode in mac80211 */ |
397 | unsigned long ap_ps_map; | 397 | unsigned long ap_ps_map; |