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

Commit 3cae503b authored by Pekka Enberg's avatar Pekka Enberg Committed by Greg Kroah-Hartman
Browse files

Staging: w35und: move packet_came() to wb35rx.c



The function no longer has dependencies to wbusb.c so we can move it to
wb35rx.c and make it static now.

Acked-by: default avatarPavel Machek <pavel@suse.cz>
Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c930e0c0
Loading
Loading
Loading
Loading
+27 −1
Original line number Original line Diff line number Diff line
@@ -264,8 +264,34 @@ void Wb35Rx_adjust(PDESCRIPTOR pRxDes)
	pRxDes->buffer_size[0] = BufferSize;
	pRxDes->buffer_size[0] = BufferSize;
}
}


extern void packet_came(struct ieee80211_hw *hw, char *pRxBufferAddress, int PacketSize);
static void packet_came(struct ieee80211_hw *hw, char *pRxBufferAddress, int PacketSize)
{
	struct wbsoft_priv *priv = hw->priv;
	struct sk_buff *skb;
	struct ieee80211_rx_status rx_status = {0};

	if (!priv->enabled)
		return;

	skb = dev_alloc_skb(PacketSize);
	if (!skb) {
		printk("Not enough memory for packet, FIXME\n");
		return;
	}

	memcpy(skb_put(skb, PacketSize),
	       pRxBufferAddress,
	       PacketSize);


/*
	rx_status.rate = 10;
	rx_status.channel = 1;
	rx_status.freq = 12345;
	rx_status.phymode = MODE_IEEE80211B;
*/

	ieee80211_rx_irqsafe(hw, skb, &rx_status);
}


u16 Wb35Rx_indicate(struct ieee80211_hw *hw)
u16 Wb35Rx_indicate(struct ieee80211_hw *hw)
{
{
+0 −29
Original line number Original line Diff line number Diff line
@@ -391,35 +391,6 @@ static int wb35_probe(struct usb_interface *intf, const struct usb_device_id *id
	return err;
	return err;
}
}


void packet_came(struct ieee80211_hw *hw, char *pRxBufferAddress, int PacketSize)
{
	struct wbsoft_priv *priv = hw->priv;
	struct sk_buff *skb;
	struct ieee80211_rx_status rx_status = {0};

	if (!priv->enabled)
		return;

	skb = dev_alloc_skb(PacketSize);
	if (!skb) {
		printk("Not enough memory for packet, FIXME\n");
		return;
	}

	memcpy(skb_put(skb, PacketSize),
	       pRxBufferAddress,
	       PacketSize);

/*
	rx_status.rate = 10;
	rx_status.channel = 1;
	rx_status.freq = 12345;
	rx_status.phymode = MODE_IEEE80211B;
*/

	ieee80211_rx_irqsafe(hw, skb, &rx_status);
}

static void wb35_hw_halt(struct wbsoft_priv *adapter)
static void wb35_hw_halt(struct wbsoft_priv *adapter)
{
{
	Mds_Destroy( adapter );
	Mds_Destroy( adapter );