Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a1c5ad81 authored by Roland Vossen's avatar Roland Vossen Committed by Greg Kroah-Hartman
Browse files

staging: brcm80211: replaced BCME_OK by 0



Code cleanup.

Signed-off-by: default avatarRoland Vossen <rvossen@broadcom.com>
Reviewed-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 3b818080
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -155,7 +155,7 @@ int sdioh_sdmmc_osinit(sdioh_info_t *sd)

	sdos->sd = sd;
	spin_lock_init(&sdos->lock);
	return BCME_OK;
	return 0;
}

void sdioh_sdmmc_osfree(sdioh_info_t *sd)
+1 −1
Original line number Diff line number Diff line
@@ -902,7 +902,7 @@ wl_host_event(struct dhd_info *dhd, int *ifidx, void *pktdata,
	wl_show_host_event(event, event_data);
#endif				/* SHOW_EVENTS */

	return BCME_OK;
	return 0;
}

/* Convert user's input in hex pattern to byte-size mask */
+1 −1
Original line number Diff line number Diff line
@@ -2694,7 +2694,7 @@ dhd_wl_host_event(dhd_info_t *dhd, int *ifidx, void *pktdata,
	ASSERT(dhd != NULL);

	bcmerror = wl_host_event(dhd, ifidx, pktdata, event, data);
	if (bcmerror != BCME_OK)
	if (bcmerror != 0)
		return bcmerror;

#if defined(CONFIG_WIRELESS_EXT)
+19 −19
Original line number Diff line number Diff line
@@ -558,7 +558,7 @@ static int dhdsdio_htclk(dhd_bus_t *bus, bool on, bool pendok)
			DHD_INFO(("CLKCTL: set PENDING\n"));
			bus->clkstate = CLK_PENDING;

			return BCME_OK;
			return 0;
		} else if (bus->clkstate == CLK_PENDING) {
			/* Cancel CA-only interrupt filter */
			devctl =
@@ -634,7 +634,7 @@ static int dhdsdio_htclk(dhd_bus_t *bus, bool on, bool pendok)
			return BCME_ERROR;
		}
	}
	return BCME_OK;
	return 0;
}

/* Change idle/active SD state */
@@ -721,7 +721,7 @@ static int dhdsdio_sdclk(dhd_bus_t *bus, bool on)
		bus->clkstate = CLK_NONE;
	}

	return BCME_OK;
	return 0;
}

/* Transition SD and backplane clock readiness */
@@ -739,7 +739,7 @@ static int dhdsdio_clkctl(dhd_bus_t *bus, uint target, bool pendok)
			dhd_os_wd_timer(bus->dhd, dhd_watchdog_ms);
			bus->activity = true;
		}
		return BCME_OK;
		return 0;
	}

	switch (target) {
@@ -778,7 +778,7 @@ static int dhdsdio_clkctl(dhd_bus_t *bus, uint target, bool pendok)
	DHD_INFO(("dhdsdio_clkctl: %d -> %d\n", oldstate, bus->clkstate));
#endif				/* DHD_DEBUG */

	return BCME_OK;
	return 0;
}

int dhdsdio_bussleep(dhd_bus_t *bus, bool sleep)
@@ -793,7 +793,7 @@ int dhdsdio_bussleep(dhd_bus_t *bus, bool sleep)

	/* Done if we're already in the requested state */
	if (sleep == bus->sleeping)
		return BCME_OK;
		return 0;

	/* Going to sleep: set the alarm and turn off the lights... */
	if (sleep) {
@@ -865,7 +865,7 @@ int dhdsdio_bussleep(dhd_bus_t *bus, bool sleep)
		}
	}

	return BCME_OK;
	return 0;
}

#if defined(OOB_INTR_ONLY)
@@ -1115,7 +1115,7 @@ int dhd_bus_txdata(struct dhd_bus *bus, struct sk_buff *pkt)
			DHD_ERROR(("%s: out of bus->txq !!!\n", __func__));
			ret = BCME_NORESOURCE;
		} else {
			ret = BCME_OK;
			ret = 0;
		}
		dhd_os_sdunlock_txq(bus->dhd);

