Browse Source

net: fix assignment of 0/1 to bool variables.

DaveM said:
   Please, this kind of stuff rots forever and not using bool properly
   drives me crazy.

Joe Perches <joe@perches.com> gave me the spatch script:

	@@
	bool b;
	@@
	-b = 0
	+b = false
	@@
	bool b;
	@@
	-b = 1
	+b = true

I merely installed coccinelle, read the documentation and took credit.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
imx_3.10.17_1.0.0_ga
Rusty Russell 9 years ago
committed by David S. Miller
parent
commit
3db1cd5c05
60 changed files with 288 additions and 288 deletions
  1. +4
    -4
      drivers/net/ethernet/broadcom/tg3.c
  2. +3
    -3
      drivers/net/ethernet/brocade/bna/bnad.c
  3. +2
    -2
      drivers/net/ethernet/dec/tulip/de4x5.c
  4. +5
    -5
      drivers/net/ethernet/intel/e1000/e1000_main.c
  5. +12
    -12
      drivers/net/ethernet/intel/e1000e/netdev.c
  6. +1
    -1
      drivers/net/ethernet/intel/ixgb/ixgb_main.c
  7. +1
    -1
      drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
  8. +1
    -1
      drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
  9. +6
    -6
      drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
  10. +1
    -1
      drivers/net/ethernet/sfc/falcon.c
  11. +3
    -3
      drivers/net/ethernet/sfc/mtd.c
  12. +1
    -1
      drivers/net/ethernet/sfc/siena.c
  13. +2
    -2
      drivers/net/ethernet/tile/tilepro.c
  14. +3
    -3
      drivers/net/ethernet/xilinx/xilinx_emaclite.c
  15. +4
    -4
      drivers/net/wimax/i2400m/tx.c
  16. +2
    -2
      drivers/net/wireless/ath/ath5k/reset.c
  17. +1
    -1
      drivers/net/wireless/ath/ath6kl/init.c
  18. +1
    -1
      drivers/net/wireless/ath/ath9k/eeprom_def.c
  19. +2
    -2
      drivers/net/wireless/ath/ath9k/xmit.c
  20. +7
    -7
      drivers/net/wireless/b43/dma.c
  21. +8
    -8
      drivers/net/wireless/b43/leds.c
  22. +4
    -4
      drivers/net/wireless/b43/lo.c
  23. +50
    -50
      drivers/net/wireless/b43/main.c
  24. +4
    -4
      drivers/net/wireless/b43/phy_common.c
  25. +17
    -17
      drivers/net/wireless/b43/phy_g.c
  26. +4
    -4
      drivers/net/wireless/b43/phy_lp.c
  27. +2
    -2
      drivers/net/wireless/b43/phy_n.c
  28. +3
    -3
      drivers/net/wireless/b43/pio.c
  29. +2
    -2
      drivers/net/wireless/b43/xmit.c
  30. +8
    -8
      drivers/net/wireless/b43legacy/dma.c
  31. +2
    -2
      drivers/net/wireless/b43legacy/leds.c
  32. +32
    -32
      drivers/net/wireless/b43legacy/main.c
  33. +10
    -10
      drivers/net/wireless/b43legacy/radio.c
  34. +2
    -2
      drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
  35. +2
    -2
      drivers/net/wireless/brcm80211/brcmsmac/dma.c
  36. +1
    -1
      drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
  37. +16
    -16
      drivers/net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c
  38. +1
    -1
      drivers/net/wireless/iwmc3200wifi/main.c
  39. +6
    -6
      drivers/net/wireless/iwmc3200wifi/rx.c
  40. +2
    -2
      drivers/net/wireless/libertas/if_cs.c
  41. +2
    -2
      drivers/net/wireless/libertas_tf/main.c
  42. +2
    -2
      drivers/net/wireless/mac80211_hwsim.c
  43. +4
    -4
      drivers/net/wireless/mwl8k.c
  44. +1
    -1
      drivers/net/wireless/rtlwifi/base.c
  45. +3
    -3
      drivers/net/wireless/rtlwifi/pci.c
  46. +2
    -2
      drivers/net/wireless/rtlwifi/rtl8192ce/sw.c
  47. +1
    -1
      drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
  48. +2
    -2
      drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
  49. +2
    -2
      drivers/net/wireless/rtlwifi/rtl8192de/sw.c
  50. +2
    -2
      drivers/net/wireless/rtlwifi/rtl8192se/sw.c
  51. +1
    -1
      net/caif/caif_usb.c
  52. +8
    -8
      net/dccp/feat.c
  53. +1
    -1
      net/dccp/options.c
  54. +2
    -2
      net/ipv4/tcp_timer.c
  55. +2
    -2
      net/mac80211/rc80211_pid_algo.c
  56. +1
    -1
      net/mac80211/scan.c
  57. +2
    -2
      net/netfilter/ipvs/ip_vs_pe_sip.c
  58. +3
    -3
      net/rfkill/rfkill-regulator.c
  59. +7
    -7
      net/rxrpc/ar-ack.c
  60. +2
    -2
      net/rxrpc/ar-output.c

+ 4
- 4
drivers/net/ethernet/broadcom/tg3.c View File

@ -6425,13 +6425,13 @@ static bool tg3_tx_frag_set(struct tg3_napi *tnapi, u32 *entry, u32 *budget,
bool hwbug = false;
if (tg3_flag(tp, SHORT_DMA_BUG) && len <= 8)
hwbug = 1;
hwbug = true;
if (tg3_4g_overflow_test(map, len))
hwbug = 1;
hwbug = true;
if (tg3_40bit_overflow_test(tp, map, len))
hwbug = 1;
hwbug = true;
if (tp->dma_limit) {
u32 prvidx = *entry;
@ -6464,7 +6464,7 @@ static bool tg3_tx_frag_set(struct tg3_napi *tnapi, u32 *entry, u32 *budget,
*budget -= 1;
*entry = NEXT_TX(*entry);
} else {
hwbug = 1;
hwbug = true;
tnapi->tx_buffers[prvidx].fragmented = false;
}
}


+ 3
- 3
drivers/net/ethernet/brocade/bna/bnad.c View File

@ -723,7 +723,7 @@ void
bnad_cb_ethport_link_status(struct bnad *bnad,
enum bna_link_status link_status)
{
bool link_up = 0;
bool link_up = false;
link_up = (link_status == BNA_LINK_UP) || (link_status == BNA_CEE_UP);
@ -3190,7 +3190,7 @@ bnad_pci_init(struct bnad *bnad,
goto disable_device;
if (!dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)) &&
!dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64))) {
*using_dac = 1;
*using_dac = true;
} else {
err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
if (err) {
@ -3199,7 +3199,7 @@ bnad_pci_init(struct bnad *bnad,
if (err)
goto release_regions;
}
*using_dac = 0;
*using_dac = false;
}
pci_set_master(pdev);
return 0;


+ 2
- 2
drivers/net/ethernet/dec/tulip/de4x5.c View File

@ -5191,7 +5191,7 @@ de4x5_parse_params(struct net_device *dev)
struct de4x5_private *lp = netdev_priv(dev);
char *p, *q, t;
lp->params.fdx = 0;
lp->params.fdx = false;
lp->params.autosense = AUTO;
if (args == NULL) return;
@ -5201,7 +5201,7 @@ de4x5_parse_params(struct net_device *dev)
t = *q;
*q = '\0';
if (strstr(p, "fdx") || strstr(p, "FDX")) lp->params.fdx = 1;
if (strstr(p, "fdx") || strstr(p, "FDX")) lp->params.fdx = true;
if (strstr(p, "autosense") || strstr(p, "AUTOSENSE")) {
if (strstr(p, "TP")) {


+ 5
- 5
drivers/net/ethernet/intel/e1000/e1000_main.c View File

@ -1185,7 +1185,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
if (global_quad_port_a != 0)
adapter->eeprom_wol = 0;
else
adapter->quad_port_a = 1;
adapter->quad_port_a = true;
/* Reset for multiple quad port adapters */
if (++global_quad_port_a == 4)
global_quad_port_a = 0;
@ -1679,7 +1679,7 @@ static void e1000_configure_tx(struct e1000_adapter *adapter)
* need this to apply a workaround later in the send path. */
if (hw->mac_type == e1000_82544 &&
hw->bus_type == e1000_bus_type_pcix)
adapter->pcix_82544 = 1;
adapter->pcix_82544 = true;
ew32(TCTL, tctl);
@ -2002,7 +2002,7 @@ static void e1000_clean_tx_ring(struct e1000_adapter *adapter,
tx_ring->next_to_use = 0;
tx_ring->next_to_clean = 0;
tx_ring->last_tx_tso = 0;
tx_ring->last_tx_tso = false;
writel(0, hw->hw_addr + tx_ring->tdh);
writel(0, hw->hw_addr + tx_ring->tdt);
@ -2851,7 +2851,7 @@ static int e1000_tx_map(struct e1000_adapter *adapter,
* DMA'd to the controller */
if (!skb->data_len && tx_ring->last_tx_tso &&
!skb_is_gso(skb)) {
tx_ring->last_tx_tso = 0;
tx_ring->last_tx_tso = false;
size -= 4;
}
@ -3219,7 +3219,7 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
if (likely(tso)) {
if (likely(hw->mac_type != e1000_82544))
tx_ring->last_tx_tso = 1;
tx_ring->last_tx_tso = true;
tx_flags |= E1000_TX_FLAGS_TSO;
} else if (likely(e1000_tx_csum(adapter, tx_ring, skb)))
tx_flags |= E1000_TX_FLAGS_CSUM;


+ 12
- 12
drivers/net/ethernet/intel/e1000e/netdev.c View File

@ -859,7 +859,7 @@ static bool e1000_clean_rx_irq(struct e1000_adapter *adapter,
u32 length, staterr;
unsigned int i;
int cleaned_count = 0;
bool cleaned = 0;
bool cleaned = false;
unsigned int total_rx_bytes = 0, total_rx_packets = 0;
i = rx_ring->next_to_clean;
@ -888,7 +888,7 @@ static bool e1000_clean_rx_irq(struct e1000_adapter *adapter,
next_buffer = &rx_ring->buffer_info[i];
cleaned = 1;
cleaned = true;
cleaned_count++;
dma_unmap_single(&pdev->dev,
buffer_info->dma,
@ -1157,7 +1157,7 @@ static bool e1000_clean_tx_irq(struct e1000_adapter *adapter)
* Detect a transmit hang in hardware, this serializes the
* check with the clearing of time_stamp and movement of i
*/
adapter->detect_tx_hung = 0;
adapter->detect_tx_hung = false;
if (tx_ring->buffer_info[i].time_stamp &&
time_after(jiffies, tx_ring->buffer_info[i].time_stamp
+ (adapter->tx_timeout_factor * HZ)) &&
@ -1192,7 +1192,7 @@ static bool e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
unsigned int i, j;
u32 length, staterr;
int cleaned_count = 0;
bool cleaned = 0;
bool cleaned = false;
unsigned int total_rx_bytes = 0, total_rx_packets = 0;
i = rx_ring->next_to_clean;
@ -1218,7 +1218,7 @@ static bool e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
next_buffer = &rx_ring->buffer_info[i];
cleaned = 1;
cleaned = true;
cleaned_count++;
dma_unmap_single(&pdev->dev, buffer_info->dma,
adapter->rx_ps_bsize0, DMA_FROM_DEVICE);
@ -4257,7 +4257,7 @@ static void e1000_print_link_info(struct e1000_adapter *adapter)
static bool e1000e_has_link(struct e1000_adapter *adapter)
{
struct e1000_hw *hw = &adapter->hw;
bool link_active = 0;
bool link_active = false;
s32 ret_val = 0;
/*
@ -4272,7 +4272,7 @@ static bool e1000e_has_link(struct e1000_adapter *adapter)
ret_val = hw->mac.ops.check_for_link(hw);
link_active = !hw->mac.get_link_status;
} else {
link_active = 1;
link_active = true;
}
break;
case e1000_media_type_fiber:
@ -4371,7 +4371,7 @@ static void e1000_watchdog_task(struct work_struct *work)
if (link) {
if (!netif_carrier_ok(netdev)) {
bool txb2b = 1;
bool txb2b = true;
/* Cancel scheduled suspend requests. */
pm_runtime_resume(netdev->dev.parent);
@ -4404,11 +4404,11 @@ static void e1000_watchdog_task(struct work_struct *work)
adapter->tx_timeout_factor = 1;
switch (adapter->link_speed) {
case SPEED_10:
txb2b = 0;
txb2b = false;
adapter->tx_timeout_factor = 16;
break;
case SPEED_100:
txb2b = 0;
txb2b = false;
adapter->tx_timeout_factor = 10;
break;
}
@ -4544,7 +4544,7 @@ link_up:
e1000e_flush_descriptors(adapter);
/* Force detection of hung controller every watchdog period */
adapter->detect_tx_hung = 1;
adapter->detect_tx_hung = true;
/*
* With 82571 controllers, LAA may be overwritten due to controller
@ -6208,7 +6208,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
/* Initialize link parameters. User can change them with ethtool */
adapter->hw.mac.autoneg = 1;
adapter->fc_autoneg = 1;
adapter->fc_autoneg = true;
adapter->hw.fc.requested_mode = e1000_fc_default;
adapter->hw.fc.current_mode = e1000_fc_default;
adapter->hw.phy.autoneg_advertised = 0x2f;


+ 1
- 1
drivers/net/ethernet/intel/ixgb/ixgb_main.c View File

@ -228,7 +228,7 @@ ixgb_up(struct ixgb_adapter *adapter)
if (IXGB_READ_REG(&adapter->hw, STATUS) & IXGB_STATUS_PCIX_MODE) {
err = pci_enable_msi(adapter->pdev);
if (!err) {
adapter->have_msi = 1;
adapter->have_msi = true;
irq_flags = 0;
}
/* proceed to try to request regular interrupt */


+ 1
- 1
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c View File

@ -2599,7 +2599,7 @@ s32 ixgbe_enable_rx_dma_generic(struct ixgbe_hw *hw, u32 regval)
s32 ixgbe_blink_led_start_generic(struct ixgbe_hw *hw, u32 index)
{
ixgbe_link_speed speed = 0;
bool link_up = 0;
bool link_up = false;
u32 autoc_reg = IXGBE_READ_REG(hw, IXGBE_AUTOC);
u32 led_reg = IXGBE_READ_REG(hw, IXGBE_LEDCTL);


+ 1
- 1
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c View File

@ -4023,7 +4023,7 @@ void ixgbe_down(struct ixgbe_adapter *adapter)
/* Mark all the VFs as inactive */
for (i = 0 ; i < adapter->num_vfs; i++)
adapter->vfinfo[i].clear_to_send = 0;
adapter->vfinfo[i].clear_to_send = false;
/* ping all the active vfs to let them know we are going down */
ixgbe_ping_all_vfs(adapter);


+ 6
- 6
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c View File

@ -1214,7 +1214,7 @@ s32 ixgbe_read_i2c_byte_generic(struct ixgbe_hw *hw, u8 byte_offset,
u32 max_retry = 10;
u32 retry = 0;
u16 swfw_mask = 0;
bool nack = 1;
bool nack = true;
*data = 0;
if (IXGBE_READ_REG(hw, IXGBE_STATUS) & IXGBE_STATUS_LAN_ID_1)
@ -1421,7 +1421,7 @@ static void ixgbe_i2c_stop(struct ixgbe_hw *hw)
static s32 ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data)
{
s32 i;
bool bit = 0;
bool bit = false;
for (i = 7; i >= 0; i--) {
ixgbe_clock_in_i2c_bit(hw, &bit);
@ -1443,7 +1443,7 @@ static s32 ixgbe_clock_out_i2c_byte(struct ixgbe_hw *hw, u8 data)
s32 status = 0;
s32 i;
u32 i2cctl;
bool bit = 0;
bool bit = false;
for (i = 7; i >= 0; i--) {
bit = (data >> i) & 0x1;
@ -1473,7 +1473,7 @@ static s32 ixgbe_get_i2c_ack(struct ixgbe_hw *hw)
u32 i = 0;
u32 i2cctl = IXGBE_READ_REG(hw, IXGBE_I2CCTL);
u32 timeout = 10;
bool ack = 1;
bool ack = true;
ixgbe_raise_i2c_clk(hw, &i2cctl);
@ -1646,9 +1646,9 @@ static bool ixgbe_get_i2c_data(u32 *i2cctl)
bool data;
if (*i2cctl & IXGBE_I2C_DATA_IN)
data = 1;
data = true;
else
data = 0;
data = false;
return data;
}


+ 1
- 1
drivers/net/ethernet/sfc/falcon.c View File

@ -610,7 +610,7 @@ static void falcon_stats_complete(struct efx_nic *efx)
if (!nic_data->stats_pending)
return;
nic_data->stats_pending = 0;
nic_data->stats_pending = false;
if (*nic_data->stats_dma_done == FALCON_STATS_DONE) {
rmb(); /* read the done flag before the stats */
efx->mac_op->update_stats(efx);


+ 3
- 3
drivers/net/ethernet/sfc/mtd.c View File

@ -496,7 +496,7 @@ static int siena_mtd_erase(struct mtd_info *mtd, loff_t start, size_t len)
rc = efx_mcdi_nvram_update_start(efx, part->mcdi.nvram_type);
if (rc)
goto out;
part->mcdi.updating = 1;
part->mcdi.updating = true;
}
/* The MCDI interface can in fact do multiple erase blocks at once;
@ -528,7 +528,7 @@ static int siena_mtd_write(struct mtd_info *mtd, loff_t start,
rc = efx_mcdi_nvram_update_start(efx, part->mcdi.nvram_type);
if (rc)
goto out;
part->mcdi.updating = 1;
part->mcdi.updating = true;
}
while (offset < end) {
@ -553,7 +553,7 @@ static int siena_mtd_sync(struct mtd_info *mtd)
int rc = 0;
if (part->mcdi.updating) {
part->mcdi.updating = 0;
part->mcdi.updating = false;
rc = efx_mcdi_nvram_update_finish(efx, part->mcdi.nvram_type);
}


+ 1
- 1
drivers/net/ethernet/sfc/siena.c View File

@ -232,7 +232,7 @@ static int siena_probe_nvconfig(struct efx_nic *efx)
static int siena_probe_nic(struct efx_nic *efx)
{
struct siena_nic_data *nic_data;
bool already_attached = 0;
bool already_attached = false;
efx_oword_t reg;
int rc;


+ 2
- 2
drivers/net/ethernet/tile/tilepro.c View File

@ -1256,7 +1256,7 @@ static void tile_net_stop_aux(struct net_device *dev)
sizeof(dummy), NETIO_IPP_STOP_SHIM_OFF) < 0)
panic("Failed to stop LIPP/LEPP!\n");
priv->partly_opened = 0;
priv->partly_opened = false;
}
@ -1507,7 +1507,7 @@ static int tile_net_open(struct net_device *dev)
priv->network_cpus_count, priv->network_cpus_credits);
#endif
priv->partly_opened = 1;
priv->partly_opened = true;
} else {
/* FIXME: Is this possible? */


+ 3
- 3
drivers/net/ethernet/xilinx/xilinx_emaclite.c View File

@ -662,7 +662,7 @@ static void xemaclite_rx_handler(struct net_device *dev)
*/
static irqreturn_t xemaclite_interrupt(int irq, void *dev_id)
{
bool tx_complete = 0;
bool tx_complete = false;
struct net_device *dev = dev_id;
struct net_local *lp = netdev_priv(dev);
void __iomem *base_addr = lp->base_addr;
@ -683,7 +683,7 @@ static irqreturn_t xemaclite_interrupt(int irq, void *dev_id)
tx_status &= ~XEL_TSR_XMIT_ACTIVE_MASK;
out_be32(base_addr + XEL_TSR_OFFSET, tx_status);
tx_complete = 1;
tx_complete = true;
}
/* Check if the Transmission for the second buffer is completed */
@ -695,7 +695,7 @@ static irqreturn_t xemaclite_interrupt(int irq, void *dev_id)
out_be32(base_addr + XEL_BUFFER_OFFSET + XEL_TSR_OFFSET,
tx_status);
tx_complete = 1;
tx_complete = true;
}
/* If there was a Tx interrupt, call the Tx Handler */


+ 4
- 4
drivers/net/wimax/i2400m/tx.c View File

@ -562,7 +562,7 @@ void i2400m_tx_new(struct i2400m *i2400m)
{
struct device *dev = i2400m_dev(i2400m);
struct i2400m_msg_hdr *tx_msg;
bool try_head = 0;
bool try_head = false;
BUG_ON(i2400m->tx_msg != NULL);
/*
* In certain situations, TX queue might have enough space to
@ -580,7 +580,7 @@ try_head:
else if (tx_msg == TAIL_FULL) {
i2400m_tx_skip_tail(i2400m);
d_printf(2, dev, "new TX message: tail full, trying head\n");
try_head = 1;
try_head = true;
goto try_head;
}
memset(tx_msg, 0, I2400M_TX_PLD_SIZE);
@ -720,7 +720,7 @@ int i2400m_tx(struct i2400m *i2400m, const void *buf, size_t buf_len,
unsigned long flags;
size_t padded_len;
void *ptr;
bool try_head = 0;
bool try_head = false;
unsigned is_singleton = pl_type == I2400M_PT_RESET_WARM
|| pl_type == I2400M_PT_RESET_COLD;
@ -771,7 +771,7 @@ try_new:
d_printf(2, dev, "pl append: tail full\n");
i2400m_tx_close(i2400m);
i2400m_tx_skip_tail(i2400m);
try_head = 1;
try_head = true;
goto try_new;
} else if (ptr == NULL) { /* All full */
result = -ENOSPC;


+ 2
- 2
drivers/net/wireless/ath/ath5k/reset.c View File

@ -1159,7 +1159,7 @@ ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
*/
if (fast && (ah->ah_radio != AR5K_RF2413) &&
(ah->ah_radio != AR5K_RF5413))
fast = 0;
fast = false;
/* Disable sleep clock operation
* to avoid register access delay on certain
@ -1185,7 +1185,7 @@ ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
if (ret && fast) {
ATH5K_DBG(ah, ATH5K_DEBUG_RESET,
"DMA didn't stop, falling back to normal reset\n");
fast = 0;
fast = false;
/* Non fatal, just continue with
* normal reset */
ret = 0;


+ 1
- 1
drivers/net/wireless/ath/ath6kl/init.c View File

@ -361,7 +361,7 @@ static int ath6kl_target_config_wlan_params(struct ath6kl *ar, int idx)
ath6kl_dbg(ATH6KL_DBG_TRC, "failed to request P2P "
"capabilities (%d) - assuming P2P not "
"supported\n", ret);
ar->p2p = 0;
ar->p2p = false;
}
}


+ 1
- 1
drivers/net/wireless/ath/ath9k/eeprom_def.c View File

@ -385,7 +385,7 @@ static int ath9k_hw_def_check_eeprom(struct ath_hw *ah)
if ((ah->hw_version.devid == AR9280_DEVID_PCI) &&
((eep->baseEepHeader.version & 0xff) > 0x0a) &&
(eep->baseEepHeader.pwdclkind == 0))
ah->need_an_top2_fixup = 1;
ah->need_an_top2_fixup = true;
if ((common->bus_ops->ath_bus_type == ATH_USB) &&
(AR_SREV_9280(ah)))


+ 2
- 2
drivers/net/wireless/ath/ath9k/xmit.c View File

@ -1929,7 +1929,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
if (txq == sc->tx.txq_map[q] &&
++txq->pending_frames > ATH_MAX_QDEPTH && !txq->stopped) {
ieee80211_stop_queue(sc->hw, q);
txq->stopped = 1;
txq->stopped = true;
}
ath_tx_start_dma(sc, skb, txctl);
@ -1986,7 +1986,7 @@ static void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb,
if (txq->stopped && txq->pending_frames < ATH_MAX_QDEPTH) {
ieee80211_wake_queue(sc->hw, q);
txq->stopped = 0;
txq->stopped = false;
}
}


+ 7
- 7
drivers/net/wireless/b43/dma.c View File

@ -890,7 +890,7 @@ struct b43_dmaring *b43_setup_dmaring(struct b43_wldev *dev,
else
ring->ops = &dma32_ops;
if (for_tx) {
ring->tx = 1;
ring->tx = true;
ring->current_slot = -1;
} else {
if (ring->index == 0) {
@ -1061,7 +1061,7 @@ void b43_dma_free(struct b43_wldev *dev)
static int b43_dma_set_mask(struct b43_wldev *dev, u64 mask)
{
u64 orig_mask = mask;
bool fallback = 0;
bool fallback = false;
int err;
/* Try to set the DMA mask. If it fails, try falling back to a
@ -1075,12 +1075,12 @@ static int b43_dma_set_mask(struct b43_wldev *dev, u64 mask)
}
if (mask == DMA_BIT_MASK(64)) {
mask = DMA_BIT_MASK(32);
fallback = 1;
fallback = true;
continue;
}
if (mask == DMA_BIT_MASK(32)) {
mask = DMA_BIT_MASK(30);
fallback = 1;
fallback = true;
continue;
}
b43err(dev->wl, "The machine/kernel does not support "
@ -1307,7 +1307,7 @@ static int dma_tx_fragment(struct b43_dmaring *ring,
memset(meta, 0, sizeof(*meta));
meta->skb = skb;
meta->is_last_fragment = 1;
meta->is_last_fragment = true;
priv_info->bouncebuffer = NULL;
meta->dmaaddr = map_descbuffer(ring, skb->data, skb->len, 1);
@ -1466,7 +1466,7 @@ int b43_dma_tx(struct b43_wldev *dev, struct sk_buff *skb)
should_inject_overflow(ring)) {
/* This TX ring is full. */
ieee80211_stop_queue(dev->wl->hw, skb_get_queue_mapping(skb));
ring->stopped = 1;
ring->stopped = true;
if (b43_debug(dev, B43_DBG_DMAVERBOSE)) {
b43dbg(dev->wl, "Stopped TX ring %d\n", ring->index);
}
@ -1585,7 +1585,7 @@ void b43_dma_handle_txstatus(struct b43_wldev *dev,
if (ring->stopped) {
B43_WARN_ON(free_slots(ring) < TX_SLOTS_PER_FRAME);
ieee80211_wake_queue(dev->wl->hw, ring->queue_prio);
ring->stopped = 0;
ring->stopped = false;
if (b43_debug(dev, B43_DBG_DMAVERBOSE)) {
b43dbg(dev->wl, "Woke up TX ring %d\n", ring->index);
}


+ 8
- 8
drivers/net/wireless/b43/leds.c View File

@ -74,7 +74,7 @@ static void b43_led_update(struct b43_wldev *dev,
if (radio_enabled)
turn_on = atomic_read(&led->state) != LED_OFF;
else
turn_on = 0;
turn_on = false;
if (turn_on == led->hw_state)
return;
led->hw_state = turn_on;
@ -225,11 +225,11 @@ static void b43_led_get_sprominfo(struct b43_wldev *dev,
if (sprom[led_index] == 0xFF) {
/* There is no LED information in the SPROM
* for this LED. Hardcode it here. */
*activelow = 0;
*activelow = false;
switch (led_index) {
case 0:
*behaviour = B43_LED_ACTIVITY;
*activelow = 1;
*activelow = true;
if (dev->dev->board_vendor == PCI_VENDOR_ID_COMPAQ)
*behaviour = B43_LED_RADIO_ALL;
break;
@ -267,11 +267,11 @@ void b43_leds_init(struct b43_wldev *dev)
if (led->wl) {
if (dev->phy.radio_on && b43_is_hw_radio_enabled(dev)) {
b43_led_turn_on(dev, led->index, led->activelow);
led->hw_state = 1;
led->hw_state = true;
atomic_set(&led->state, 1);
} else {
b43_led_turn_off(dev, led->index, led->activelow);
led->hw_state = 0;
led->hw_state = false;
atomic_set(&led->state, 0);
}
}
@ -280,19 +280,19 @@ void b43_leds_init(struct b43_wldev *dev)
led = &dev->wl->leds.led_tx;
if (led->wl) {
b43_led_turn_off(dev, led->index, led->activelow);
led->hw_state = 0;
led->hw_state = false;
atomic_set(&led->state, 0);
}
led = &dev->wl->leds.led_rx;
if (led->wl) {
b43_led_turn_off(dev, led->index, led->activelow);
led->hw_state = 0;
led->hw_state = false;
atomic_set(&led->state, 0);
}
led = &dev->wl->leds.led_assoc;
if (led->wl) {
b43_led_turn_off(dev, led->index, led->activelow);
led->hw_state = 0;
led->hw_state = false;
atomic_set(&led->state, 0);
}


+ 4
- 4
drivers/net/wireless/b43/lo.c View File

@ -826,7 +826,7 @@ void b43_gphy_dc_lt_init(struct b43_wldev *dev, bool update_all)
const struct b43_rfatt *rfatt;
const struct b43_bbatt *bbatt;
u64 power_vector;
bool table_changed = 0;
bool table_changed = false;
BUILD_BUG_ON(B43_DC_LT_SIZE != 32);
B43_WARN_ON(lo->rfatt_list.len * lo->bbatt_list.len > 64);
@ -876,7 +876,7 @@ void b43_gphy_dc_lt_init(struct b43_wldev *dev, bool update_all)
lo->dc_lt[idx] = (lo->dc_lt[idx] & 0xFF00)
| (val & 0x00FF);
}
table_changed = 1;
table_changed = true;
}
if (table_changed) {
/* The table changed in memory. Update the hardware table. */
@ -938,7 +938,7 @@ void b43_lo_g_maintanance_work(struct b43_wldev *dev)
unsigned long now;
unsigned long expire;
struct b43_lo_calib *cal, *tmp;
bool current_item_expired = 0;
bool current_item_expired = false;
bool hwpctl;
if (!lo)
@ -968,7 +968,7 @@ void b43_lo_g_maintanance_work(struct b43_wldev *dev)
if (b43_compare_bbatt(&cal->bbatt, &gphy->bbatt) &&
b43_compare_rfatt(&cal->rfatt, &gphy->rfatt)) {
B43_WARN_ON(current_item_expired);
current_item_expired = 1;
current_item_expired = true;
}
if (b43_debug(dev, B43_DBG_LO)) {
b43dbg(dev->wl, "LO: Item BB(%u), RF(%u,%u), "


+ 50
- 50
drivers/net/wireless/b43/main.c View File

@ -1122,17 +1122,17 @@ void b43_power_saving_ctl_bits(struct b43_wldev *dev, unsigned int ps_flags)
B43_WARN_ON((ps_flags & B43_PS_AWAKE) && (ps_flags & B43_PS_ASLEEP));
if (ps_flags & B43_PS_ENABLED) {
hwps = 1;
hwps = true;
} else if (ps_flags & B43_PS_DISABLED) {
hwps = 0;
hwps = false;
} else {
//TODO: If powersave is not off and FIXME is not set and we are not in adhoc
// and thus is not an AP and we are associated, set bit 25
}
if (ps_flags & B43_PS_AWAKE) {
awake = 1;
awake = true;
} else if (ps_flags & B43_PS_ASLEEP) {
awake = 0;
awake = false;
} else {
//TODO: If the device is awake or this is an AP, or we are scanning, or FIXME,
// or we are associated, or FIXME, or the latest PS-Poll packet sent was
@ -1140,8 +1140,8 @@ void b43_power_saving_ctl_bits(struct b43_wldev *dev, unsigned int ps_flags)
}
/* FIXME: For now we force awake-on and hwps-off */
hwps = 0;
awake = 1;
hwps = false;
awake = true;
macctl = b43_read32(dev, B43_MMIO_MACCTL);
if (hwps)
@ -1339,7 +1339,7 @@ static void b43_calculate_link_quality(struct b43_wldev *dev)
return;
if (dev->noisecalc.calculation_running)
return;
dev->noisecalc.calculation_running = 1;
dev->noisecalc.calculation_running = true;
dev->noisecalc.nr_samples = 0;
b43_generate_noise_sample(dev);
@ -1408,7 +1408,7 @@ static void handle_irq_noise(struct b43_wldev *dev)
average -= 48;
dev->stats.link_noise = average;
dev->noisecalc.calculation_running = 0;
dev->noisecalc.calculation_running = false;
return;
}
generate_new:
@ -1424,7 +1424,7 @@ static void handle_irq_tbtt_indication(struct b43_wldev *dev)
b43_power_saving_ctl_bits(dev, 0);
}
if (b43_is_mode(dev->wl, NL80211_IFTYPE_ADHOC))
dev->dfq_valid = 1;
dev->dfq_valid = true;
}
static void handle_irq_atim_end(struct b43_wldev *dev)
@ -1433,7 +1433,7 @@ static void handle_irq_atim_end(struct b43_wldev *dev)
b43_write32(dev, B43_MMIO_MACCMD,
b43_read32(dev, B43_MMIO_MACCMD)
| B43_MACCMD_DFQ_VALID);
dev->dfq_valid = 0;
dev->dfq_valid = false;
}
}
@ -1539,7 +1539,7 @@ static void b43_write_beacon_template(struct b43_wldev *dev,
unsigned int i, len, variable_len;
const struct ieee80211_mgmt *bcn;
const u8 *ie;
bool tim_found = 0;
bool tim_found = false;
unsigned int rate;
u16 ctl;
int antenna;
@ -1588,7 +1588,7 @@ static void b43_write_beacon_template(struct b43_wldev *dev,
/* A valid TIM is at least 4 bytes long. */
if (ie_len < 4)
break;
tim_found = 1;
tim_found = true;
tim_position = sizeof(struct b43_plcp_hdr6);
tim_position += offsetof(struct ieee80211_mgmt, u.beacon.variable);
@ -1625,7 +1625,7 @@ static void b43_upload_beacon0(struct b43_wldev *dev)
if (wl->beacon0_uploaded)
return;
b43_write_beacon_template(dev, 0x68, 0x18);
wl->beacon0_uploaded = 1;
wl->beacon0_uploaded = true;
}
static void b43_upload_beacon1(struct b43_wldev *dev)
@ -1635,7 +1635,7 @@ static void b43_upload_beacon1(struct b43_wldev *dev)
if (wl->beacon1_uploaded)
return;
b43_write_beacon_template(dev, 0x468, 0x1A);
wl->beacon1_uploaded = 1;
wl->beacon1_uploaded = true;
}
static void handle_irq_beacon(struct b43_wldev *dev)
@ -1667,7 +1667,7 @@ static void handle_irq_beacon(struct b43_wldev *dev)
if (unlikely(wl->beacon_templates_virgin)) {
/* We never uploaded a beacon before.
* Upload both templates now, but only mark one valid. */
wl->beacon_templates_virgin = 0;
wl->beacon_templates_virgin = false;
b43_upload_beacon0(dev);
b43_upload_beacon1(dev);
cmd = b43_read32(dev, B43_MMIO_MACCMD);
@ -1755,8 +1755,8 @@ static void b43_update_templates(struct b43_wl *wl)
if (wl->current_beacon)
dev_kfree_skb_any(wl->current_beacon);
wl->current_beacon = beacon;
wl->beacon0_uploaded = 0;
wl->beacon1_uploaded = 0;
wl->beacon0_uploaded = false;
wl->beacon1_uploaded = false;
ieee80211_queue_work(wl->hw, &wl->beacon_update_trigger);
}
@ -1913,7 +1913,7 @@ static void b43_do_interrupt_thread(struct b43_wldev *dev)
b43err(dev->wl, "This device does not support DMA "
"on your system. It will now be switched to PIO.\n");
/* Fall back to PIO transfers if we get fatal DMA errors! */
dev->use_pio = 1;
dev->use_pio = true;
b43_controller_restart(dev, "DMA error");
return;
}
@ -2240,12 +2240,12 @@ static int b43_try_request_fw(struct b43_request_fw_context *ctx)
filename = NULL;
else
goto err_no_pcm;
fw->pcm_request_failed = 0;
fw->pcm_request_failed = false;
err = b43_do_request_fw(ctx, filename, &fw->pcm);
if (err == -ENOENT) {
/* We did not find a PCM file? Not fatal, but
* core rev <= 10 must do without hwcrypto then. */
fw->pcm_request_failed = 1;
fw->pcm_request_failed = true;
} else if (err)
goto err_load;
@ -2535,7 +2535,7 @@ static int b43_upload_microcode(struct b43_wldev *dev)
dev->wl->hw->queues = dev->wl->mac80211_initially_registered_queues;
dev->qos_enabled = !!modparam_qos;
/* Default to firmware/hardware crypto acceleration. */
dev->hwcrypto_enabled = 1;
dev->hwcrypto_enabled = true;
if (dev->fw.opensource) {
u16 fwcapa;
@ -2549,7 +2549,7 @@ static int b43_upload_microcode(struct b43_wldev *dev)
if (!(fwcapa & B43_FWCAPA_HWCRYPTO) || dev->fw.pcm_request_failed) {
b43info(dev->wl, "Hardware crypto acceleration not supported by firmware\n");
/* Disable hardware crypto and fall back to software crypto. */
dev->hwcrypto_enabled = 0;
dev->hwcrypto_enabled = false;
}
if (!(fwcapa & B43_FWCAPA_QOS)) {
b43info(dev->wl, "QoS not supported by firmware\n");
@ -2557,7 +2557,7 @@ static int b43_upload_microcode(struct b43_wldev *dev)
* ieee80211_unregister to make sure the networking core can
* properly free possible resources. */
dev->wl->hw->queues = 1;
dev->qos_enabled = 0;
dev->qos_enabled = false;
}
} else {
b43info(dev->wl, "Loading firmware version %u.%u "
@ -3361,10 +3361,10 @@ static int b43_rng_init(struct b43_wl *wl)
wl->rng.name = wl->rng_name;
wl->rng.data_read = b43_rng_read;
wl->rng.priv = (unsigned long)wl;
wl->rng_initialized = 1;
wl->rng_initialized = true;
err = hwrng_register(&wl->rng);
if (err) {
wl->rng_initialized = 0;
wl->rng_initialized = false;
b43err(wl, "Failed to register the random "
"number generator (%d)\n", err);
}
@ -3702,13 +3702,13 @@ static int b43_switch_band(struct b43_wl *wl, struct ieee80211_channel *chan)
case IEEE80211_BAND_5GHZ:
if (d->phy.supports_5ghz) {
up_dev = d;
gmode = 0;
gmode = false;
}
break;
case IEEE80211_BAND_2GHZ:
if (d->phy.supports_2ghz) {
up_dev = d;
gmode = 1;
gmode = true;
}
break;
default:
@ -4425,18 +4425,18 @@ static void setup_struct_phy_for_init(struct b43_wldev *dev,
atomic_set(&phy->txerr_cnt, B43_PHY_TX_BADNESS_LIMIT);
#if B43_DEBUG
phy->phy_locked = 0;
phy->radio_locked = 0;
phy->phy_locked = false;
phy->radio_locked = false;
#endif
}
static void setup_struct_wldev_for_init(struct b43_wldev *dev)
{
dev->dfq_valid = 0;
dev->dfq_valid = false;
/* Assume the radio is enabled. If it's not enabled, the state will
* immediately get fixed on the first periodic work run. */
dev->radio_hw_enable = 1;
dev->radio_hw_enable = true;
/* Stats */
memset(&dev->stats, 0, sizeof(dev->stats));
@ -4670,16 +4670,16 @@ static int b43_wireless_core_init(struct b43_wldev *dev)
if (b43_bus_host_is_pcmcia(dev->dev) ||
b43_bus_host_is_sdio(dev->dev)) {
dev->__using_pio_transfers = 1;
dev->__using_pio_transfers = true;
err = b43_pio_init(dev);
} else if (dev->use_pio) {
b43warn(dev->wl, "Forced PIO by use_pio module parameter. "
"This should not be needed and will result in lower "
"performance.\n");
dev->__using_pio_transfers = 1;
dev->__using_pio_transfers = true;
err = b43_pio_init(dev);
} else {
dev->__using_pio_transfers = 0;
dev->__using_pio_transfers = false;
err = b43_dma_init(dev);
}
if (err)
@ -4733,7 +4733,7 @@ static int b43_op_add_interface(struct ieee80211_hw *hw,
b43dbg(wl, "Adding Interface type %d\n", vif->type);
dev = wl->current_dev;
wl->operating = 1;
wl->operating = true;
wl->vif = vif;
wl->if_type = vif->type;
memcpy(wl->mac_addr, vif->addr, ETH_ALEN);
@ -4767,7 +4767,7 @@ static void b43_op_remove_interface(struct ieee80211_hw *hw,
B43_WARN_ON(wl->vif != vif);
wl->vif = NULL;
wl->operating = 0;
wl->operating = false;
b43_adjust_opmode(dev);
memset(wl->mac_addr, 0, ETH_ALEN);
@ -4789,12 +4789,12 @@ static int b43_op_start(struct ieee80211_hw *hw)
memset(wl->bssid, 0, ETH_ALEN);
memset(wl->mac_addr, 0, ETH_ALEN);
wl->filter_flags = 0;
wl->radiotap_enabled = 0;
wl->radiotap_enabled = false;
b43_qos_clear(wl);
wl->beacon0_uploaded = 0;
wl->beacon1_uploaded = 0;
wl->beacon_templates_virgin = 1;
wl->radio_enabled = 1;
wl->beacon0_uploaded = false;
wl->beacon1_uploaded = false;
wl->beacon_templates_virgin = true;
wl->radio_enabled = true;
mutex_lock(&wl->mutex);
@ -4840,7 +4840,7 @@ static void b43_op_stop(struct ieee80211_hw *hw)
goto out_unlock;
}
b43_wireless_core_exit(dev);
wl->radio_enabled = 0;
wl->radio_enabled = false;
out_unlock:
mutex_unlock(&wl->mutex);
@ -5028,7 +5028,7 @@ static int b43_wireless_core_attach(struct b43_wldev *dev)
struct pci_dev *pdev = NULL;
int err;
u32 tmp;
bool have_2ghz_phy = 0, have_5ghz_phy = 0;
bool have_2ghz_phy = false, have_5ghz_phy = false;
/* Do NOT do any device initialization here.
* Do it in wireless_core_init() instead.
@ -5071,7 +5071,7 @@ static int b43_wireless_core_attach(struct b43_wldev *dev)
}
dev->phy.gmode = have_2ghz_phy;
dev->phy.radio_on = 1;
dev->phy.radio_on = true;
b43_wireless_core_reset(dev, dev->phy.gmode);
err = b43_phy_versioning(dev);
@ -5082,11 +5082,11 @@ static int b43_wireless_core_attach(struct b43_wldev *dev)
(pdev->device != 0x4312 &&
pdev->device != 0x4319 && pdev->device != 0x4324)) {
/* No multiband support. */
have_2ghz_phy = 0;
have_5ghz_phy = 0;
have_2ghz_phy = false;
have_5ghz_phy = false;
switch (dev->phy.type) {
case B43_PHYTYPE_A:
have_5ghz_phy = 1;
have_5ghz_phy = true;
break;
case B43_PHYTYPE_LP: //FIXME not always!
#if 0 //FIXME enabling 5GHz causes a NULL pointer dereference
@ -5096,7 +5096,7 @@ static int b43_wireless_core_attach(struct b43_wldev *dev)
case B43_PHYTYPE_N:
case B43_PHYTYPE_HT:
case B43_PHYTYPE_LCN:
have_2ghz_phy = 1;
have_2ghz_phy = true;
break;
default:
B43_WARN_ON(1);
@ -5112,8 +5112,8 @@ static int b43_wireless_core_attach(struct b43_wldev *dev)
/* FIXME: For now we disable the A-PHY on multi-PHY devices. */
if (dev->phy.type != B43_PHYTYPE_N &&
dev->phy.type != B43_PHYTYPE_LP) {
have_2ghz_phy = 1;
have_5ghz_phy = 0;
have_2ghz_phy = true;
have_5ghz_phy = false;
}
}


+ 4
- 4
drivers/net/wireless/b43/phy_common.c View File

@ -145,7 +145,7 @@ void b43_radio_lock(struct b43_wldev *dev)
#if B43_DEBUG
B43_WARN_ON(dev->phy.radio_locked);
dev->phy.radio_locked = 1;
dev->phy.radio_locked = true;
#endif
macctl = b43_read32(dev, B43_MMIO_MACCTL);
@ -163,7 +163,7 @@ void b43_radio_unlock(struct b43_wldev *dev)
#if B43_DEBUG
B43_WARN_ON(!dev->phy.radio_locked);
dev->phy.radio_locked = 0;
dev->phy.radio_locked = false;
#endif
/* Commit any write */
@ -178,7 +178,7 @@ void b43_phy_lock(struct b43_wldev *dev)
{
#if B43_DEBUG
B43_WARN_ON(dev->phy.phy_locked);
dev->phy.phy_locked = 1;
dev->phy.phy_locked = true;
#endif
B43_WARN_ON(dev->dev->core_rev < 3);
@ -190,7 +190,7 @@ void b43_phy_unlock(struct b43_wldev *dev)
{
#if B43_DEBUG
B43_WARN_ON(!dev->phy.phy_locked);
dev->phy.phy_locked = 0;
dev->phy.phy_locked = false;
#endif
B43_WARN_ON(dev->dev->core_rev < 3);


+ 17
- 17
drivers/net/wireless/b43/phy_g.c View File

@ -897,7 +897,7 @@ b43_radio_interference_mitigation_enable(struct b43_wldev *dev, int mode)
if (b43_phy_read(dev, 0x0033) & 0x0800)
break;
gphy->aci_enable = 1;
gphy->aci_enable = true;
phy_stacksave(B43_PHY_RADIO_BITFIELD);
phy_stacksave(B43_PHY_G_CRS);
@ -1038,7 +1038,7 @@ b43_radio_interference_mitigation_disable(struct b43_wldev *dev, int mode)
if (!(b43_phy_read(dev, 0x0033) & 0x0800))
break;
gphy->aci_enable = 0;
gphy->aci_enable = false;
phy_stackrestore(B43_PHY_RADIO_BITFIELD);
phy_stackrestore(B43_PHY_G_CRS);
@ -1956,10 +1956,10 @@ static void b43_phy_init_pctl(struct b43_wldev *dev)
bbatt.att = 11;
if (phy->radio_rev == 8) {
rfatt.att = 15;
rfatt.with_padmix = 1;
rfatt.with_padmix = true;
} else {
rfatt.att = 9;
rfatt.with_padmix = 0;
rfatt.with_padmix = false;
}
b43_set_txpower_g(dev, &bbatt, &rfatt, 0);
}
@ -2137,7 +2137,7 @@ static void default_radio_attenuation(struct b43_wldev *dev,
struct b43_bus_dev *bdev = dev->dev;
struct b43_phy *phy = &dev->phy;
rf->with_padmix = 0;
rf->with_padmix = false;
if (dev->dev->board_vendor == SSB_BOARDVENDOR_BCM &&
dev->dev->board_type == SSB_BOARD_BCM4309G) {
@ -2221,7 +2221,7 @@ static void default_radio_attenuation(struct b43_wldev *dev,
return;
case 8:
rf->att = 0xA;
rf->with_padmix = 1;
rf->with_padmix = true;
return;
case 9:
default:
@ -2389,7 +2389,7 @@ static int b43_gphy_init_tssi2dbm_table(struct b43_wldev *dev)
B43_WARN_ON((dev->dev->chip_id == 0x4301) &&
(phy->radio_ver != 0x2050)); /* Not supported anymore */
gphy->dyn_tssi_tbl = 0;
gphy->dyn_tssi_tbl = false;
if (pab0 != 0 && pab1 != 0 && pab2 != 0 &&
pab0 != -1 && pab1 != -1 && pab2 != -1) {
@ -2404,7 +2404,7 @@ static int b43_gphy_init_tssi2dbm_table(struct b43_wldev *dev)
pab1, pab2);
if (!gphy->tssi2dbm)
return -ENOMEM;
gphy->dyn_tssi_tbl = 1;
gphy->dyn_tssi_tbl = true;
} else {
/* pabX values not set in SPROM. */
gphy->tgt_idle_tssi = 52;
@ -2504,7 +2504,7 @@ static void b43_gphy_op_free(struct b43_wldev *dev)
if (gphy->dyn_tssi_tbl)
kfree(gphy->tssi2dbm);
gphy->dyn_tssi_tbl = 0;
gphy->dyn_tssi_tbl = false;
gphy->tssi2dbm = NULL;
kfree(gphy);
@ -2531,10 +2531,10 @@ static int b43_gphy_op_prepare_hardware(struct b43_wldev *dev)
if (phy->rev == 1) {
/* Workaround: Temporarly disable gmode through the early init
* phase, as the gmode stuff is not needed for phy rev 1 */
phy->gmode = 0;
phy->gmode = false;
b43_wireless_core_reset(dev, 0);
b43_phy_initg(dev);
phy->gmode = 1;
phy->gmode = true;
b43_wireless_core_reset(dev, 1);
}
@ -2613,7 +2613,7 @@ static void b43_gphy_op_software_rfkill(struct b43_wldev *dev,
gphy->radio_off_context.rfover);
b43_phy_write(dev, B43_PHY_RFOVERVAL,
gphy->radio_off_context.rfoverval);
gphy->radio_off_context.valid = 0;
gphy->radio_off_context.valid = false;
}
channel = phy->channel;
b43_gphy_channel_switch(dev, 6, 1);
@ -2626,7 +2626,7 @@ static void b43_gphy_op_software_rfkill(struct b43_wldev *dev,
rfoverval = b43_phy_read(dev, B43_PHY_RFOVERVAL);
gphy->radio_off_context.rfover = rfover;
gphy->radio_off_context.rfoverval = rfoverval;
gphy->radio_off_context.valid = 1;
gphy->radio_off_context.valid = true;
b43_phy_write(dev, B43_PHY_RFOVER, rfover | 0x008C);
b43_phy_write(dev, B43_PHY_RFOVERVAL, rfoverval & 0xFF73);
}
@ -2711,10 +2711,10 @@ static int b43_gphy_op_interf_mitigation(struct b43_wldev *dev,
if ((phy->rev == 0) || (!phy->gmode))
return -ENODEV;
gphy->aci_wlan_automatic = 0;
gphy->aci_wlan_automatic = false;
switch (mode) {
case B43_INTERFMODE_AUTOWLAN:
gphy->aci_wlan_automatic = 1;
gphy->aci_wlan_automatic = true;
if (gphy->aci_enable)
mode = B43_INTERFMODE_MANUALWLAN;
else
@ -2735,8 +2735,8 @@ static int b43_gphy_op_interf_mitigation(struct b43_wldev *dev,
b43_radio_interference_mitigation_disable(dev, currentmode);
if (mode == B43_INTERFMODE_NONE) {
gphy->aci_enable = 0;
gphy->aci_hw_rssi = 0;
gphy->aci_enable = false;
gphy->aci_hw_rssi = false;
} else
b43_radio_interference_mitigation_enable(dev, mode);
gphy->interfmode = mode;


+ 4
- 4
drivers/net/wireless/b43/phy_lp.c View File

<
@ -736,9 +736,9 @@ static void lpphy_set_deaf(struct b43_wldev *dev, bool user)
struct b43_phy_lp *lpphy = dev->phy.lp;
if (user)
lpphy->crs_usr_disable = 1;
lpphy->crs_usr_disable = true;
else
lpphy->crs_sys_disable = 1;
lpphy->crs_sys_disable = true;
b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xFF1F, 0x80);
}
@ -747,9 +747,9 @@ static void lpphy_clear_deaf(struct b43_wldev *dev, bool user)
struct b43_phy_lp *lpphy = dev->phy.lp;
if (user)
lpphy->crs_usr_disable = 0;
lpphy->crs_usr_disable = false;
else
lpphy->crs_sys_disable = 0;
lpphy->crs_sys_disable = false;
if (!lpphy->crs_usr_disable && !lpphy->crs_sys_disable) {