Commit 1770ae9d authored by Tobin C. Harding's avatar Tobin C. Harding Committed by Greg Kroah-Hartman

staging: ks7010: rename return value identifier

Driver uses multiple identifier names for the same task (retval, ret,
rc). It would be easier to read the code if a single task is
identified with a single name. 'ret' is the most common return value
identifier name found in the kernel tree, following the principle of
least surprise using 'ret' is a decent choice.

Rename rc -> ret
Rename retval -> ret
Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1e765f31
...@@ -52,44 +52,48 @@ static int ks7010_sdio_read(struct ks_wlan_private *priv, unsigned int address, ...@@ -52,44 +52,48 @@ static int ks7010_sdio_read(struct ks_wlan_private *priv, unsigned int address,
unsigned char *buffer, int length) unsigned char *buffer, int length)
{ {
struct ks_sdio_card *card; struct ks_sdio_card *card;
int rc; int ret;
card = priv->ks_wlan_hw.sdio_card; card = priv->ks_wlan_hw.sdio_card;
if (length == 1) /* CMD52 */ if (length == 1) /* CMD52 */
*buffer = sdio_readb(card->func, address, &rc); *buffer = sdio_readb(card->func, address, &ret);
else /* CMD53 multi-block transfer */ else /* CMD53 multi-block transfer */
rc = sdio_memcpy_fromio(card->func, buffer, address, length); ret = sdio_memcpy_fromio(card->func, buffer, address, length);
if (rc) if (ret) {
DPRINTK(1, "sdio error=%d size=%d\n", rc, length); DPRINTK(1, "sdio error=%d size=%d\n", ret, length);
return ret;
}
return rc; return 0;
} }
static int ks7010_sdio_write(struct ks_wlan_private *priv, unsigned int address, static int ks7010_sdio_write(struct ks_wlan_private *priv, unsigned int address,
unsigned char *buffer, int length) unsigned char *buffer, int length)
{ {
struct ks_sdio_card *card; struct ks_sdio_card *card;
int rc; int ret;
card = priv->ks_wlan_hw.sdio_card; card = priv->ks_wlan_hw.sdio_card;
if (length == 1) /* CMD52 */ if (length == 1) /* CMD52 */
sdio_writeb(card->func, *buffer, address, &rc); sdio_writeb(card->func, *buffer, address, &ret);
else /* CMD53 */ else /* CMD53 */
rc = sdio_memcpy_toio(card->func, address, buffer, length); ret = sdio_memcpy_toio(card->func, address, buffer, length);
if (rc) if (ret) {
DPRINTK(1, "sdio error=%d size=%d\n", rc, length); DPRINTK(1, "sdio error=%d size=%d\n", ret, length);
return ret;
}
return rc; return 0;
} }
static void ks_wlan_hw_sleep_doze_request(struct ks_wlan_private *priv) static void ks_wlan_hw_sleep_doze_request(struct ks_wlan_private *priv)
{ {
unsigned char rw_data; unsigned char rw_data;
int retval; int ret;
DPRINTK(4, "\n"); DPRINTK(4, "\n");
...@@ -98,9 +102,8 @@ static void ks_wlan_hw_sleep_doze_request(struct ks_wlan_private *priv) ...@@ -98,9 +102,8 @@ static void ks_wlan_hw_sleep_doze_request(struct ks_wlan_private *priv)
if (atomic_read(&priv->sleepstatus.status) == 0) { if (atomic_read(&priv->sleepstatus.status) == 0) {
rw_data = GCR_B_DOZE; rw_data = GCR_B_DOZE;
retval = ret = ks7010_sdio_write(priv, GCR_B, &rw_data, sizeof(rw_data));
ks7010_sdio_write(priv, GCR_B, &rw_data, sizeof(rw_data)); if (ret) {
if (retval) {
DPRINTK(1, " error : GCR_B=%02X\n", rw_data); DPRINTK(1, " error : GCR_B=%02X\n", rw_data);
goto set_sleep_mode; goto set_sleep_mode;
} }
...@@ -119,7 +122,7 @@ static void ks_wlan_hw_sleep_doze_request(struct ks_wlan_private *priv) ...@@ -119,7 +122,7 @@ static void ks_wlan_hw_sleep_doze_request(struct ks_wlan_private *priv)
static void ks_wlan_hw_sleep_wakeup_request(struct ks_wlan_private *priv) static void ks_wlan_hw_sleep_wakeup_request(struct ks_wlan_private *priv)
{ {
unsigned char rw_data; unsigned char rw_data;
int retval; int ret;
DPRINTK(4, "\n"); DPRINTK(4, "\n");
...@@ -128,9 +131,8 @@ static void ks_wlan_hw_sleep_wakeup_request(struct ks_wlan_private *priv) ...@@ -128,9 +131,8 @@ static void ks_wlan_hw_sleep_wakeup_request(struct ks_wlan_private *priv)
if (atomic_read(&priv->sleepstatus.status) == 1) { if (atomic_read(&priv->sleepstatus.status) == 1) {
rw_data = WAKEUP_REQ; rw_data = WAKEUP_REQ;
retval = ret = ks7010_sdio_write(priv, WAKEUP, &rw_data, sizeof(rw_data));
ks7010_sdio_write(priv, WAKEUP, &rw_data, sizeof(rw_data)); if (ret) {
if (retval) {
DPRINTK(1, " error : WAKEUP=%02X\n", rw_data); DPRINTK(1, " error : WAKEUP=%02X\n", rw_data);
goto set_sleep_mode; goto set_sleep_mode;
} }
...@@ -149,14 +151,13 @@ static void ks_wlan_hw_sleep_wakeup_request(struct ks_wlan_private *priv) ...@@ -149,14 +151,13 @@ static void ks_wlan_hw_sleep_wakeup_request(struct ks_wlan_private *priv)
void ks_wlan_hw_wakeup_request(struct ks_wlan_private *priv) void ks_wlan_hw_wakeup_request(struct ks_wlan_private *priv)
{ {
unsigned char rw_data; unsigned char rw_data;
int retval; int ret;
DPRINTK(4, "\n"); DPRINTK(4, "\n");
if (atomic_read(&priv->psstatus.status) == PS_SNOOZE) { if (atomic_read(&priv->psstatus.status) == PS_SNOOZE) {
rw_data = WAKEUP_REQ; rw_data = WAKEUP_REQ;
retval = ret = ks7010_sdio_write(priv, WAKEUP, &rw_data, sizeof(rw_data));
ks7010_sdio_write(priv, WAKEUP, &rw_data, sizeof(rw_data)); if (ret)
if (retval)
DPRINTK(1, " error : WAKEUP=%02X\n", rw_data); DPRINTK(1, " error : WAKEUP=%02X\n", rw_data);
DPRINTK(4, "wake up : WAKEUP=%02X\n", rw_data); DPRINTK(4, "wake up : WAKEUP=%02X\n", rw_data);
...@@ -241,17 +242,17 @@ static int enqueue_txdev(struct ks_wlan_private *priv, unsigned char *p, ...@@ -241,17 +242,17 @@ static int enqueue_txdev(struct ks_wlan_private *priv, unsigned char *p,
void *arg1, void *arg2) void *arg1, void *arg2)
{ {
struct tx_device_buffer *sp; struct tx_device_buffer *sp;
int rc; int ret;
if (priv->dev_state < DEVICE_STATE_BOOT) { if (priv->dev_state < DEVICE_STATE_BOOT) {
rc = -EPERM; ret = -EPERM;
goto err_complete; goto err_complete;
} }
if ((TX_DEVICE_BUFF_SIZE - 1) <= cnt_txqbody(priv)) { if ((TX_DEVICE_BUFF_SIZE - 1) <= cnt_txqbody(priv)) {
/* in case of buffer overflow */ /* in case of buffer overflow */
DPRINTK(1, "tx buffer overflow\n"); DPRINTK(1, "tx buffer overflow\n");
rc = -EOVERFLOW; ret = -EOVERFLOW;
goto err_complete; goto err_complete;
} }
...@@ -270,7 +271,7 @@ static int enqueue_txdev(struct ks_wlan_private *priv, unsigned char *p, ...@@ -270,7 +271,7 @@ static int enqueue_txdev(struct ks_wlan_private *priv, unsigned char *p,
if (complete_handler) if (complete_handler)
(*complete_handler) (arg1, arg2); (*complete_handler) (arg1, arg2);
return rc; return ret;
} }
/* write data */ /* write data */
...@@ -279,7 +280,7 @@ static int write_to_device(struct ks_wlan_private *priv, unsigned char *buffer, ...@@ -279,7 +280,7 @@ static int write_to_device(struct ks_wlan_private *priv, unsigned char *buffer,
{ {
unsigned char rw_data; unsigned char rw_data;
struct hostif_hdr *hdr; struct hostif_hdr *hdr;
int rc; int ret;
hdr = (struct hostif_hdr *)buffer; hdr = (struct hostif_hdr *)buffer;
...@@ -289,17 +290,17 @@ static int write_to_device(struct ks_wlan_private *priv, unsigned char *buffer, ...@@ -289,17 +290,17 @@ static int write_to_device(struct ks_wlan_private *priv, unsigned char *buffer,
return 0; return 0;
} }
rc = ks7010_sdio_write(priv, DATA_WINDOW, buffer, size); ret = ks7010_sdio_write(priv, DATA_WINDOW, buffer, size);
if (rc) { if (ret) {
DPRINTK(1, " write error : retval=%d\n", rc); DPRINTK(1, " write error : retval=%d\n", ret);
return rc; return ret;
} }
rw_data = WRITE_STATUS_BUSY; rw_data = WRITE_STATUS_BUSY;
rc = ks7010_sdio_write(priv, WRITE_STATUS, &rw_data, sizeof(rw_data)); ret = ks7010_sdio_write(priv, WRITE_STATUS, &rw_data, sizeof(rw_data));
if (rc) { if (ret) {
DPRINTK(1, " error : WRITE_STATUS=%02X\n", rw_data); DPRINTK(1, " error : WRITE_STATUS=%02X\n", rw_data);
return rc; return ret;
} }
return 0; return 0;
...@@ -461,7 +462,7 @@ static void ks7010_rw_function(struct work_struct *work) ...@@ -461,7 +462,7 @@ static void ks7010_rw_function(struct work_struct *work)
struct hw_info_t *hw; struct hw_info_t *hw;
struct ks_wlan_private *priv; struct ks_wlan_private *priv;
unsigned char rw_data; unsigned char rw_data;
int retval; int ret;
hw = container_of(work, struct hw_info_t, rw_wq.work); hw = container_of(work, struct hw_info_t, rw_wq.work);
priv = container_of(hw, struct ks_wlan_private, ks_wlan_hw); priv = container_of(hw, struct ks_wlan_private, ks_wlan_hw);
...@@ -510,9 +511,8 @@ static void ks7010_rw_function(struct work_struct *work) ...@@ -510,9 +511,8 @@ static void ks7010_rw_function(struct work_struct *work)
} }
/* read (WriteStatus/ReadDataSize FN1:00_0014) */ /* read (WriteStatus/ReadDataSize FN1:00_0014) */
retval = ret = ks7010_sdio_read(priv, WSTATUS_RSIZE, &rw_data, sizeof(rw_data));
ks7010_sdio_read(priv, WSTATUS_RSIZE, &rw_data, sizeof(rw_data)); if (ret) {
if (retval) {
DPRINTK(1, " error : WSTATUS_RSIZE=%02X psstatus=%d\n", rw_data, DPRINTK(1, " error : WSTATUS_RSIZE=%02X psstatus=%d\n", rw_data,
atomic_read(&priv->psstatus.status)); atomic_read(&priv->psstatus.status));
goto err_release_host; goto err_release_host;
...@@ -656,7 +656,7 @@ static void trx_device_exit(struct ks_wlan_private *priv) ...@@ -656,7 +656,7 @@ static void trx_device_exit(struct ks_wlan_private *priv)
static int ks7010_sdio_update_index(struct ks_wlan_private *priv, u32 index) static int ks7010_sdio_update_index(struct ks_wlan_private *priv, u32 index)
{ {
int rc; int ret;
unsigned char *data_buf; unsigned char *data_buf;
data_buf = kmalloc(sizeof(u32), GFP_KERNEL); data_buf = kmalloc(sizeof(u32), GFP_KERNEL);
...@@ -664,12 +664,12 @@ static int ks7010_sdio_update_index(struct ks_wlan_private *priv, u32 index) ...@@ -664,12 +664,12 @@ static int ks7010_sdio_update_index(struct ks_wlan_private *priv, u32 index)
return -ENOMEM; return -ENOMEM;
memcpy(data_buf, &index, sizeof(index)); memcpy(data_buf, &index, sizeof(index));
rc = ks7010_sdio_write(priv, WRITE_INDEX, data_buf, sizeof(index)); ret = ks7010_sdio_write(priv, WRITE_INDEX, data_buf, sizeof(index));
if (rc) if (ret)
goto err_free_data_buf; goto err_free_data_buf;
rc = ks7010_sdio_write(priv, READ_INDEX, data_buf, sizeof(index)); ret = ks7010_sdio_write(priv, READ_INDEX, data_buf, sizeof(index));
if (rc) if (ret)
goto err_free_data_buf; goto err_free_data_buf;
return 0; return 0;
...@@ -677,27 +677,27 @@ static int ks7010_sdio_update_index(struct ks_wlan_private *priv, u32 index) ...@@ -677,27 +677,27 @@ static int ks7010_sdio_update_index(struct ks_wlan_private *priv, u32 index)
err_free_data_buf: err_free_data_buf:
kfree(data_buf); kfree(data_buf);
return rc; return ret;
} }
#define ROM_BUFF_SIZE (64 * 1024) #define ROM_BUFF_SIZE (64 * 1024)
static int ks7010_sdio_data_compare(struct ks_wlan_private *priv, u32 address, static int ks7010_sdio_data_compare(struct ks_wlan_private *priv, u32 address,
unsigned char *data, unsigned int size) unsigned char *data, unsigned int size)
{ {
int rc; int ret;
unsigned char *read_buf; unsigned char *read_buf;
read_buf = kmalloc(ROM_BUFF_SIZE, GFP_KERNEL); read_buf = kmalloc(ROM_BUFF_SIZE, GFP_KERNEL);
if (!read_buf) if (!read_buf)
return -ENOMEM; return -ENOMEM;
rc = ks7010_sdio_read(priv, address, read_buf, size); ret = ks7010_sdio_read(priv, address, read_buf, size);
if (rc) if (ret)
goto err_free_read_buf; goto err_free_read_buf;
rc = memcmp(data, read_buf, size); ret = memcmp(data, read_buf, size);
if (rc) { if (ret) {
DPRINTK(0, "data compare error (%d)\n", rc); DPRINTK(0, "data compare error (%d)\n", ret);
goto err_free_read_buf; goto err_free_read_buf;
} }
...@@ -706,7 +706,7 @@ static int ks7010_sdio_data_compare(struct ks_wlan_private *priv, u32 address, ...@@ -706,7 +706,7 @@ static int ks7010_sdio_data_compare(struct ks_wlan_private *priv, u32 address,
err_free_read_buf: err_free_read_buf:
kfree(read_buf); kfree(read_buf);
return rc; return ret;
} }
static int ks7010_upload_firmware(struct ks_wlan_private *priv, static int ks7010_upload_firmware(struct ks_wlan_private *priv,
...@@ -715,7 +715,7 @@ static int ks7010_upload_firmware(struct ks_wlan_private *priv, ...@@ -715,7 +715,7 @@ static int ks7010_upload_firmware(struct ks_wlan_private *priv,
unsigned int size, offset, n = 0; unsigned int size, offset, n = 0;
unsigned char *rom_buf; unsigned char *rom_buf;
unsigned char rw_data = 0; unsigned char rw_data = 0;
int rc; int ret;
int length; int length;
const struct firmware *fw_entry = NULL; const struct firmware *fw_entry = NULL;
...@@ -727,14 +727,15 @@ static int ks7010_upload_firmware(struct ks_wlan_private *priv, ...@@ -727,14 +727,15 @@ static int ks7010_upload_firmware(struct ks_wlan_private *priv,
sdio_claim_host(card->func); sdio_claim_host(card->func);
/* Firmware running ? */ /* Firmware running ? */
rc = ks7010_sdio_read(priv, GCR_A, &rw_data, sizeof(rw_data)); ret = ks7010_sdio_read(priv, GCR_A, &rw_data, sizeof(rw_data));
if (rw_data == GCR_A_RUN) { if (rw_data == GCR_A_RUN) {
DPRINTK(0, "MAC firmware running ...\n"); DPRINTK(0, "MAC firmware running ...\n");
goto release_host_and_free; goto release_host_and_free;
} }
rc = request_firmware(&fw_entry, ROM_FILE, &priv->ks_wlan_hw.sdio_card->func->dev); ret = request_firmware(&fw_entry, ROM_FILE,
if (rc) &priv->ks_wlan_hw.sdio_card->func->dev);
if (ret)
goto release_host_and_free; goto release_host_and_free;
length = fw_entry->size; length = fw_entry->size;
...@@ -755,19 +756,18 @@ static int ks7010_upload_firmware(struct ks_wlan_private *priv, ...@@ -755,19 +756,18 @@ static int ks7010_upload_firmware(struct ks_wlan_private *priv,
memcpy(rom_buf, fw_entry->data + n, size); memcpy(rom_buf, fw_entry->data + n, size);
/* Update write index */ /* Update write index */
offset = n; offset = n;
rc = ks7010_sdio_update_index(priv, ret = ks7010_sdio_update_index(priv, KS7010_IRAM_ADDRESS + offset);
KS7010_IRAM_ADDRESS + offset); if (ret)
if (rc)
goto release_firmware; goto release_firmware;
/* Write data */ /* Write data */
rc = ks7010_sdio_write(priv, DATA_WINDOW, rom_buf, size); ret = ks7010_sdio_write(priv, DATA_WINDOW, rom_buf, size);
if (rc) if (ret)
goto release_firmware; goto release_firmware;
/* compare */ /* compare */
rc = ks7010_sdio_data_compare(priv, DATA_WINDOW, rom_buf, size); ret = ks7010_sdio_data_compare(priv, DATA_WINDOW, rom_buf, size);
if (rc) if (ret)
goto release_firmware; goto release_firmware;
n += size; n += size;
...@@ -776,8 +776,8 @@ static int ks7010_upload_firmware(struct ks_wlan_private *priv, ...@@ -776,8 +776,8 @@ static int ks7010_upload_firmware(struct ks_wlan_private *priv,
/* Remap request */ /* Remap request */
rw_data = GCR_A_REMAP; rw_data = GCR_A_REMAP;
rc = ks7010_sdio_write(priv, GCR_A, &rw_data, sizeof(rw_data)); ret = ks7010_sdio_write(priv, GCR_A, &rw_data, sizeof(rw_data));
if (rc) if (ret)
goto release_firmware; goto release_firmware;
DPRINTK(4, " REMAP Request : GCR_A=%02X\n", rw_data); DPRINTK(4, " REMAP Request : GCR_A=%02X\n", rw_data);
...@@ -785,8 +785,8 @@ static int ks7010_upload_firmware(struct ks_wlan_private *priv, ...@@ -785,8 +785,8 @@ static int ks7010_upload_firmware(struct ks_wlan_private *priv,
/* Firmware running check */ /* Firmware running check */
for (n = 0; n < 50; ++n) { for (n = 0; n < 50; ++n) {
mdelay(10); /* wait_ms(10); */ mdelay(10); /* wait_ms(10); */
rc = ks7010_sdio_read(priv, GCR_A, &rw_data, sizeof(rw_data)); ret = ks7010_sdio_read(priv, GCR_A, &rw_data, sizeof(rw_data));
if (rc) if (ret)
goto release_firmware; goto release_firmware;
if (rw_data == GCR_A_RUN) if (rw_data == GCR_A_RUN)
...@@ -795,11 +795,11 @@ static int ks7010_upload_firmware(struct ks_wlan_private *priv, ...@@ -795,11 +795,11 @@ static int ks7010_upload_firmware(struct ks_wlan_private *priv,
DPRINTK(4, "firmware wakeup (%d)!!!!\n", n); DPRINTK(4, "firmware wakeup (%d)!!!!\n", n);
if ((50) <= n) { if ((50) <= n) {
DPRINTK(1, "firmware can't start\n"); DPRINTK(1, "firmware can't start\n");
rc = -EIO; ret = -EIO;
goto release_firmware; goto release_firmware;
} }
rc = 0; ret = 0;
release_firmware: release_firmware:
release_firmware(fw_entry); release_firmware(fw_entry);
...@@ -807,7 +807,7 @@ static int ks7010_upload_firmware(struct ks_wlan_private *priv, ...@@ -807,7 +807,7 @@ static int ks7010_upload_firmware(struct ks_wlan_private *priv,
sdio_release_host(card->func); sdio_release_host(card->func);
kfree(rom_buf); kfree(rom_buf);
return rc; return ret;
} }
static void ks7010_card_init(struct ks_wlan_private *priv) static void ks7010_card_init(struct ks_wlan_private *priv)
......
...@@ -402,7 +402,7 @@ void hostif_data_indication(struct ks_wlan_private *priv) ...@@ -402,7 +402,7 @@ void hostif_data_indication(struct ks_wlan_private *priv)
unsigned short eth_proto; unsigned short eth_proto;
struct ieee802_1x_hdr *aa1x_hdr; struct ieee802_1x_hdr *aa1x_hdr;
struct wpa_eapol_key *eap_key; struct wpa_eapol_key *eap_key;
int rc; int ret;
DPRINTK(3, "\n"); DPRINTK(3, "\n");
...@@ -434,8 +434,8 @@ void hostif_data_indication(struct ks_wlan_private *priv) ...@@ -434,8 +434,8 @@ void hostif_data_indication(struct ks_wlan_private *priv)
/* for WPA */ /* for WPA */
if (auth_type != TYPE_DATA && priv->wpa.rsn_enabled) { if (auth_type != TYPE_DATA && priv->wpa.rsn_enabled) {
rc = hostif_data_indication_wpa(priv, auth_type); ret = hostif_data_indication_wpa(priv, auth_type);
if (rc) if (ret)
return; return;
} }
...@@ -1124,12 +1124,12 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *packet) ...@@ -1124,12 +1124,12 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *packet)
struct ieee802_1x_hdr *aa1x_hdr; struct ieee802_1x_hdr *aa1x_hdr;
struct wpa_eapol_key *eap_key; struct wpa_eapol_key *eap_key;
struct ethhdr *eth; struct ethhdr *eth;
int rc; int ret;
packet_len = packet->len; packet_len = packet->len;
if (packet_len > ETH_FRAME_LEN) { if (packet_len > ETH_FRAME_LEN) {
DPRINTK(1, "bad length packet_len=%d\n", packet_len); DPRINTK(1, "bad length packet_len=%d\n", packet_len);
rc = -EOVERFLOW; ret = -EOVERFLOW;
goto err_kfree_skb; goto err_kfree_skb;
} }
...@@ -1157,7 +1157,7 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *packet) ...@@ -1157,7 +1157,7 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *packet)
if (!pp) { if (!pp) {
DPRINTK(3, "allocate memory failed..\n"); DPRINTK(3, "allocate memory failed..\n");
rc = -ENOMEM; ret = -ENOMEM;
goto err_kfree_skb; goto err_kfree_skb;
} }
...@@ -1171,7 +1171,7 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *packet) ...@@ -1171,7 +1171,7 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *packet)
if (memcmp(&priv->eth_addr[0], eth->h_source, ETH_ALEN)) { if (memcmp(&priv->eth_addr[0], eth->h_source, ETH_ALEN)) {
DPRINTK(1, "invalid mac address !!\n"); DPRINTK(1, "invalid mac address !!\n");
DPRINTK(1, "ethernet->h_source=%pM\n", eth->h_source); DPRINTK(1, "ethernet->h_source=%pM\n", eth->h_source);
rc = -ENXIO; ret = -ENXIO;
goto err_kfree; goto err_kfree;
} }
...@@ -1281,7 +1281,7 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *packet) ...@@ -1281,7 +1281,7 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *packet)
err_kfree_skb: err_kfree_skb:
dev_kfree_skb(packet); dev_kfree_skb(packet);
return rc; return ret;
} }
#define ps_confirm_wait_inc(priv) do { \ #define ps_confirm_wait_inc(priv) do { \
......
...@@ -2842,20 +2842,20 @@ static const struct iw_handler_def ks_wlan_handler_def = { ...@@ -2842,20 +2842,20 @@ static const struct iw_handler_def ks_wlan_handler_def = {
static int ks_wlan_netdev_ioctl(struct net_device *dev, struct ifreq *rq, static int ks_wlan_netdev_ioctl(struct net_device *dev, struct ifreq *rq,
int cmd) int cmd)
{ {
int rc = 0; int ret;
struct iwreq *wrq = (struct iwreq *)rq; struct iwreq *wrq = (struct iwreq *)rq;
switch (cmd) { switch (cmd) {
case SIOCIWFIRSTPRIV + 20: /* KS_WLAN_SET_STOP_REQ */ case SIOCIWFIRSTPRIV + 20: /* KS_WLAN_SET_STOP_REQ */
rc = ks_wlan_set_stop_request(dev, NULL, &wrq->u.mode, NULL); ret = ks_wlan_set_stop_request(dev, NULL, &wrq->u.mode, NULL);
break; break;
// All other calls are currently unsupported // All other calls are currently unsupported
default: default:
rc = -EOPNOTSUPP; ret = -EOPNOTSUPP;
} }
DPRINTK(5, "return=%d\n", rc); DPRINTK(5, "return=%d\n", ret);
return rc; return ret;
} }
static static
......
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