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

Commit 532cdd3b authored by Franky Lin's avatar Franky Lin Committed by John W. Linville
Browse files

brcm80211: fmac: change function bus_rxctl parameter



brcmf_sdbrcm_bus_rxctl acts as an interface function of bus layer.
Change parameter from struct brcmf_sdio to device pointer in order to
provide a more compatible interface for different bus layers. This
is part of the fullmac bus interface refactoring.

Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarFranky Lin <frankyl@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent cad2b26b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -591,6 +591,7 @@ struct brcmf_pub {
	struct brcmf_proto *prot;
	struct brcmf_info *info;
	struct brcmf_cfg80211_dev *config;
	struct device *dev;		/* fullmac dongle device pointer */

	/* Internal brcmf items */
	bool up;		/* Driver up/down (to OS) */
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ extern int
brcmf_sdbrcm_bus_txctl(struct brcmf_sdio *bus, unsigned char *msg, uint msglen);

extern int
brcmf_sdbrcm_bus_rxctl(struct brcmf_sdio *bus, unsigned char *msg, uint msglen);
brcmf_sdbrcm_bus_rxctl(struct device *dev, unsigned char *msg, uint msglen);

extern void brcmf_sdbrcm_wd_timer(struct brcmf_sdio *bus, uint wdtick);

+1 −1
Original line number Diff line number Diff line
@@ -128,7 +128,7 @@ static int brcmf_proto_cdc_cmplt(struct brcmf_pub *drvr, u32 id, u32 len)
	brcmf_dbg(TRACE, "Enter\n");

	do {
		ret = brcmf_sdbrcm_bus_rxctl(drvr->bus,
		ret = brcmf_sdbrcm_bus_rxctl(drvr->dev,
				(unsigned char *)&prot->msg,
				len + sizeof(struct brcmf_proto_cdc_dcmd));
		if (ret < 0)
+1 −0
Original line number Diff line number Diff line
@@ -963,6 +963,7 @@ struct brcmf_pub *brcmf_attach(struct brcmf_sdio *bus, uint bus_hdrlen,
	drvr_priv->pub.bus = bus;
	drvr_priv->pub.hdrlen = bus_hdrlen;
	drvr_priv->pub.bus_if = dev_get_drvdata(dev);
	drvr_priv->pub.dev = dev;

	/* Attach and link in the protocol */
	if (brcmf_proto_attach(&drvr_priv->pub) != 0) {
+4 −1
Original line number Diff line number Diff line
@@ -2912,11 +2912,14 @@ brcmf_sdbrcm_bus_txctl(struct brcmf_sdio *bus, unsigned char *msg, uint msglen)
}

int
brcmf_sdbrcm_bus_rxctl(struct brcmf_sdio *bus, unsigned char *msg, uint msglen)
brcmf_sdbrcm_bus_rxctl(struct device *dev, unsigned char *msg, uint msglen)
{
	int timeleft;
	uint rxlen = 0;
	bool pending;
	struct brcmf_bus *bus_if = dev_get_drvdata(dev);
	struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv;
	struct brcmf_sdio *bus = sdiodev->bus;

	brcmf_dbg(TRACE, "Enter\n");