Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 66531
b: refs/heads/master
c: 954ee16
h: refs/heads/master
i:
  66529: 0a10647
  66527: f7b8047
v: v3
  • Loading branch information
Dan Williams authored and David S. Miller committed Oct 10, 2007
1 parent de961f1 commit 576aa04
Show file tree
Hide file tree
Showing 7 changed files with 335 additions and 502 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b1b1907dceadddc7d7317f8ae85a5efec44125d8
refs/heads/master: 954ee164f4f4598afc172c0ec3865d0352e55a0b
3 changes: 2 additions & 1 deletion trunk/drivers/net/wireless/libertas/decl.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ void libertas_send_iwevcustom_event(wlan_private * priv, s8 * str);
struct chan_freq_power *libertas_get_region_cfp_table(u8 region, u8 band,
int *cfp_no);
wlan_private *libertas_add_card(void *card, struct device *dmdev);
int libertas_activate_card(wlan_private *priv);
int libertas_remove_card(wlan_private *priv);
int libertas_start_card(wlan_private *priv);
int libertas_stop_card(wlan_private *priv);
int libertas_add_mesh(wlan_private *priv, struct device *dev);
void libertas_remove_mesh(wlan_private *priv);
int libertas_reset_device(wlan_private *priv);
Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/net/wireless/libertas/dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ struct _wlan_private {
all other bits reserved 0 */
u8 dnld_sent;

const struct firmware *firmware;
struct device *hotplug_device;

/** thread to service interrupts */
Expand All @@ -156,9 +155,6 @@ struct _wlan_private {
struct work_struct sync_channel;

/** Hardware access */
int (*hw_register_dev) (wlan_private * priv);
int (*hw_unregister_dev) (wlan_private *);
int (*hw_prog_firmware) (wlan_private *);
int (*hw_host_to_card) (wlan_private * priv, u8 type, u8 * payload, u16 nb);
int (*hw_get_int_status) (wlan_private * priv, u8 *);
int (*hw_read_event_cause) (wlan_private *);
Expand Down
54 changes: 5 additions & 49 deletions trunk/drivers/net/wireless/libertas/if_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -608,51 +608,6 @@ static int if_cs_prog_real(struct if_cs_card *card)
/* Callback functions for libertas.ko */
/********************************************************************/

static int if_cs_register_dev(wlan_private *priv)
{
struct if_cs_card *card = (struct if_cs_card *)priv->card;

lbs_deb_enter(LBS_DEB_CS);

card->priv = priv;

return 0;
}


static int if_cs_unregister_dev(wlan_private *priv)
{
lbs_deb_enter(LBS_DEB_CS);

/*
* Nothing special here. Because the device's power gets turned off
* anyway, there's no need to send a RESET command like in if_usb.c
*/

return 0;
}


/*
* This callback is a dummy. The reason is that the USB code needs
* to have various things set up in order to be able to download the
* firmware. That's not needed in our case.
*
* On the contrary, if libertas_add_card() has been called and we're
* then later called via libertas_activate_card(), but without a valid
* firmware, then it's quite tedious to tear down the half-installed
* card. Therefore, we download the firmware before calling adding/
* activating the card in the first place. If that doesn't work, we
* won't call into libertas.ko at all.
*/

static int if_cs_prog_firmware(wlan_private *priv)
{
priv->adapter->fw_ready = 1;
return 0;
}


/* Send commands or data packets to the card */
static int if_cs_host_to_card(wlan_private *priv, u8 type, u8 *buf, u16 nb)
{
Expand Down Expand Up @@ -902,14 +857,14 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
}

/* Store pointers to our call-back functions */
card->priv = priv;
priv->card = card;
priv->hw_register_dev = if_cs_register_dev;
priv->hw_unregister_dev = if_cs_unregister_dev;
priv->hw_prog_firmware = if_cs_prog_firmware;
priv->hw_host_to_card = if_cs_host_to_card;
priv->hw_get_int_status = if_cs_get_int_status;
priv->hw_read_event_cause = if_cs_read_event_cause;

priv->adapter->fw_ready = 1;

/* Now actually get the IRQ */
ret = request_irq(p_dev->irq.AssignedIRQ, if_cs_interrupt,
IRQF_SHARED, DRV_NAME, card);
Expand All @@ -919,7 +874,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
}

/* And finally bring the card up */
if (libertas_activate_card(priv) != 0) {
if (libertas_start_card(priv) != 0) {
lbs_pr_err("could not activate card\n");
goto out3;
}
Expand Down Expand Up @@ -951,6 +906,7 @@ static void if_cs_detach(struct pcmcia_device *p_dev)

lbs_deb_enter(LBS_DEB_CS);

libertas_stop_card(card->priv);
libertas_remove_card(card->priv);
if_cs_release(p_dev);
kfree(card);
Expand Down
Loading

0 comments on commit 576aa04

Please sign in to comment.