Commit f3a57fd1 authored by Joe Perches's avatar Joe Perches Committed by John W. Linville

libertas: Use netdev_<level> or dev_<level> where possible

Using the more descriptive logging styles gives a bit
more information about the device being operated on.

Makes the object trivially smaller too.

$ size drivers/net/wireless/libertas/built-in.o.*
 187730	   2973	  38488	 229191	  37f47	drivers/net/wireless/libertas/built-in.o.new
 188195	   2973	  38488	 229656	  38118	drivers/net/wireless/libertas/built-in.o.old
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Acked-by: default avatarDan Williams <dcbw@redhat.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 0e4e06ae
...@@ -1324,7 +1324,8 @@ static int lbs_cfg_connect(struct wiphy *wiphy, struct net_device *dev, ...@@ -1324,7 +1324,8 @@ static int lbs_cfg_connect(struct wiphy *wiphy, struct net_device *dev,
sme->ssid, sme->ssid_len, sme->ssid, sme->ssid_len,
WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS); WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);
if (!bss) { if (!bss) {
pr_err("assoc: bss %pM not in scan results\n", sme->bssid); wiphy_err(wiphy, "assoc: bss %pM not in scan results\n",
sme->bssid);
ret = -ENOENT; ret = -ENOENT;
goto done; goto done;
} }
...@@ -1381,8 +1382,8 @@ static int lbs_cfg_connect(struct wiphy *wiphy, struct net_device *dev, ...@@ -1381,8 +1382,8 @@ static int lbs_cfg_connect(struct wiphy *wiphy, struct net_device *dev,
lbs_enable_rsn(priv, sme->crypto.cipher_group != 0); lbs_enable_rsn(priv, sme->crypto.cipher_group != 0);
break; break;
default: default:
pr_err("unsupported cipher group 0x%x\n", wiphy_err(wiphy, "unsupported cipher group 0x%x\n",
sme->crypto.cipher_group); sme->crypto.cipher_group);
ret = -ENOTSUPP; ret = -ENOTSUPP;
goto done; goto done;
} }
...@@ -1500,7 +1501,7 @@ static int lbs_cfg_add_key(struct wiphy *wiphy, struct net_device *netdev, ...@@ -1500,7 +1501,7 @@ static int lbs_cfg_add_key(struct wiphy *wiphy, struct net_device *netdev,
params->key, params->key_len); params->key, params->key_len);
break; break;
default: default:
pr_err("unhandled cipher 0x%x\n", params->cipher); wiphy_err(wiphy, "unhandled cipher 0x%x\n", params->cipher);
ret = -ENOTSUPP; ret = -ENOTSUPP;
break; break;
} }
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
* It prepares command and sends it to firmware when it is ready. * It prepares command and sends it to firmware when it is ready.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/kfifo.h> #include <linux/kfifo.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/slab.h> #include <linux/slab.h>
...@@ -112,7 +110,7 @@ int lbs_update_hw_spec(struct lbs_private *priv) ...@@ -112,7 +110,7 @@ int lbs_update_hw_spec(struct lbs_private *priv)
* CF card firmware 5.0.16p0: cap 0x00000303 * CF card firmware 5.0.16p0: cap 0x00000303
* USB dongle firmware 5.110.17p2: cap 0x00000303 * USB dongle firmware 5.110.17p2: cap 0x00000303
*/ */
pr_info("%pM, fw %u.%u.%up%u, cap 0x%08x\n", netdev_info(priv->dev, "%pM, fw %u.%u.%up%u, cap 0x%08x\n",
cmd.permanentaddr, cmd.permanentaddr,
priv->fwrelease >> 24 & 0xff, priv->fwrelease >> 24 & 0xff,
priv->fwrelease >> 16 & 0xff, priv->fwrelease >> 16 & 0xff,
...@@ -143,7 +141,8 @@ int lbs_update_hw_spec(struct lbs_private *priv) ...@@ -143,7 +141,8 @@ int lbs_update_hw_spec(struct lbs_private *priv)
/* if it's unidentified region code, use the default (USA) */ /* if it's unidentified region code, use the default (USA) */
if (i >= MRVDRV_MAX_REGION_CODE) { if (i >= MRVDRV_MAX_REGION_CODE) {
priv->regioncode = 0x10; priv->regioncode = 0x10;
pr_info("unidentified region code; using the default (USA)\n"); netdev_info(priv->dev,
"unidentified region code; using the default (USA)\n");
} }
if (priv->current_addr[0] == 0xff) if (priv->current_addr[0] == 0xff)
...@@ -213,7 +212,7 @@ int lbs_host_sleep_cfg(struct lbs_private *priv, uint32_t criteria, ...@@ -213,7 +212,7 @@ int lbs_host_sleep_cfg(struct lbs_private *priv, uint32_t criteria,
(uint8_t *)&cmd_config.wol_conf, (uint8_t *)&cmd_config.wol_conf,
sizeof(struct wol_config)); sizeof(struct wol_config));
} else { } else {
pr_info("HOST_SLEEP_CFG failed %d\n", ret); netdev_info(priv->dev, "HOST_SLEEP_CFG failed %d\n", ret);
} }
return ret; return ret;
...@@ -316,7 +315,7 @@ static int lbs_wait_for_ds_awake(struct lbs_private *priv) ...@@ -316,7 +315,7 @@ static int lbs_wait_for_ds_awake(struct lbs_private *priv)
if (priv->is_deep_sleep) { if (priv->is_deep_sleep) {
if (!wait_event_interruptible_timeout(priv->ds_awake_q, if (!wait_event_interruptible_timeout(priv->ds_awake_q,
!priv->is_deep_sleep, (10 * HZ))) { !priv->is_deep_sleep, (10 * HZ))) {
pr_err("ds_awake_q: timer expired\n"); netdev_err(priv->dev, "ds_awake_q: timer expired\n");
ret = -1; ret = -1;
} }
} }
...@@ -341,7 +340,7 @@ int lbs_set_deep_sleep(struct lbs_private *priv, int deep_sleep) ...@@ -341,7 +340,7 @@ int lbs_set_deep_sleep(struct lbs_private *priv, int deep_sleep)
netif_carrier_off(priv->dev); netif_carrier_off(priv->dev);
} }
} else { } else {
pr_err("deep sleep: already enabled\n"); netdev_err(priv->dev, "deep sleep: already enabled\n");
} }
} else { } else {
if (priv->is_deep_sleep) { if (priv->is_deep_sleep) {
...@@ -351,7 +350,8 @@ int lbs_set_deep_sleep(struct lbs_private *priv, int deep_sleep) ...@@ -351,7 +350,8 @@ int lbs_set_deep_sleep(struct lbs_private *priv, int deep_sleep)
if (!ret) { if (!ret) {
ret = lbs_wait_for_ds_awake(priv); ret = lbs_wait_for_ds_awake(priv);
if (ret) if (ret)
pr_err("deep sleep: wakeup failed\n"); netdev_err(priv->dev,
"deep sleep: wakeup failed\n");
} }
} }
} }
...@@ -385,8 +385,9 @@ int lbs_set_host_sleep(struct lbs_private *priv, int host_sleep) ...@@ -385,8 +385,9 @@ int lbs_set_host_sleep(struct lbs_private *priv, int host_sleep)
ret = lbs_host_sleep_cfg(priv, priv->wol_criteria, ret = lbs_host_sleep_cfg(priv, priv->wol_criteria,
(struct wol_config *)NULL); (struct wol_config *)NULL);
if (ret) { if (ret) {
pr_info("Host sleep configuration failed: %d\n", netdev_info(priv->dev,
ret); "Host sleep configuration failed: %d\n",
ret);
return ret; return ret;
} }
if (priv->psstate == PS_STATE_FULL_POWER) { if (priv->psstate == PS_STATE_FULL_POWER) {
...@@ -396,19 +397,21 @@ int lbs_set_host_sleep(struct lbs_private *priv, int host_sleep) ...@@ -396,19 +397,21 @@ int lbs_set_host_sleep(struct lbs_private *priv, int host_sleep)
sizeof(cmd), sizeof(cmd),
lbs_ret_host_sleep_activate, 0); lbs_ret_host_sleep_activate, 0);
if (ret) if (ret)
pr_info("HOST_SLEEP_ACTIVATE failed: %d\n", netdev_info(priv->dev,
ret); "HOST_SLEEP_ACTIVATE failed: %d\n",
ret);
} }
if (!wait_event_interruptible_timeout( if (!wait_event_interruptible_timeout(
priv->host_sleep_q, priv->host_sleep_q,
priv->is_host_sleep_activated, priv->is_host_sleep_activated,
(10 * HZ))) { (10 * HZ))) {
pr_err("host_sleep_q: timer expired\n"); netdev_err(priv->dev,
"host_sleep_q: timer expired\n");
ret = -1; ret = -1;
} }
} else { } else {
pr_err("host sleep: already enabled\n"); netdev_err(priv->dev, "host sleep: already enabled\n");
} }
} else { } else {
if (priv->is_host_sleep_activated) if (priv->is_host_sleep_activated)
...@@ -1008,7 +1011,8 @@ static void lbs_submit_command(struct lbs_private *priv, ...@@ -1008,7 +1011,8 @@ static void lbs_submit_command(struct lbs_private *priv,
ret = priv->hw_host_to_card(priv, MVMS_CMD, (u8 *) cmd, cmdsize); ret = priv->hw_host_to_card(priv, MVMS_CMD, (u8 *) cmd, cmdsize);
if (ret) { if (ret) {
pr_info("DNLD_CMD: hw_host_to_card failed: %d\n", ret); netdev_info(priv->dev, "DNLD_CMD: hw_host_to_card failed: %d\n",
ret);
/* Let the timer kick in and retry, and potentially reset /* Let the timer kick in and retry, and potentially reset
the whole thing if the condition persists */ the whole thing if the condition persists */
timeo = HZ/4; timeo = HZ/4;
...@@ -1277,7 +1281,8 @@ int lbs_execute_next_command(struct lbs_private *priv) ...@@ -1277,7 +1281,8 @@ int lbs_execute_next_command(struct lbs_private *priv)
spin_lock_irqsave(&priv->driver_lock, flags); spin_lock_irqsave(&priv->driver_lock, flags);
if (priv->cur_cmd) { if (priv->cur_cmd) {
pr_alert( "EXEC_NEXT_CMD: already processing command!\n"); netdev_alert(priv->dev,
"EXEC_NEXT_CMD: already processing command!\n");
spin_unlock_irqrestore(&priv->driver_lock, flags); spin_unlock_irqrestore(&priv->driver_lock, flags);
ret = -1; ret = -1;
goto done; goto done;
...@@ -1439,7 +1444,7 @@ static void lbs_send_confirmsleep(struct lbs_private *priv) ...@@ -1439,7 +1444,7 @@ static void lbs_send_confirmsleep(struct lbs_private *priv)
ret = priv->hw_host_to_card(priv, MVMS_CMD, (u8 *) &confirm_sleep, ret = priv->hw_host_to_card(priv, MVMS_CMD, (u8 *) &confirm_sleep,
sizeof(confirm_sleep)); sizeof(confirm_sleep));
if (ret) { if (ret) {
pr_alert("confirm_sleep failed\n"); netdev_alert(priv->dev, "confirm_sleep failed\n");
goto out; goto out;
} }
...@@ -1665,7 +1670,8 @@ int __lbs_cmd(struct lbs_private *priv, uint16_t command, ...@@ -1665,7 +1670,8 @@ int __lbs_cmd(struct lbs_private *priv, uint16_t command,
spin_lock_irqsave(&priv->driver_lock, flags); spin_lock_irqsave(&priv->driver_lock, flags);
ret = cmdnode->result; ret = cmdnode->result;
if (ret) if (ret)
pr_info("PREP_CMD: command 0x%04x failed: %d\n", command, ret); netdev_info(priv->dev, "PREP_CMD: command 0x%04x failed: %d\n",
command, ret);
__lbs_cleanup_and_insert_cmd(priv, cmdnode); __lbs_cleanup_and_insert_cmd(priv, cmdnode);
spin_unlock_irqrestore(&priv->driver_lock, flags); spin_unlock_irqrestore(&priv->driver_lock, flags);
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
* responses as well as events generated by firmware. * responses as well as events generated by firmware.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/sched.h> #include <linux/sched.h>
...@@ -88,17 +86,18 @@ int lbs_process_command_response(struct lbs_private *priv, u8 *data, u32 len) ...@@ -88,17 +86,18 @@ int lbs_process_command_response(struct lbs_private *priv, u8 *data, u32 len)
lbs_deb_hex(LBS_DEB_CMD, "CMD_RESP", (void *) resp, len); lbs_deb_hex(LBS_DEB_CMD, "CMD_RESP", (void *) resp, len);
if (resp->seqnum != priv->cur_cmd->cmdbuf->seqnum) { if (resp->seqnum != priv->cur_cmd->cmdbuf->seqnum) {
pr_info("Received CMD_RESP with invalid sequence %d (expected %d)\n", netdev_info(priv->dev,
le16_to_cpu(resp->seqnum), "Received CMD_RESP with invalid sequence %d (expected %d)\n",
le16_to_cpu(priv->cur_cmd->cmdbuf->seqnum)); le16_to_cpu(resp->seqnum),
le16_to_cpu(priv->cur_cmd->cmdbuf->seqnum));
spin_unlock_irqrestore(&priv->driver_lock, flags); spin_unlock_irqrestore(&priv->driver_lock, flags);
ret = -1; ret = -1;
goto done; goto done;
} }
if (respcmd != CMD_RET(curcmd) && if (respcmd != CMD_RET(curcmd) &&
respcmd != CMD_RET_802_11_ASSOCIATE && curcmd != CMD_802_11_ASSOCIATE) { respcmd != CMD_RET_802_11_ASSOCIATE && curcmd != CMD_802_11_ASSOCIATE) {
pr_info("Invalid CMD_RESP %x to command %x!\n", netdev_info(priv->dev, "Invalid CMD_RESP %x to command %x!\n",
respcmd, curcmd); respcmd, curcmd);
spin_unlock_irqrestore(&priv->driver_lock, flags); spin_unlock_irqrestore(&priv->driver_lock, flags);
ret = -1; ret = -1;
goto done; goto done;
...@@ -107,8 +106,9 @@ int lbs_process_command_response(struct lbs_private *priv, u8 *data, u32 len) ...@@ -107,8 +106,9 @@ int lbs_process_command_response(struct lbs_private *priv, u8 *data, u32 len)
if (resp->result == cpu_to_le16(0x0004)) { if (resp->result == cpu_to_le16(0x0004)) {
/* 0x0004 means -EAGAIN. Drop the response, let it time out /* 0x0004 means -EAGAIN. Drop the response, let it time out
and be resubmitted */ and be resubmitted */
pr_info("Firmware returns DEFER to command %x. Will let it time out...\n", netdev_info(priv->dev,
le16_to_cpu(resp->command)); "Firmware returns DEFER to command %x. Will let it time out...\n",
le16_to_cpu(resp->command));
spin_unlock_irqrestore(&priv->driver_lock, flags); spin_unlock_irqrestore(&priv->driver_lock, flags);
ret = -1; ret = -1;
goto done; goto done;
...@@ -319,28 +319,28 @@ int lbs_process_event(struct lbs_private *priv, u32 event) ...@@ -319,28 +319,28 @@ int lbs_process_event(struct lbs_private *priv, u32 event)
lbs_deb_cmd("EVENT: ADHOC beacon lost\n"); lbs_deb_cmd("EVENT: ADHOC beacon lost\n");
break; break;
case MACREG_INT_CODE_RSSI_LOW: case MACREG_INT_CODE_RSSI_LOW:
pr_alert("EVENT: rssi low\n"); netdev_alert(priv->dev, "EVENT: rssi low\n");
break; break;
case MACREG_INT_CODE_SNR_LOW: case MACREG_INT_CODE_SNR_LOW:
pr_alert("EVENT: snr low\n"); netdev_alert(priv->dev, "EVENT: snr low\n");
break; break;
case MACREG_INT_CODE_MAX_FAIL: case MACREG_INT_CODE_MAX_FAIL:
pr_alert("EVENT: max fail\n"); netdev_alert(priv->dev, "EVENT: max fail\n");
break; break;
case MACREG_INT_CODE_RSSI_HIGH: case MACREG_INT_CODE_RSSI_HIGH:
pr_alert("EVENT: rssi high\n"); netdev_alert(priv->dev, "EVENT: rssi high\n");
break; break;
case MACREG_INT_CODE_SNR_HIGH: case MACREG_INT_CODE_SNR_HIGH:
pr_alert("EVENT: snr high\n"); netdev_alert(priv->dev, "EVENT: snr high\n");
break; break;
case MACREG_INT_CODE_MESH_AUTO_STARTED: case MACREG_INT_CODE_MESH_AUTO_STARTED:
/* Ignore spurious autostart events */ /* Ignore spurious autostart events */
pr_info("EVENT: MESH_AUTO_STARTED (ignoring)\n"); netdev_info(priv->dev, "EVENT: MESH_AUTO_STARTED (ignoring)\n");
break; break;
default: default:
pr_alert("EVENT: unknown event id %d\n", event); netdev_alert(priv->dev, "EVENT: unknown event id %d\n", event);
break; break;
} }
......
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/dcache.h> #include <linux/dcache.h>
#include <linux/debugfs.h> #include <linux/debugfs.h>
#include <linux/delay.h> #include <linux/delay.h>
...@@ -153,13 +151,14 @@ static ssize_t lbs_host_sleep_write(struct file *file, ...@@ -153,13 +151,14 @@ static ssize_t lbs_host_sleep_write(struct file *file,
ret = lbs_set_host_sleep(priv, 0); ret = lbs_set_host_sleep(priv, 0);
else if (host_sleep == 1) { else if (host_sleep == 1) {
if (priv->wol_criteria == EHS_REMOVE_WAKEUP) { if (priv->wol_criteria == EHS_REMOVE_WAKEUP) {
pr_info("wake parameters not configured\n"); netdev_info(priv->dev,
"wake parameters not configured\n");
ret = -EINVAL; ret = -EINVAL;
goto out_unlock; goto out_unlock;
} }
ret = lbs_set_host_sleep(priv, 1); ret = lbs_set_host_sleep(priv, 1);
} else { } else {
pr_err("invalid option\n"); netdev_err(priv->dev, "invalid option\n");
ret = -EINVAL; ret = -EINVAL;
} }
......
...@@ -364,7 +364,7 @@ static int if_cs_send_cmd(struct lbs_private *priv, u8 *buf, u16 nb) ...@@ -364,7 +364,7 @@ static int if_cs_send_cmd(struct lbs_private *priv, u8 *buf, u16 nb)
if (status & IF_CS_BIT_COMMAND) if (status & IF_CS_BIT_COMMAND)
break; break;
if (++loops > 100) { if (++loops > 100) {
pr_err("card not ready for commands\n"); netdev_err(priv->dev, "card not ready for commands\n");
goto done; goto done;
} }
mdelay(1); mdelay(1);
...@@ -434,14 +434,16 @@ static int if_cs_receive_cmdres(struct lbs_private *priv, u8 *data, u32 *len) ...@@ -434,14 +434,16 @@ static int if_cs_receive_cmdres(struct lbs_private *priv, u8 *data, u32 *len)
/* is hardware ready? */ /* is hardware ready? */
status = if_cs_read16(priv->card, IF_CS_CARD_STATUS); status = if_cs_read16(priv->card, IF_CS_CARD_STATUS);
if ((status & IF_CS_BIT_RESP) == 0) { if ((status & IF_CS_BIT_RESP) == 0) {
pr_err("no cmd response in card\n"); netdev_err(priv->dev, "no cmd response in card\n");
*len = 0; *len = 0;
goto out; goto out;
} }
*len = if_cs_read16(priv->card, IF_CS_RESP_LEN); *len = if_cs_read16(priv->card, IF_CS_RESP_LEN);
if ((*len == 0) || (*len > LBS_CMD_BUFFER_SIZE)) { if ((*len == 0) || (*len > LBS_CMD_BUFFER_SIZE)) {
pr_err("card cmd buffer has invalid # of bytes (%d)\n", *len); netdev_err(priv->dev,
"card cmd buffer has invalid # of bytes (%d)\n",
*len);
goto out; goto out;
} }
...@@ -475,7 +477,9 @@ static struct sk_buff *if_cs_receive_data(struct lbs_private *priv) ...@@ -475,7 +477,9 @@ static struct sk_buff *if_cs_receive_data(struct lbs_private *priv)
len = if_cs_read16(priv->card, IF_CS_READ_LEN); len = if_cs_read16(priv->card, IF_CS_READ_LEN);
if (len == 0 || len > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE) { if (len == 0 || len > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE) {
pr_err("card data buffer has invalid # of bytes (%d)\n", len); netdev_err(priv->dev,
"card data buffer has invalid # of bytes (%d)\n",
len);
priv->dev->stats.rx_dropped++; priv->dev->stats.rx_dropped++;
goto dat_err; goto dat_err;
} }
...@@ -761,7 +765,8 @@ static int if_cs_host_to_card(struct lbs_private *priv, ...@@ -761,7 +765,8 @@ static int if_cs_host_to_card(struct lbs_private *priv,
ret = if_cs_send_cmd(priv, buf, nb); ret = if_cs_send_cmd(priv, buf, nb);
break; break;
default: default:
pr_err("%s: unsupported type %d\n", __func__, type); netdev_err(priv->dev, "%s: unsupported type %d\n",
__func__, type);
} }
lbs_deb_leave_args(LBS_DEB_CS, "ret %d", ret); lbs_deb_leave_args(LBS_DEB_CS, "ret %d", ret);
......
...@@ -851,7 +851,7 @@ static int if_sdio_enter_deep_sleep(struct lbs_private *priv) ...@@ -851,7 +851,7 @@ static int if_sdio_enter_deep_sleep(struct lbs_private *priv)
ret = __lbs_cmd(priv, CMD_802_11_DEEP_SLEEP, &cmd, sizeof(cmd), ret = __lbs_cmd(priv, CMD_802_11_DEEP_SLEEP, &cmd, sizeof(cmd),
lbs_cmd_copyback, (unsigned long) &cmd); lbs_cmd_copyback, (unsigned long) &cmd);
if (ret) if (ret)
pr_err("DEEP_SLEEP cmd failed\n"); netdev_err(priv->dev, "DEEP_SLEEP cmd failed\n");
mdelay(200); mdelay(200);
return ret; return ret;
...@@ -867,7 +867,7 @@ static int if_sdio_exit_deep_sleep(struct lbs_private *priv) ...@@ -867,7 +867,7 @@ static int if_sdio_exit_deep_sleep(struct lbs_private *priv)
sdio_writeb(card->func, HOST_POWER_UP, CONFIGURATION_REG, &ret); sdio_writeb(card->func, HOST_POWER_UP, CONFIGURATION_REG, &ret);
if (ret) if (ret)
pr_err("sdio_writeb failed!\n"); netdev_err(priv->dev, "sdio_writeb failed!\n");
sdio_release_host(card->func); sdio_release_host(card->func);
lbs_deb_leave_args(LBS_DEB_SDIO, "ret %d", ret); lbs_deb_leave_args(LBS_DEB_SDIO, "ret %d", ret);
...@@ -884,7 +884,7 @@ static int if_sdio_reset_deep_sleep_wakeup(struct lbs_private *priv) ...@@ -884,7 +884,7 @@ static int if_sdio_reset_deep_sleep_wakeup(struct lbs_private *priv)
sdio_writeb(card->func, 0, CONFIGURATION_REG, &ret); sdio_writeb(card->func, 0, CONFIGURATION_REG, &ret);
if (ret) if (ret)
pr_err("sdio_writeb failed!\n"); netdev_err(priv->dev, "sdio_writeb failed!\n");
sdio_release_host(card->func); sdio_release_host(card->func);
lbs_deb_leave_args(LBS_DEB_SDIO, "ret %d", ret); lbs_deb_leave_args(LBS_DEB_SDIO, "ret %d", ret);
...@@ -1103,7 +1103,7 @@ static int if_sdio_probe(struct sdio_func *func, ...@@ -1103,7 +1103,7 @@ static int if_sdio_probe(struct sdio_func *func,
lbs_deb_sdio("send function INIT command\n"); lbs_deb_sdio("send function INIT command\n");
if (__lbs_cmd(priv, CMD_FUNC_INIT, &cmd, sizeof(cmd), if (__lbs_cmd(priv, CMD_FUNC_INIT, &cmd, sizeof(cmd),
lbs_cmd_copyback, (unsigned long) &cmd)) lbs_cmd_copyback, (unsigned long) &cmd))
pr_alert("CMD_FUNC_INIT cmd failed\n"); netdev_alert(priv->dev, "CMD_FUNC_INIT cmd failed\n");
} }
ret = lbs_start_card(priv); ret = lbs_start_card(priv);
...@@ -1204,19 +1204,20 @@ static int if_sdio_suspend(struct device *dev) ...@@ -1204,19 +1204,20 @@ static int if_sdio_suspend(struct device *dev)
mmc_pm_flag_t flags = sdio_get_host_pm_caps(func); mmc_pm_flag_t flags = sdio_get_host_pm_caps(func);
pr_info("%s: suspend: PM flags = 0x%x\n", sdio_func_id(func), flags); dev_info(dev, "%s: suspend: PM flags = 0x%x\n",
sdio_func_id(func), flags);
/* If we aren't being asked to wake on anything, we should bail out /* If we aren't being asked to wake on anything, we should bail out
* and let the SD stack power down the card. * and let the SD stack power down the card.
*/ */
if (card->priv->wol_criteria == EHS_REMOVE_WAKEUP) { if (card->priv->wol_criteria == EHS_REMOVE_WAKEUP) {
pr_info("Suspend without wake params -- powering down card\n"); dev_info(dev, "Suspend without wake params -- powering down card\n");
return -ENOSYS; return -ENOSYS;
} }
if (!(flags & MMC_PM_KEEP_POWER)) { if (!(flags & MMC_PM_KEEP_POWER)) {
pr_err("%s: cannot remain alive while host is suspended\n", dev_err(dev, "%s: cannot remain alive while host is suspended\n",
sdio_func_id(func)); sdio_func_id(func));
return -ENOSYS; return -ENOSYS;
} }
...@@ -1237,7 +1238,7 @@ static int if_sdio_resume(struct device *dev) ...@@ -1237,7 +1238,7 @@ static int if_sdio_resume(struct device *dev)
struct if_sdio_card *card = sdio_get_drvdata(func); struct if_sdio_card *card = sdio_get_drvdata(func);
int ret; int ret;
pr_info("%s: resume: we're back\n", sdio_func_id(func)); dev_info(dev, "%s: resume: we're back\n", sdio_func_id(func));
ret = lbs_resume(card->priv); ret = lbs_resume(card->priv);
......
...@@ -585,6 +585,7 @@ static int if_spi_prog_main_firmware_check_len(struct if_spi_card *card, ...@@ -585,6 +585,7 @@ static int if_spi_prog_main_firmware_check_len(struct if_spi_card *card,
static int if_spi_prog_main_firmware(struct if_spi_card *card, static int if_spi_prog_main_firmware(struct if_spi_card *card,
const struct firmware *firmware) const struct firmware *firmware)
{ {
struct lbs_private *priv = card->priv;
int len, prev_len; int len, prev_len;
int bytes, crc_err = 0, err = 0; int bytes, crc_err = 0, err = 0;
const u8 *fw; const u8 *fw;
...@@ -598,8 +599,9 @@ static int if_spi_prog_main_firmware(struct if_spi_card *card, ...@@ -598,8 +599,9 @@ static int if_spi_prog_main_firmware(struct if_spi_card *card,
err = spu_wait_for_u16(card, IF_SPI_SCRATCH_1_REG, 0, 0); err = spu_wait_for_u16(card, IF_SPI_SCRATCH_1_REG, 0, 0);
if (err) { if (err) {
pr_err("%s: timed out waiting for initial scratch reg = 0\n", netdev_err(priv->dev,
__func__); "%s: timed out waiting for initial scratch reg = 0\n",
__func__);
goto out; goto out;
} }
...@@ -617,7 +619,8 @@ static int if_spi_prog_main_firmware(struct if_spi_card *card, ...@@ -617,7 +619,8 @@ static int if_spi_prog_main_firmware(struct if_spi_card *card,
* If there are no more bytes left, we would normally * If there are no more bytes left, we would normally
* expect to have terminated with len = 0 * expect to have terminated with len = 0
*/ */
pr_err("Firmware load wants more bytes than we have to offer.\n"); netdev_err(priv->dev,
"Firmware load wants more bytes than we have to offer.\n");
break; break;
} }
if (crc_err) { if (crc_err) {
...@@ -706,12 +709,14 @@ static int if_spi_c2h_cmd(struct if_spi_card *card) ...@@ -706,12 +709,14 @@ static int if_spi_c2h_cmd(struct if_spi_card *card)
if (err) if (err)
goto out; goto out;
if (!len) { if (!len) {
pr_err("%s: error: card has no data for host\n", __func__); netdev_err(priv->dev, "%s: error: card has no data for host\n",
__func__);
err = -EINVAL; err = -EINVAL;
goto out; goto out;
} else if (len > IF_SPI_CMD_BUF_SIZE) { } else if (len > IF_SPI_CMD_BUF_SIZE) {
pr_err("%s: error: response packet too large: %d bytes, but maximum is %d\n", netdev_err(priv->dev,
__func__, len, IF_SPI_CMD_BUF_SIZE); "%s: error: response packet too large: %d bytes, but maximum is %d\n",
__func__, len, IF_SPI_CMD_BUF_SIZE);
err = -EINVAL; err = -EINVAL;
goto out; goto out;
} }
...@@ -732,7 +737,7 @@ static int if_spi_c2h_cmd(struct if_spi_card *card) ...@@ -732,7 +737,7 @@ static int if_spi_c2h_cmd(struct if_spi_card *card)
out: out:
if (err) if (err)
pr_err("%s: err=%d\n", __func__, err); netdev_err(priv->dev, "%s: err=%d\n", __func__, err);
lbs_deb_leave(LBS_DEB_SPI); lbs_deb_leave(LBS_DEB_SPI);
return err; return err;
} }
...@@ -740,6 +745,7 @@ static int if_spi_c2h_cmd(struct if_spi_card *card) ...@@ -740,6 +745,7 @@ static int if_spi_c2h_cmd(struct if_spi_card *card)
/* Move data from the card to the host */ /* Move data from the card to the host */
static int if_spi_c2h_data(struct if_spi_card *card) static int if_spi_c2h_data(struct if_spi_card *card)
{ {
struct lbs_private *priv = card->priv;
struct sk_buff *skb; struct sk_buff *skb;
char *data; char *data;
u16 len; u16 len;
...@@ -752,12 +758,14 @@ static int if_spi_c2h_data(struct if_spi_card *card) ...@@ -752,12 +758,14 @@ static int if_spi_c2h_data(struct if_spi_card *card)
if (err) if (err)
goto out; goto out;
if (!len) { if (!len) {
pr_err("%s: error: card has no data for host\n", __func__); netdev_err(priv->dev, "%s: error: card has no data for host\n",
__func__);
err = -EINVAL; err = -EINVAL;
goto out; goto out;
} else if (len > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE) { } else if (len > MRVDRV_ETH_RX_PACKET_BUFFER_SIZE) {
pr_err("%s: error: card has %d bytes of data, but our maximum skb size is %zu\n", netdev_err(priv->dev,
__func__, len, MRVDRV_ETH_RX_PACKET_BUFFER_SIZE); "%s: error: card has %d bytes of data, but our maximum skb size is %zu\n",
__func__, len, MRVDRV_ETH_RX_PACKET_BUFFER_SIZE);
err = -EINVAL; err = -EINVAL;
goto out; goto out;
} }
...@@ -788,7 +796,7 @@ static int if_spi_c2h_data(struct if_spi_card *card) ...@@ -788,7 +796,7 @@ static int if_spi_c2h_data(struct if_spi_card *card)
dev_kfree_skb(skb); dev_kfree_skb(skb);
out: out:
if (err) if (err)
pr_err("%s: err=%d\n", __func__, err); netdev_err(priv->dev, "%s: err=%d\n", __func__, err);
lbs_deb_leave(LBS_DEB_SPI); lbs_deb_leave(LBS_DEB_SPI);
return err; return err;
} }
...@@ -797,6 +805,7 @@ static int if_spi_c2h_data(struct if_spi_card *card) ...@@ -797,6 +805,7 @@ static int if_spi_c2h_data(struct if_spi_card *card)
static void if_spi_h2c(struct if_spi_card *card, static void if_spi_h2c(struct if_spi_card *card,
struct if_spi_packet *packet, int type) struct if_spi_packet *packet, int type)
{ {
struct lbs_private *priv = card->priv;
int err = 0; int err = 0;
u16 int_type, port_reg; u16 int_type, port_reg;
...@@ -810,7 +819,8 @@ static void if_spi_h2c(struct if_spi_card *card, ...@@ -810,7 +819,8 @@ static void if_spi_h2c(struct if_spi_card *card,
port_reg = IF_SPI_CMD_RDWRPORT_REG; port_reg = IF_SPI_CMD_RDWRPORT_REG;
break; break;
default: default:
pr_err("can't transfer buffer of type %d\n", type); netdev_err(priv->dev, "can't transfer buffer of type %d\n",
type);
err = -EINVAL; err = -EINVAL;
goto out; goto out;
} }
...@@ -824,7 +834,7 @@ static void if_spi_h2c(struct if_spi_card *card, ...@@ -824,7 +834,7 @@ static void if_spi_h2c(struct if_spi_card *card,
kfree(packet); kfree(packet);
if (err) if (err)
pr_err("%s: error %d\n", __func__, err); netdev_err(priv->dev, "%s: error %d\n", __func__, err);
} }
/* Inform the host about a card event */ /* Inform the host about a card event */
...@@ -848,7 +858,7 @@ static void if_spi_e2h(struct if_spi_card *card) ...@@ -848,7 +858,7 @@ static void if_spi_e2h(struct if_spi_card *card)
lbs_queue_event(priv, cause & 0xff); lbs_queue_event(priv, cause & 0xff);
out: out:
if (err) if (err)
pr_err("%s: error %d\n", __func__, err); netdev_err(priv->dev, "%s: error %d\n", __func__, err);
} }
static void if_spi_host_to_card_worker(struct work_struct *work) static void if_spi_host_to_card_worker(struct work_struct *work)
...@@ -858,8 +868,10 @@ static void if_spi_host_to_card_worker(struct work_struct *work) ...@@ -858,8 +868,10 @@ static void if_spi_host_to_card_worker(struct work_struct *work)
u16 hiStatus; u16 hiStatus;
unsigned long flags; unsigned long flags;
struct if_spi_packet *packet; struct if_spi_packet *packet;
struct lbs_private *priv;
card = container_of(work, struct if_spi_card, packet_work); card = container_of(work, struct if_spi_card, packet_work);
priv = card->priv;
lbs_deb_enter(LBS_DEB_SPI); lbs_deb_enter(LBS_DEB_SPI);
...@@ -870,7 +882,7 @@ static void if_spi_host_to_card_worker(struct work_struct *work) ...@@ -870,7 +882,7 @@ static void if_spi_host_to_card_worker(struct work_struct *work)
err = spu_read_u16(card, IF_SPI_HOST_INT_STATUS_REG, err = spu_read_u16(card, IF_SPI_HOST_INT_STATUS_REG,
&hiStatus); &hiStatus);
if (err) { if (err) {
pr_err("I/O error\n"); netdev_err(priv->dev, "I/O error\n");
goto err; goto err;
} }
...@@ -933,7 +945,7 @@ static void if_spi_host_to_card_worker(struct work_struct *work) ...@@ -933,7 +945,7 @@ static void if_spi_host_to_card_worker(struct work_struct *work)
err: err:
if (err) if (err)
pr_err("%s: got error %d\n", __func__, err); netdev_err(priv->dev, "%s: got error %d\n", __func__, err);
lbs_deb_leave(LBS_DEB_SPI); lbs_deb_leave(LBS_DEB_SPI);
} }
...@@ -956,7 +968,8 @@ static int if_spi_host_to_card(struct lbs_private *priv, ...@@ -956,7 +968,8 @@ static int if_spi_host_to_card(struct lbs_private *priv,
lbs_deb_enter_args(LBS_DEB_SPI, "type %d, bytes %d", type, nb); lbs_deb_enter_args(LBS_DEB_SPI, "type %d, bytes %d", type, nb);
if (nb == 0) { if (nb == 0) {
pr_err("%s: invalid size requested: %d\n", __func__, nb); netdev_err(priv->dev, "%s: invalid size requested: %d\n",
__func__, nb);
err = -EINVAL; err = -EINVAL;
goto out; goto out;
} }
...@@ -984,7 +997,8 @@ static int if_spi_host_to_card(struct lbs_private *priv, ...@@ -984,7 +997,8 @@ static int if_spi_host_to_card(struct lbs_private *priv,
spin_unlock_irqrestore(&card->buffer_lock, flags); spin_unlock_irqrestore(&card->buffer_lock, flags);
break; break;
default: default:
pr_err("can't transfer buffer of type %d\n", type); netdev_err(priv->dev, "can't transfer buffer of type %d\n",
type);
err = -EINVAL; err = -EINVAL;
break; break;
} }
...@@ -1017,6 +1031,7 @@ static irqreturn_t if_spi_host_interrupt(int irq, void *dev_id) ...@@ -1017,6 +1031,7 @@ static irqreturn_t if_spi_host_interrupt(int irq, void *dev_id)
static int if_spi_init_card(struct if_spi_card *card) static int if_spi_init_card(struct if_spi_card *card)
{ {
struct lbs_private *priv = card->priv;
struct spi_device *spi = card->spi; struct spi_device *spi = card->spi;
int err, i; int err, i;
u32 scratch; u32 scratch;
...@@ -1045,7 +1060,8 @@ static int if_spi_init_card(struct if_spi_card *card) ...@@ -1045,7 +1060,8 @@ static int if_spi_init_card(struct if_spi_card *card)
break; break;
} }
if (i == ARRAY_SIZE(fw_table)) { if (i == ARRAY_SIZE(fw_table)) {
pr_err("Unsupported chip_id: 0x%02x\n", card->card_id); netdev_err(priv->dev, "Unsupported chip_id: 0x%02x\n",
card->card_id);
err = -ENODEV; err = -ENODEV;
goto out; goto out;
} }
...@@ -1054,7 +1070,8 @@ static int if_spi_init_card(struct if_spi_card *card) ...@@ -1054,7 +1070,8 @@ static int if_spi_init_card(struct if_spi_card *card)
card->card_id, &fw_table[0], &helper, card->card_id, &fw_table[0], &helper,
&mainfw); &mainfw);
if (err) { if (err) {
pr_err("failed to find firmware (%d)\n", err); netdev_err(priv->dev, "failed to find firmware (%d)\n",
err);
goto out; goto out;
} }
......
...@@ -206,7 +206,7 @@ static void if_usb_setup_firmware(struct lbs_private *priv) ...@@ -206,7 +206,7 @@ static void if_usb_setup_firmware(struct lbs_private *priv)
wake_method.hdr.size = cpu_to_le16(sizeof(wake_method)); wake_method.hdr.size = cpu_to_le16(sizeof(wake_method));
wake_method.action = cpu_to_le16(CMD_ACT_GET); wake_method.action = cpu_to_le16(CMD_ACT_GET);
if (lbs_cmd_with_response(priv, CMD_802_11_FW_WAKE_METHOD, &wake_method)) { if (lbs_cmd_with_response(priv, CMD_802_11_FW_WAKE_METHOD, &wake_method)) {
pr_info("Firmware does not seem to support PS mode\n"); netdev_info(priv->dev, "Firmware does not seem to support PS mode\n");
priv->fwcapinfo &= ~FW_CAPINFO_PS; priv->fwcapinfo &= ~FW_CAPINFO_PS;
} else { } else {
if (le16_to_cpu(wake_method.method) == CMD_WAKE_METHOD_COMMAND_INT) { if (le16_to_cpu(wake_method.method) == CMD_WAKE_METHOD_COMMAND_INT) {
...@@ -215,7 +215,8 @@ static void if_usb_setup_firmware(struct lbs_private *priv) ...@@ -215,7 +215,8 @@ static void if_usb_setup_firmware(struct lbs_private *priv)
/* The versions which boot up this way don't seem to /* The versions which boot up this way don't seem to
work even if we set it to the command interrupt */ work even if we set it to the command interrupt */
priv->fwcapinfo &= ~FW_CAPINFO_PS; priv->fwcapinfo &= ~FW_CAPINFO_PS;
pr_info("Firmware doesn't wake via command interrupt; disabling PS mode\n"); netdev_info(priv->dev,
"Firmware doesn't wake via command interrupt; disabling PS mode\n");
} }
} }
} }
...@@ -351,10 +352,12 @@ static int if_usb_probe(struct usb_interface *intf, ...@@ -351,10 +352,12 @@ static int if_usb_probe(struct usb_interface *intf,
usb_set_intfdata(intf, cardp); usb_set_intfdata(intf, cardp);
if (device_create_file(&priv->dev->dev, &dev_attr_lbs_flash_fw)) if (device_create_file(&priv->dev->dev, &dev_attr_lbs_flash_fw))
pr_err("cannot register lbs_flash_fw attribute\n"); netdev_err(priv->dev,
"cannot register lbs_flash_fw attribute\n");
if (device_create_file(&priv->dev->dev, &dev_attr_lbs_flash_boot2)) if (device_create_file(&priv->dev->dev, &dev_attr_lbs_flash_boot2))
pr_err("cannot register lbs_flash_boot2 attribute\n"); netdev_err(priv->dev,
"cannot register lbs_flash_boot2 attribute\n");
/* /*
* EHS_REMOVE_WAKEUP is not supported on all versions of the firmware. * EHS_REMOVE_WAKEUP is not supported on all versions of the firmware.
......
...@@ -444,8 +444,8 @@ static int lbs_thread(void *data) ...@@ -444,8 +444,8 @@ static int lbs_thread(void *data)
if (priv->cmd_timed_out && priv->cur_cmd) { if (priv->cmd_timed_out && priv->cur_cmd) {
struct cmd_ctrl_node *cmdnode = priv->cur_cmd; struct cmd_ctrl_node *cmdnode = priv->cur_cmd;
pr_info("Timeout submitting command 0x%04x\n", netdev_info(dev, "Timeout submitting command 0x%04x\n",
le16_to_cpu(cmdnode->cmdbuf->command)); le16_to_cpu(cmdnode->cmdbuf->command));
lbs_complete_command(priv, cmdnode, -ETIMEDOUT); lbs_complete_command(priv, cmdnode, -ETIMEDOUT);
if (priv->reset_card) if (priv->reset_card)
priv->reset_card(priv); priv->reset_card(priv);
...@@ -472,7 +472,8 @@ static int lbs_thread(void *data) ...@@ -472,7 +472,8 @@ static int lbs_thread(void *data)
* after firmware fixes it * after firmware fixes it
*/ */
priv->psstate = PS_STATE_AWAKE; priv->psstate = PS_STATE_AWAKE;
pr_alert("ignore PS_SleepConfirm in non-connected state\n"); netdev_alert(dev,
"ignore PS_SleepConfirm in non-connected state\n");
} }
} }
...@@ -566,7 +567,8 @@ int lbs_suspend(struct lbs_private *priv) ...@@ -566,7 +567,8 @@ int lbs_suspend(struct lbs_private *priv)
if (priv->is_deep_sleep) { if (priv->is_deep_sleep) {
ret = lbs_set_deep_sleep(priv, 0); ret = lbs_set_deep_sleep(priv, 0);
if (ret) { if (ret) {
pr_err("deep sleep cancellation failed: %d\n", ret); netdev_err(priv->dev,
"deep sleep cancellation failed: %d\n", ret);
return ret; return ret;
} }
priv->deep_sleep_required = 1; priv->deep_sleep_required = 1;
...@@ -599,7 +601,8 @@ int lbs_resume(struct lbs_private *priv) ...@@ -599,7 +601,8 @@ int lbs_resume(struct lbs_private *priv)
priv->deep_sleep_required = 0; priv->deep_sleep_required = 0;
ret = lbs_set_deep_sleep(priv, 1); ret = lbs_set_deep_sleep(priv, 1);
if (ret) if (ret)
pr_err("deep sleep activation failed: %d\n", ret); netdev_err(priv->dev,
"deep sleep activation failed: %d\n", ret);
} }
if (priv->setup_fw_on_resume) if (priv->setup_fw_on_resume)
...@@ -627,8 +630,8 @@ static void lbs_cmd_timeout_handler(unsigned long data) ...@@ -627,8 +630,8 @@ static void lbs_cmd_timeout_handler(unsigned long data)
if (!priv->cur_cmd) if (!priv->cur_cmd)
goto out; goto out;
pr_info("command 0x%04x timed out\n", netdev_info(priv->dev, "command 0x%04x timed out\n",
le16_to_cpu(priv->cur_cmd->cmdbuf->command)); le16_to_cpu(priv->cur_cmd->cmdbuf->command));
priv->cmd_timed_out = 1; priv->cmd_timed_out = 1;
wake_up_interruptible(&priv->waitq); wake_up_interruptible(&priv->waitq);
...@@ -945,7 +948,7 @@ int lbs_start_card(struct lbs_private *priv) ...@@ -945,7 +948,7 @@ int lbs_start_card(struct lbs_private *priv)
lbs_debugfs_init_one(priv, dev); lbs_debugfs_init_one(priv, dev);
pr_info("%s: Marvell WLAN 802.11 adapter\n", dev->name); netdev_info(dev, "Marvell WLAN 802.11 adapter\n");
ret = 0; ret = 0;
...@@ -1072,14 +1075,16 @@ int lbs_get_firmware(struct device *dev, const char *user_helper, ...@@ -1072,14 +1075,16 @@ int lbs_get_firmware(struct device *dev, const char *user_helper,
if (user_helper) { if (user_helper) {
ret = request_firmware(helper, user_helper, dev); ret = request_firmware(helper, user_helper, dev);
if (ret) { if (ret) {
pr_err("couldn't find helper firmware %s", user_helper); dev_err(dev, "couldn't find helper firmware %s\n",
user_helper);
goto fail; goto fail;
} }
} }
if (user_mainfw) { if (user_mainfw) {
ret = request_firmware(mainfw, user_mainfw, dev); ret = request_firmware(mainfw, user_mainfw, dev);
if (ret) { if (ret) {
pr_err("couldn't find main firmware %s", user_mainfw); dev_err(dev, "couldn't find main firmware %s\n",
user_mainfw);
goto fail; goto fail;
} }
} }
......
...@@ -269,7 +269,7 @@ int lbs_init_mesh(struct lbs_private *priv) ...@@ -269,7 +269,7 @@ int lbs_init_mesh(struct lbs_private *priv)
lbs_add_mesh(priv); lbs_add_mesh(priv);
if (device_create_file(&dev->dev, &dev_attr_lbs_mesh)) if (device_create_file(&dev->dev, &dev_attr_lbs_mesh))
pr_err("cannot register lbs_mesh attribute\n"); netdev_err(dev, "cannot register lbs_mesh attribute\n");
ret = 1; ret = 1;
} }
...@@ -975,7 +975,7 @@ static ssize_t mesh_id_get(struct device *dev, struct device_attribute *attr, ...@@ -975,7 +975,7 @@ static ssize_t mesh_id_get(struct device *dev, struct device_attribute *attr,
return ret; return ret;
if (defs.meshie.val.mesh_id_len > IEEE80211_MAX_SSID_LEN) { if (defs.meshie.val.mesh_id_len > IEEE80211_MAX_SSID_LEN) {
pr_err("inconsistent mesh ID length\n"); dev_err(dev, "inconsistent mesh ID length\n");
defs.meshie.val.mesh_id_len = IEEE80211_MAX_SSID_LEN; defs.meshie.val.mesh_id_len = IEEE80211_MAX_SSID_LEN;
} }
......
...@@ -251,7 +251,7 @@ static int process_rxed_802_11_packet(struct lbs_private *priv, ...@@ -251,7 +251,7 @@ static int process_rxed_802_11_packet(struct lbs_private *priv,
/* add space for the new radio header */ /* add space for the new radio header */
if ((skb_headroom(skb) < sizeof(struct rx_radiotap_hdr)) && if ((skb_headroom(skb) < sizeof(struct rx_radiotap_hdr)) &&
pskb_expand_head(skb, sizeof(struct rx_radiotap_hdr), 0, GFP_ATOMIC)) { pskb_expand_head(skb, sizeof(struct rx_radiotap_hdr), 0, GFP_ATOMIC)) {
pr_alert("%s: couldn't pskb_expand_head\n", __func__); netdev_alert(dev, "%s: couldn't pskb_expand_head\n", __func__);
ret = -ENOMEM; ret = -ENOMEM;
kfree_skb(skb); kfree_skb(skb);
goto done; goto done;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment