Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Eliad Peller and committed by
John W. Linville
5e74b3aa 9bccb8ae

+17 -17
+1 -1
drivers/net/wireless/ti/wl12xx/main.c
··· 1668 1668 { 1669 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 1672 thold = wl->conf.tx.fast_link_thold; 1673 1673 else 1674 1674 thold = wl->conf.tx.slow_link_thold;
+8 -8
drivers/net/wireless/ti/wl18xx/main.c
··· 1609 1609 u8 thold; 1610 1610 struct wl18xx_fw_status_priv *status_priv = 1611 1611 (struct wl18xx_fw_status_priv *)wl->fw_status->priv; 1612 - u32 suspend_bitmap; 1612 + unsigned long suspend_bitmap; 1613 1613 1614 1614 /* if we don't have the link map yet, assume they all low prio */ 1615 1615 if (!status_priv) ··· 1617 1617 1618 1618 /* suspended links are never high priority */ 1619 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 1621 return false; 1622 1622 1623 1623 /* the priority thresholds are taken from FW */ 1624 - if (test_bit(hlid, (unsigned long *)&wl->fw_fast_lnk_map) && 1625 - !test_bit(hlid, (unsigned long *)&wl->ap_fw_ps_map)) 1624 + if (test_bit(hlid, &wl->fw_fast_lnk_map) && 1625 + !test_bit(hlid, &wl->ap_fw_ps_map)) 1626 1626 thold = status_priv->tx_fast_link_prio_threshold; 1627 1627 else 1628 1628 thold = status_priv->tx_slow_link_prio_threshold; ··· 1636 1636 u8 thold; 1637 1637 struct wl18xx_fw_status_priv *status_priv = 1638 1638 (struct wl18xx_fw_status_priv *)wl->fw_status->priv; 1639 - u32 suspend_bitmap; 1639 + unsigned long suspend_bitmap; 1640 1640 1641 1641 /* if we don't have the link map yet, assume they all low prio */ 1642 1642 if (!status_priv) 1643 1643 return true; 1644 1644 1645 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 1647 thold = status_priv->tx_suspend_threshold; 1648 - else if (test_bit(hlid, (unsigned long *)&wl->fw_fast_lnk_map) && 1649 - !test_bit(hlid, (unsigned long *)&wl->ap_fw_ps_map)) 1648 + else if (test_bit(hlid, &wl->fw_fast_lnk_map) && 1649 + !test_bit(hlid, &wl->ap_fw_ps_map)) 1650 1650 thold = status_priv->tx_fast_stop_threshold; 1651 1651 else 1652 1652 thold = status_priv->tx_slow_stop_threshold;
+1 -1
drivers/net/wireless/ti/wlcore/debugfs.c
··· 496 496 DRIVER_STATE_PRINT_INT(sg_enabled); 497 497 DRIVER_STATE_PRINT_INT(enable_11a); 498 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 500 DRIVER_STATE_PRINT_LHEX(ap_ps_map); 501 501 DRIVER_STATE_PRINT_HEX(quirks); 502 502 DRIVER_STATE_PRINT_HEX(irq);
+4 -4
drivers/net/wireless/ti/wlcore/main.c
··· 333 333 { 334 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 339 * Wake up from high level PS if the STA is asleep with too little ··· 360 360 struct wl12xx_vif *wlvif, 361 361 struct wl_fw_status *status) 362 362 { 363 - u32 cur_fw_ps_map; 363 + unsigned long cur_fw_ps_map; 364 364 u8 hlid; 365 365 366 366 cur_fw_ps_map = status->link_ps_bitmap; 367 367 if (wl->ap_fw_ps_map != cur_fw_ps_map) { 368 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 370 wl->ap_fw_ps_map, cur_fw_ps_map, 371 371 wl->ap_fw_ps_map ^ cur_fw_ps_map); 372 372 ··· 4754 4754 4755 4755 clear_bit(hlid, wlvif->ap.sta_hlid_map); 4756 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 4760 * save the last used PN in the private part of iee80211_sta,
+1 -1
drivers/net/wireless/ti/wlcore/tx.c
··· 126 126 if (WARN_ON(!test_bit(hlid, wlvif->links_map))) 127 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 130 tx_pkts = wl->links[hlid].allocated_pkts; 131 131 132 132 /*
+2 -2
drivers/net/wireless/ti/wlcore/wlcore.h
··· 388 388 int active_link_count; 389 389 390 390 /* Fast/slow links bitmap according to FW */ 391 - u32 fw_fast_lnk_map; 391 + unsigned long fw_fast_lnk_map; 392 392 393 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 396 /* AP-mode - a bitmap of links currently in PS mode in mac80211 */ 397 397 unsigned long ap_ps_map;