@@ -1805,7 +1805,7 @@ static int dhdsdio_readshared(dhd_bus_t *bus, sdpcm_shared_t *sh)
		return BCME_ERROR;
	}

	return BCME_OK;
	return 0;
}

static int dhdsdio_checkdied(dhd_bus_t *bus, u8 *data, uint size)
@@ -2020,7 +2020,7 @@ static int dhdsdio_readconsole(dhd_bus_t *bus)
	/* Skip reading the console buffer if the index pointer
	 has not moved */
	if (idx == c->last)
		return BCME_OK;
		return 0;

	/* Read the console buffer */
	addr = le32_to_cpu(c->log.buf);
@@ -2058,13 +2058,13 @@ static int dhdsdio_readconsole(dhd_bus_t *bus)
	}
break2:

	return BCME_OK;
	return 0;
}
#endif				/* DHD_DEBUG */

int dhdsdio_downloadvars(dhd_bus_t *bus, void *arg, int len)
{
	int bcmerror = BCME_OK;
	int bcmerror = 0;

	DHD_TRACE(("%s: Enter\n", __func__));

@@ -2740,7 +2740,7 @@ dhd_bus_iovar_op(dhd_pub_t *dhdp, const char *name,
		if (set && strcmp(name, "sd_divisor") == 0) {
			if (bcmsdh_iovar_op(bus->sdh, "sd_divisor", NULL, 0,
					    &bus->sd_divisor, sizeof(s32),
					    false) != BCME_OK) {
					    false) != 0) {
				bus->sd_divisor = -1;
				DHD_ERROR(("%s: fail on %s get\n", __func__,
					   name));
@@ -2753,7 +2753,7 @@ dhd_bus_iovar_op(dhd_pub_t *dhdp, const char *name,
		if (set && strcmp(name, "sd_mode") == 0) {
			if (bcmsdh_iovar_op(bus->sdh, "sd_mode", NULL, 0,
					    &bus->sd_mode, sizeof(s32),
					    false) != BCME_OK) {
					    false) != 0) {
				bus->sd_mode = -1;
				DHD_ERROR(("%s: fail on %s get\n", __func__,
					   name));
@@ -2768,7 +2768,7 @@ dhd_bus_iovar_op(dhd_pub_t *dhdp, const char *name,
			if (bcmsdh_iovar_op
			    (bus->sdh, "sd_blocksize", &fnum, sizeof(s32),
			     &bus->blocksize, sizeof(s32),
			     false) != BCME_OK) {
			     false) != 0) {
				bus->blocksize = 0;
				DHD_ERROR(("%s: fail on %s get\n", __func__,
					   "sd_blocksize"));
@@ -5426,7 +5426,7 @@ static bool dhdsdio_probe_init(dhd_bus_t *bus, void *sdh)
	/* Query the SD clock speed */
	if (bcmsdh_iovar_op(sdh, "sd_divisor", NULL, 0,
			    &bus->sd_divisor, sizeof(s32),
			    false) != BCME_OK) {
			    false) != 0) {
		DHD_ERROR(("%s: fail on %s get\n", __func__, "sd_divisor"));
		bus->sd_divisor = -1;
	} else {
@@ -5436,7 +5436,7 @@ static bool dhdsdio_probe_init(dhd_bus_t *bus, void *sdh)

	/* Query the SD bus mode */
	if (bcmsdh_iovar_op(sdh, "sd_mode", NULL, 0,
			    &bus->sd_mode, sizeof(s32), false) != BCME_OK) {
			    &bus->sd_mode, sizeof(s32), false) != 0) {
		DHD_ERROR(("%s: fail on %s get\n", __func__, "sd_mode"));
		bus->sd_mode = -1;
	} else {
@@ -5447,7 +5447,7 @@ static bool dhdsdio_probe_init(dhd_bus_t *bus, void *sdh)
	/* Query the F2 block size, set roundup accordingly */
	fnum = 2;
	if (bcmsdh_iovar_op(sdh, "sd_blocksize", &fnum, sizeof(s32),
			    &bus->blocksize, sizeof(s32), false) != BCME_OK) {
			    &bus->blocksize, sizeof(s32), false) != 0) {
		bus->blocksize = 0;
		DHD_ERROR(("%s: fail on %s get\n", __func__, "sd_blocksize"));
	} else {
@@ -5460,7 +5460,7 @@ static bool dhdsdio_probe_init(dhd_bus_t *bus, void *sdh)
		 default to use if supported */
	if (bcmsdh_iovar_op(sdh, "sd_rxchain", NULL, 0,
			    &bus->sd_rxchain, sizeof(s32),
			    false) != BCME_OK) {
			    false) != 0) {
		bus->sd_rxchain = false;
	} else {
		DHD_INFO(("%s: bus module (through bcmsdh API) %s chaining\n",
+17 −17
Original line number Diff line number Diff line
@@ -14892,10 +14892,10 @@ void WLBANDINITFN(wlc_phy_init_nphy) (phy_info_t *pi)
				}
				if (wlc_phy_cal_txiqlo_nphy
				    (pi, target_gain, true, false) == BCME_OK) {
				    (pi, target_gain, true, false) == 0) {
					if (wlc_phy_cal_rxiq_nphy
					    (pi, target_gain, 2,
					     false) == BCME_OK) {
					     false) == 0) {
						wlc_phy_savecal_nphy(pi);
					}
@@ -22372,7 +22372,7 @@ wlc_phy_tx_tone_nphy(phy_info_t *pi, u32 f_kHz, u16 max_val,
	wlc_phy_runsamples_nphy(pi, num_samps, loops, wait, iqmode,
				dac_test_mode, modify_bbmult);
	return BCME_OK;
	return 0;
}
static void
@@ -23876,7 +23876,7 @@ void wlc_phy_cal_perical_nphy_run(phy_info_t *pi, u8 caltype)
			target_gain = pi->nphy_cal_target_gain;
		}
		if (BCME_OK ==
		if (0 ==
		    wlc_phy_cal_txiqlo_nphy(pi, target_gain, fullcal, mphase)) {
			if (PHY_IPA(pi))
				wlc_phy_a4(pi, true);
@@ -23888,7 +23888,7 @@ void wlc_phy_cal_perical_nphy_run(phy_info_t *pi, u8 caltype)
			wlapi_suspend_mac_and_wait(pi->sh->physhim);
			wlc_phyreg_enter((wlc_phy_t *) pi);
			if (BCME_OK == wlc_phy_cal_rxiq_nphy(pi, target_gain,
			if (0 == wlc_phy_cal_rxiq_nphy(pi, target_gain,
							     (pi->
							      first_cal_after_assoc
							      || (pi->
@@ -23941,7 +23941,7 @@ void wlc_phy_cal_perical_nphy_run(phy_info_t *pi, u8 caltype)
			if (wlc_phy_cal_txiqlo_nphy
			    (pi, pi->nphy_cal_target_gain, fullcal,
			     true) != BCME_OK) {
			     true) != 0) {
				wlc_phy_cal_perical_mphase_reset(pi);
				break;
@@ -23973,7 +23973,7 @@ void wlc_phy_cal_perical_nphy_run(phy_info_t *pi, u8 caltype)
						  (pi->first_cal_after_assoc ||
						   (pi->cal_type_override ==
						    PHY_PERICAL_FULL)) ? 2 : 0,
						  false) == BCME_OK) {
						  false) == 0) {
				wlc_phy_savecal_nphy(pi);
			}
@@ -24076,7 +24076,7 @@ wlc_phy_cal_txiqlo_nphy(phy_info_t *pi, nphy_txgains_t target_gain,
	void *tbl_ptr;
	bool ladder_updated[2];
	u8 mphase_cal_lastphase = 0;
	int bcmerror = BCME_OK;
	int bcmerror = 0;
	bool phyhang_avoid_state = false;
	u16 tbl_tx_iqlo_cal_loft_ladder_20[] = {
@@ -24202,13 +24202,13 @@ wlc_phy_cal_txiqlo_nphy(phy_info_t *pi, nphy_txgains_t target_gain,
	if (pi->mphase_cal_phase_id > MPHASE_CAL_STATE_TXPHASE0) {
		wlc_phy_runsamples_nphy(pi, phy_bw * 8, 0xffff, 0, 1, 0, false);
		bcmerror = BCME_OK;
		bcmerror = 0;
	} else {
		bcmerror =
		    wlc_phy_tx_tone_nphy(pi, tone_freq, max_val, 1, 0, false);
	}
	if (bcmerror == BCME_OK) {
	if (bcmerror == 0) {
		if (pi->mphase_cal_phase_id > MPHASE_CAL_STATE_TXPHASE0) {
			tbl_ptr = pi->mphase_txcal_bestcoeffs;
@@ -24529,7 +24529,7 @@ static void wlc_phy_calc_rx_iq_comp_nphy(phy_info_t *pi, u8 core_mask)
	u32 ii = 0, qq = 0;
	s16 iq_nbits, qq_nbits, brsh, arsh;
	s32 a, b, temp;
	int bcmerror = BCME_OK;
	int bcmerror = 0;
	uint cal_retry = 0;
	if (core_mask == 0x0)
@@ -24628,7 +24628,7 @@ static void wlc_phy_calc_rx_iq_comp_nphy(phy_info_t *pi, u8 core_mask)
		}
	}
	if (bcmerror != BCME_OK) {
	if (bcmerror != 0) {
		printk("%s: Failed, cnt = %d\n", __func__, cal_retry);
		if (cal_retry < CAL_RETRY_CNT) {
@@ -25873,7 +25873,7 @@ wlc_phy_cal_rxiq_nphy_rev3(phy_info_t *pi, nphy_txgains_t target_gain,
	wlc_phy_stay_in_carriersearch_nphy(pi, false);
	return BCME_OK;
	return 0;
}
static int
@@ -25898,7 +25898,7 @@ wlc_phy_cal_rxiq_nphy_rev2(phy_info_t *pi, nphy_txgains_t target_gain,
	u16 cal_gain[2];
	nphy_iqcal_params_t cal_params[2];
	u8 phy_bw;
	int bcmerror = BCME_OK;
	int bcmerror = 0;
	bool first_playtone = true;
	wlc_phy_stay_in_carriersearch_nphy(pi, true);
@@ -26048,7 +26048,7 @@ wlc_phy_cal_rxiq_nphy_rev2(phy_info_t *pi, nphy_txgains_t target_gain,
							0, 0, 0, true);
			}
			if (bcmerror == BCME_OK) {
			if (bcmerror == 0) {
				if (gain_pass < 3) {
					wlc_phy_rx_iq_est_nphy(pi, est,
@@ -26071,7 +26071,7 @@ wlc_phy_cal_rxiq_nphy_rev2(phy_info_t *pi, nphy_txgains_t target_gain,
				wlc_phy_stopplayback_nphy(pi);
			}
			if (bcmerror != BCME_OK)
			if (bcmerror != 0)
				break;
		}
@@ -26087,7 +26087,7 @@ wlc_phy_cal_rxiq_nphy_rev2(phy_info_t *pi, nphy_txgains_t target_gain,
			      0xa7, orig_AfectrlCore);
		write_phy_reg(pi, 0xa2, orig_RfseqCoreActv);
		if (bcmerror != BCME_OK)
		if (bcmerror != 0)
			break;
	}
Loading