Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: Staging: fix wireless drivers depends Staging: wireless drivers Kconfig change Staging: android: mark subsystem as broken Staging: remove stlc45xx driver Staging: rtl8187se/rtl8192e/rtl8192su: allow module unload Staging: vt6656: fix the memory free bug in vntwusb_disconnect() Staging: Panel: prevent driver from calling misc_deregister twice on same ressource Staging: hv: fix oops in vmbus - missing #include Staging: hv: fix oops in vmbus - netvsc list_head Staging: hv: fix oops in vmbus - udev events Staging: hv: Fix vmbus load hang caused by faulty data packing Staging: hv: Fix null pointer error after vmbus loading Staging: hv TODO patches
This commit is contained in:
commit
b6727b12dd
|
@ -93,8 +93,6 @@ source "drivers/staging/dst/Kconfig"
|
||||||
|
|
||||||
source "drivers/staging/pohmelfs/Kconfig"
|
source "drivers/staging/pohmelfs/Kconfig"
|
||||||
|
|
||||||
source "drivers/staging/stlc45xx/Kconfig"
|
|
||||||
|
|
||||||
source "drivers/staging/b3dfg/Kconfig"
|
source "drivers/staging/b3dfg/Kconfig"
|
||||||
|
|
||||||
source "drivers/staging/phison/Kconfig"
|
source "drivers/staging/phison/Kconfig"
|
||||||
|
|
|
@ -29,7 +29,6 @@ obj-$(CONFIG_ANDROID) += android/
|
||||||
obj-$(CONFIG_ANDROID) += dream/
|
obj-$(CONFIG_ANDROID) += dream/
|
||||||
obj-$(CONFIG_DST) += dst/
|
obj-$(CONFIG_DST) += dst/
|
||||||
obj-$(CONFIG_POHMELFS) += pohmelfs/
|
obj-$(CONFIG_POHMELFS) += pohmelfs/
|
||||||
obj-$(CONFIG_STLC45XX) += stlc45xx/
|
|
||||||
obj-$(CONFIG_B3DFG) += b3dfg/
|
obj-$(CONFIG_B3DFG) += b3dfg/
|
||||||
obj-$(CONFIG_IDE_PHISON) += phison/
|
obj-$(CONFIG_IDE_PHISON) += phison/
|
||||||
obj-$(CONFIG_PLAN9AUTH) += p9auth/
|
obj-$(CONFIG_PLAN9AUTH) += p9auth/
|
||||||
|
|
|
@ -2,6 +2,7 @@ menu "Android"
|
||||||
|
|
||||||
config ANDROID
|
config ANDROID
|
||||||
bool "Android Drivers"
|
bool "Android Drivers"
|
||||||
|
depends on BROKEN
|
||||||
default N
|
default N
|
||||||
---help---
|
---help---
|
||||||
Enable support for various drivers needed on the Android platform
|
Enable support for various drivers needed on the Android platform
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
#define _CHANNEL_MGMT_H_
|
#define _CHANNEL_MGMT_H_
|
||||||
|
|
||||||
#include <linux/list.h>
|
#include <linux/list.h>
|
||||||
|
#include <linux/timer.h>
|
||||||
#include "RingBuffer.h"
|
#include "RingBuffer.h"
|
||||||
#include "VmbusChannelInterface.h"
|
#include "VmbusChannelInterface.h"
|
||||||
#include "VmbusPacketFormat.h"
|
#include "VmbusPacketFormat.h"
|
||||||
|
@ -54,7 +55,7 @@ enum vmbus_channel_message_type {
|
||||||
ChannelMessageViewRangeRemove = 18,
|
ChannelMessageViewRangeRemove = 18,
|
||||||
#endif
|
#endif
|
||||||
ChannelMessageCount
|
ChannelMessageCount
|
||||||
} __attribute__((packed));
|
};
|
||||||
|
|
||||||
struct vmbus_channel_message_header {
|
struct vmbus_channel_message_header {
|
||||||
enum vmbus_channel_message_type MessageType;
|
enum vmbus_channel_message_type MessageType;
|
||||||
|
|
|
@ -1052,7 +1052,7 @@ static void NetVscOnReceive(struct hv_device *Device,
|
||||||
*/
|
*/
|
||||||
spin_lock_irqsave(&netDevice->receive_packet_list_lock, flags);
|
spin_lock_irqsave(&netDevice->receive_packet_list_lock, flags);
|
||||||
while (!list_empty(&netDevice->ReceivePacketList)) {
|
while (!list_empty(&netDevice->ReceivePacketList)) {
|
||||||
list_move_tail(&netDevice->ReceivePacketList, &listHead);
|
list_move_tail(netDevice->ReceivePacketList.next, &listHead);
|
||||||
if (++count == vmxferpagePacket->RangeCount + 1)
|
if (++count == vmxferpagePacket->RangeCount + 1)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1071,7 +1071,7 @@ static void NetVscOnReceive(struct hv_device *Device,
|
||||||
/* Return it to the freelist */
|
/* Return it to the freelist */
|
||||||
spin_lock_irqsave(&netDevice->receive_packet_list_lock, flags);
|
spin_lock_irqsave(&netDevice->receive_packet_list_lock, flags);
|
||||||
for (i = count; i != 0; i--) {
|
for (i = count; i != 0; i--) {
|
||||||
list_move_tail(&listHead,
|
list_move_tail(listHead.next,
|
||||||
&netDevice->ReceivePacketList);
|
&netDevice->ReceivePacketList);
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&netDevice->receive_packet_list_lock,
|
spin_unlock_irqrestore(&netDevice->receive_packet_list_lock,
|
||||||
|
@ -1085,8 +1085,7 @@ static void NetVscOnReceive(struct hv_device *Device,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Remove the 1st packet to represent the xfer page packet itself */
|
/* Remove the 1st packet to represent the xfer page packet itself */
|
||||||
xferpagePacket = list_entry(&listHead, struct xferpage_packet,
|
xferpagePacket = (struct xferpage_packet*)listHead.next;
|
||||||
ListEntry);
|
|
||||||
list_del(&xferpagePacket->ListEntry);
|
list_del(&xferpagePacket->ListEntry);
|
||||||
|
|
||||||
/* This is how much we can satisfy */
|
/* This is how much we can satisfy */
|
||||||
|
@ -1102,8 +1101,7 @@ static void NetVscOnReceive(struct hv_device *Device,
|
||||||
|
|
||||||
/* Each range represents 1 RNDIS pkt that contains 1 ethernet frame */
|
/* Each range represents 1 RNDIS pkt that contains 1 ethernet frame */
|
||||||
for (i = 0; i < (count - 1); i++) {
|
for (i = 0; i < (count - 1); i++) {
|
||||||
netvscPacket = list_entry(&listHead, struct hv_netvsc_packet,
|
netvscPacket = (struct hv_netvsc_packet*)listHead.next;
|
||||||
ListEntry);
|
|
||||||
list_del(&netvscPacket->ListEntry);
|
list_del(&netvscPacket->ListEntry);
|
||||||
|
|
||||||
/* Initialize the netvsc packet */
|
/* Initialize the netvsc packet */
|
||||||
|
|
|
@ -1,11 +1,17 @@
|
||||||
TODO:
|
TODO:
|
||||||
- fix remaining checkpatch warnings and errors
|
- fix remaining checkpatch warnings and errors
|
||||||
|
- use of /** when it is not a kerneldoc header
|
||||||
- remove RingBuffer.c to us in-kernel ringbuffer functions instead.
|
- remove RingBuffer.c to us in-kernel ringbuffer functions instead.
|
||||||
- audit the vmbus to verify it is working properly with the
|
- audit the vmbus to verify it is working properly with the
|
||||||
driver model
|
driver model
|
||||||
|
- convert vmbus driver interface function pointer tables
|
||||||
|
to constant, a.k.a vmbus_ops
|
||||||
- see if the vmbus can be merged with the other virtual busses
|
- see if the vmbus can be merged with the other virtual busses
|
||||||
in the kernel
|
in the kernel
|
||||||
- audit the network driver
|
- audit the network driver
|
||||||
|
- use existing net_device_stats struct in network device
|
||||||
|
- checking for carrier inside open is wrong, network device API
|
||||||
|
confusion??
|
||||||
- audit the block driver
|
- audit the block driver
|
||||||
- audit the scsi driver
|
- audit the scsi driver
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#ifndef _OSD_H_
|
#ifndef _OSD_H_
|
||||||
#define _OSD_H_
|
#define _OSD_H_
|
||||||
|
|
||||||
|
#include <linux/workqueue.h>
|
||||||
|
|
||||||
/* Defines */
|
/* Defines */
|
||||||
#define ALIGN_UP(value, align) (((value) & (align-1)) ? \
|
#define ALIGN_UP(value, align) (((value) & (align-1)) ? \
|
||||||
|
|
|
@ -507,12 +507,12 @@ static struct hv_device *vmbus_child_device_create(struct hv_guid *type,
|
||||||
|
|
||||||
child_device_obj = &child_device_ctx->device_obj;
|
child_device_obj = &child_device_ctx->device_obj;
|
||||||
child_device_obj->context = context;
|
child_device_obj->context = context;
|
||||||
memcpy(&child_device_obj->deviceType, &type, sizeof(struct hv_guid));
|
memcpy(&child_device_obj->deviceType, type, sizeof(struct hv_guid));
|
||||||
memcpy(&child_device_obj->deviceInstance, &instance,
|
memcpy(&child_device_obj->deviceInstance, instance,
|
||||||
sizeof(struct hv_guid));
|
sizeof(struct hv_guid));
|
||||||
|
|
||||||
memcpy(&child_device_ctx->class_id, &type, sizeof(struct hv_guid));
|
memcpy(&child_device_ctx->class_id, type, sizeof(struct hv_guid));
|
||||||
memcpy(&child_device_ctx->device_id, &instance, sizeof(struct hv_guid));
|
memcpy(&child_device_ctx->device_id, instance, sizeof(struct hv_guid));
|
||||||
|
|
||||||
DPRINT_EXIT(VMBUS_DRV);
|
DPRINT_EXIT(VMBUS_DRV);
|
||||||
|
|
||||||
|
@ -537,18 +537,7 @@ static int vmbus_child_device_register(struct hv_device *root_device_obj,
|
||||||
DPRINT_DBG(VMBUS_DRV, "child device (%p) registering",
|
DPRINT_DBG(VMBUS_DRV, "child device (%p) registering",
|
||||||
child_device_ctx);
|
child_device_ctx);
|
||||||
|
|
||||||
/* Make sure we are not registered already */
|
/* Set the device name. Otherwise, device_register() will fail. */
|
||||||
if (strlen(dev_name(&child_device_ctx->device)) != 0) {
|
|
||||||
DPRINT_ERR(VMBUS_DRV,
|
|
||||||
"child device (%p) already registered - busid %s",
|
|
||||||
child_device_ctx,
|
|
||||||
dev_name(&child_device_ctx->device));
|
|
||||||
|
|
||||||
ret = -1;
|
|
||||||
goto Cleanup;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Set the device bus id. Otherwise, device_register()will fail. */
|
|
||||||
dev_set_name(&child_device_ctx->device, "vmbus_0_%d",
|
dev_set_name(&child_device_ctx->device, "vmbus_0_%d",
|
||||||
atomic_inc_return(&device_num));
|
atomic_inc_return(&device_num));
|
||||||
|
|
||||||
|
@ -573,7 +562,6 @@ static int vmbus_child_device_register(struct hv_device *root_device_obj,
|
||||||
DPRINT_INFO(VMBUS_DRV, "child device (%p) registered",
|
DPRINT_INFO(VMBUS_DRV, "child device (%p) registered",
|
||||||
&child_device_ctx->device);
|
&child_device_ctx->device);
|
||||||
|
|
||||||
Cleanup:
|
|
||||||
DPRINT_EXIT(VMBUS_DRV);
|
DPRINT_EXIT(VMBUS_DRV);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -623,8 +611,6 @@ static void vmbus_child_device_destroy(struct hv_device *device_obj)
|
||||||
static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env)
|
static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env)
|
||||||
{
|
{
|
||||||
struct device_context *device_ctx = device_to_device_context(device);
|
struct device_context *device_ctx = device_to_device_context(device);
|
||||||
int i = 0;
|
|
||||||
int len = 0;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
DPRINT_ENTER(VMBUS_DRV);
|
DPRINT_ENTER(VMBUS_DRV);
|
||||||
|
@ -644,8 +630,6 @@ static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env)
|
||||||
device_ctx->class_id.data[14],
|
device_ctx->class_id.data[14],
|
||||||
device_ctx->class_id.data[15]);
|
device_ctx->class_id.data[15]);
|
||||||
|
|
||||||
env->envp_idx = i;
|
|
||||||
env->buflen = len;
|
|
||||||
ret = add_uevent_var(env, "VMBUS_DEVICE_CLASS_GUID={"
|
ret = add_uevent_var(env, "VMBUS_DEVICE_CLASS_GUID={"
|
||||||
"%02x%02x%02x%02x-%02x%02x-%02x%02x-"
|
"%02x%02x%02x%02x-%02x%02x-%02x%02x-"
|
||||||
"%02x%02x%02x%02x%02x%02x%02x%02x}",
|
"%02x%02x%02x%02x%02x%02x%02x%02x}",
|
||||||
|
@ -691,8 +675,6 @@ static int vmbus_uevent(struct device *device, struct kobj_uevent_env *env)
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
env->envp[env->envp_idx] = NULL;
|
|
||||||
|
|
||||||
DPRINT_EXIT(VMBUS_DRV);
|
DPRINT_EXIT(VMBUS_DRV);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
config OTUS
|
config OTUS
|
||||||
tristate "Atheros OTUS 802.11n USB wireless support"
|
tristate "Atheros OTUS 802.11n USB wireless support"
|
||||||
depends on USB && WLAN_80211 && MAC80211
|
depends on USB && WLAN && MAC80211
|
||||||
default N
|
default N
|
||||||
---help---
|
---help---
|
||||||
Enable support for Atheros 802.11n USB hardware:
|
Enable support for Atheros 802.11n USB hardware:
|
||||||
|
|
|
@ -2071,11 +2071,15 @@ static void panel_detach(struct parport *port)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (keypad_enabled && keypad_initialized)
|
if (keypad_enabled && keypad_initialized) {
|
||||||
misc_deregister(&keypad_dev);
|
misc_deregister(&keypad_dev);
|
||||||
|
keypad_initialized = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (lcd_enabled && lcd_initialized)
|
if (lcd_enabled && lcd_initialized) {
|
||||||
misc_deregister(&lcd_dev);
|
misc_deregister(&lcd_dev);
|
||||||
|
lcd_initialized = 0;
|
||||||
|
}
|
||||||
|
|
||||||
parport_release(pprt);
|
parport_release(pprt);
|
||||||
parport_unregister_device(pprt);
|
parport_unregister_device(pprt);
|
||||||
|
@ -2211,13 +2215,16 @@ static void __exit panel_cleanup_module(void)
|
||||||
del_timer(&scan_timer);
|
del_timer(&scan_timer);
|
||||||
|
|
||||||
if (pprt != NULL) {
|
if (pprt != NULL) {
|
||||||
if (keypad_enabled)
|
if (keypad_enabled) {
|
||||||
misc_deregister(&keypad_dev);
|
misc_deregister(&keypad_dev);
|
||||||
|
keypad_initialized = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (lcd_enabled) {
|
if (lcd_enabled) {
|
||||||
panel_lcd_print("\x0cLCD driver " PANEL_VERSION
|
panel_lcd_print("\x0cLCD driver " PANEL_VERSION
|
||||||
"\nunloaded.\x1b[Lc\x1b[Lb\x1b[L-");
|
"\nunloaded.\x1b[Lc\x1b[Lb\x1b[L-");
|
||||||
misc_deregister(&lcd_dev);
|
misc_deregister(&lcd_dev);
|
||||||
|
lcd_initialized = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: free all input signals */
|
/* TODO: free all input signals */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
config RT2860
|
config RT2860
|
||||||
tristate "Ralink 2860 wireless support"
|
tristate "Ralink 2860 wireless support"
|
||||||
depends on PCI && X86 && WLAN_80211
|
depends on PCI && X86 && WLAN
|
||||||
---help---
|
---help---
|
||||||
This is an experimental driver for the Ralink 2860 wireless chip.
|
This is an experimental driver for the Ralink 2860 wireless chip.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
config RT2870
|
config RT2870
|
||||||
tristate "Ralink 2870/3070 wireless support"
|
tristate "Ralink 2870/3070 wireless support"
|
||||||
depends on USB && X86 && WLAN_80211
|
depends on USB && X86 && WLAN
|
||||||
---help---
|
---help---
|
||||||
This is an experimental driver for the Ralink xx70 wireless chips.
|
This is an experimental driver for the Ralink xx70 wireless chips.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
config RT3090
|
config RT3090
|
||||||
tristate "Ralink 3090 wireless support"
|
tristate "Ralink 3090 wireless support"
|
||||||
depends on PCI && X86 && WLAN_80211
|
depends on PCI && X86 && WLAN
|
||||||
---help---
|
---help---
|
||||||
This is an experimental driver for the Ralink 3090 wireless chip.
|
This is an experimental driver for the Ralink 3090 wireless chip.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
config RTL8187SE
|
config RTL8187SE
|
||||||
tristate "RealTek RTL8187SE Wireless LAN NIC driver"
|
tristate "RealTek RTL8187SE Wireless LAN NIC driver"
|
||||||
depends on PCI
|
depends on PCI && WLAN
|
||||||
depends on WIRELESS_EXT
|
depends on WIRELESS_EXT
|
||||||
default N
|
default N
|
||||||
---help---
|
---help---
|
||||||
|
|
|
@ -53,10 +53,8 @@ void ieee80211_crypt_deinit_entries(struct ieee80211_device *ieee,
|
||||||
|
|
||||||
list_del(ptr);
|
list_del(ptr);
|
||||||
|
|
||||||
if (entry->ops) {
|
if (entry->ops)
|
||||||
entry->ops->deinit(entry->priv);
|
entry->ops->deinit(entry->priv);
|
||||||
module_put(entry->ops->owner);
|
|
||||||
}
|
|
||||||
kfree(entry);
|
kfree(entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,10 +189,8 @@ void free_ieee80211(struct net_device *dev)
|
||||||
for (i = 0; i < WEP_KEYS; i++) {
|
for (i = 0; i < WEP_KEYS; i++) {
|
||||||
struct ieee80211_crypt_data *crypt = ieee->crypt[i];
|
struct ieee80211_crypt_data *crypt = ieee->crypt[i];
|
||||||
if (crypt) {
|
if (crypt) {
|
||||||
if (crypt->ops) {
|
if (crypt->ops)
|
||||||
crypt->ops->deinit(crypt->priv);
|
crypt->ops->deinit(crypt->priv);
|
||||||
module_put(crypt->ops->owner);
|
|
||||||
}
|
|
||||||
kfree(crypt);
|
kfree(crypt);
|
||||||
ieee->crypt[i] = NULL;
|
ieee->crypt[i] = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2839,16 +2839,12 @@ static int ieee80211_wpa_set_encryption(struct ieee80211_device *ieee,
|
||||||
goto skip_host_crypt;
|
goto skip_host_crypt;
|
||||||
|
|
||||||
ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
|
ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
|
||||||
if (ops == NULL && strcmp(param->u.crypt.alg, "WEP") == 0) {
|
if (ops == NULL && strcmp(param->u.crypt.alg, "WEP") == 0)
|
||||||
request_module("ieee80211_crypt_wep");
|
|
||||||
ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
|
ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
|
||||||
} else if (ops == NULL && strcmp(param->u.crypt.alg, "TKIP") == 0) {
|
else if (ops == NULL && strcmp(param->u.crypt.alg, "TKIP") == 0)
|
||||||
request_module("ieee80211_crypt_tkip");
|
|
||||||
ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
|
ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
|
||||||
} else if (ops == NULL && strcmp(param->u.crypt.alg, "CCMP") == 0) {
|
else if (ops == NULL && strcmp(param->u.crypt.alg, "CCMP") == 0)
|
||||||
request_module("ieee80211_crypt_ccmp");
|
|
||||||
ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
|
ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
|
||||||
}
|
|
||||||
if (ops == NULL) {
|
if (ops == NULL) {
|
||||||
printk("unknown crypto alg '%s'\n", param->u.crypt.alg);
|
printk("unknown crypto alg '%s'\n", param->u.crypt.alg);
|
||||||
param->u.crypt.err = IEEE_CRYPT_ERR_UNKNOWN_ALG;
|
param->u.crypt.err = IEEE_CRYPT_ERR_UNKNOWN_ALG;
|
||||||
|
@ -2869,7 +2865,7 @@ static int ieee80211_wpa_set_encryption(struct ieee80211_device *ieee,
|
||||||
}
|
}
|
||||||
memset(new_crypt, 0, sizeof(struct ieee80211_crypt_data));
|
memset(new_crypt, 0, sizeof(struct ieee80211_crypt_data));
|
||||||
new_crypt->ops = ops;
|
new_crypt->ops = ops;
|
||||||
if (new_crypt->ops && try_module_get(new_crypt->ops->owner))
|
if (new_crypt->ops)
|
||||||
new_crypt->priv =
|
new_crypt->priv =
|
||||||
new_crypt->ops->init(param->u.crypt.idx);
|
new_crypt->ops->init(param->u.crypt.idx);
|
||||||
|
|
||||||
|
|
|
@ -331,12 +331,10 @@ int ieee80211_wx_set_encode(struct ieee80211_device *ieee,
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
memset(new_crypt, 0, sizeof(struct ieee80211_crypt_data));
|
memset(new_crypt, 0, sizeof(struct ieee80211_crypt_data));
|
||||||
new_crypt->ops = ieee80211_get_crypto_ops("WEP");
|
new_crypt->ops = ieee80211_get_crypto_ops("WEP");
|
||||||
if (!new_crypt->ops) {
|
if (!new_crypt->ops)
|
||||||
request_module("ieee80211_crypt_wep");
|
|
||||||
new_crypt->ops = ieee80211_get_crypto_ops("WEP");
|
new_crypt->ops = ieee80211_get_crypto_ops("WEP");
|
||||||
}
|
|
||||||
|
|
||||||
if (new_crypt->ops && try_module_get(new_crypt->ops->owner))
|
if (new_crypt->ops)
|
||||||
new_crypt->priv = new_crypt->ops->init(key);
|
new_crypt->priv = new_crypt->ops->init(key);
|
||||||
|
|
||||||
if (!new_crypt->ops || !new_crypt->priv) {
|
if (!new_crypt->ops || !new_crypt->priv) {
|
||||||
|
@ -483,7 +481,7 @@ int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
|
||||||
struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
|
struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
|
||||||
int i, idx, ret = 0;
|
int i, idx, ret = 0;
|
||||||
int group_key = 0;
|
int group_key = 0;
|
||||||
const char *alg, *module;
|
const char *alg;
|
||||||
struct ieee80211_crypto_ops *ops;
|
struct ieee80211_crypto_ops *ops;
|
||||||
struct ieee80211_crypt_data **crypt;
|
struct ieee80211_crypt_data **crypt;
|
||||||
|
|
||||||
|
@ -539,15 +537,12 @@ int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
|
||||||
switch (ext->alg) {
|
switch (ext->alg) {
|
||||||
case IW_ENCODE_ALG_WEP:
|
case IW_ENCODE_ALG_WEP:
|
||||||
alg = "WEP";
|
alg = "WEP";
|
||||||
module = "ieee80211_crypt_wep";
|
|
||||||
break;
|
break;
|
||||||
case IW_ENCODE_ALG_TKIP:
|
case IW_ENCODE_ALG_TKIP:
|
||||||
alg = "TKIP";
|
alg = "TKIP";
|
||||||
module = "ieee80211_crypt_tkip";
|
|
||||||
break;
|
break;
|
||||||
case IW_ENCODE_ALG_CCMP:
|
case IW_ENCODE_ALG_CCMP:
|
||||||
alg = "CCMP";
|
alg = "CCMP";
|
||||||
module = "ieee80211_crypt_ccmp";
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
IEEE80211_DEBUG_WX("%s: unknown crypto alg %d\n",
|
IEEE80211_DEBUG_WX("%s: unknown crypto alg %d\n",
|
||||||
|
@ -558,10 +553,8 @@ int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
|
||||||
// printk("8-09-08-9=====>%s, alg name:%s\n",__func__, alg);
|
// printk("8-09-08-9=====>%s, alg name:%s\n",__func__, alg);
|
||||||
|
|
||||||
ops = ieee80211_get_crypto_ops(alg);
|
ops = ieee80211_get_crypto_ops(alg);
|
||||||
if (ops == NULL) {
|
if (ops == NULL)
|
||||||
request_module(module);
|
|
||||||
ops = ieee80211_get_crypto_ops(alg);
|
ops = ieee80211_get_crypto_ops(alg);
|
||||||
}
|
|
||||||
if (ops == NULL) {
|
if (ops == NULL) {
|
||||||
IEEE80211_DEBUG_WX("%s: unknown crypto alg %d\n",
|
IEEE80211_DEBUG_WX("%s: unknown crypto alg %d\n",
|
||||||
dev->name, ext->alg);
|
dev->name, ext->alg);
|
||||||
|
@ -581,7 +574,7 @@ int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
new_crypt->ops = ops;
|
new_crypt->ops = ops;
|
||||||
if (new_crypt->ops && try_module_get(new_crypt->ops->owner))
|
if (new_crypt->ops)
|
||||||
new_crypt->priv = new_crypt->ops->init(idx);
|
new_crypt->priv = new_crypt->ops->init(idx);
|
||||||
if (new_crypt->priv == NULL) {
|
if (new_crypt->priv == NULL) {
|
||||||
kfree(new_crypt);
|
kfree(new_crypt);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
config RTL8192E
|
config RTL8192E
|
||||||
tristate "RealTek RTL8192E Wireless LAN NIC driver"
|
tristate "RealTek RTL8192E Wireless LAN NIC driver"
|
||||||
depends on PCI
|
depends on PCI && WLAN
|
||||||
depends on WIRELESS_EXT
|
depends on WIRELESS_EXT
|
||||||
default N
|
default N
|
||||||
---help---
|
---help---
|
||||||
|
|
|
@ -53,14 +53,8 @@ void ieee80211_crypt_deinit_entries(struct ieee80211_device *ieee,
|
||||||
|
|
||||||
list_del(ptr);
|
list_del(ptr);
|
||||||
|
|
||||||
if (entry->ops) {
|
if (entry->ops)
|
||||||
entry->ops->deinit(entry->priv);
|
entry->ops->deinit(entry->priv);
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
|
|
||||||
module_put(entry->ops->owner);
|
|
||||||
#else
|
|
||||||
__MOD_DEC_USE_COUNT(entry->ops->owner);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
kfree(entry);
|
kfree(entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -242,14 +242,8 @@ void free_ieee80211(struct net_device *dev)
|
||||||
for (i = 0; i < WEP_KEYS; i++) {
|
for (i = 0; i < WEP_KEYS; i++) {
|
||||||
struct ieee80211_crypt_data *crypt = ieee->crypt[i];
|
struct ieee80211_crypt_data *crypt = ieee->crypt[i];
|
||||||
if (crypt) {
|
if (crypt) {
|
||||||
if (crypt->ops) {
|
if (crypt->ops)
|
||||||
crypt->ops->deinit(crypt->priv);
|
crypt->ops->deinit(crypt->priv);
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
|
|
||||||
module_put(crypt->ops->owner);
|
|
||||||
#else
|
|
||||||
__MOD_DEC_USE_COUNT(crypt->ops->owner);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
kfree(crypt);
|
kfree(crypt);
|
||||||
ieee->crypt[i] = NULL;
|
ieee->crypt[i] = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3284,17 +3284,14 @@ static int ieee80211_wpa_set_encryption(struct ieee80211_device *ieee,
|
||||||
goto skip_host_crypt;
|
goto skip_host_crypt;
|
||||||
|
|
||||||
ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
|
ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
|
||||||
if (ops == NULL && strcmp(param->u.crypt.alg, "WEP") == 0) {
|
if (ops == NULL && strcmp(param->u.crypt.alg, "WEP") == 0)
|
||||||
request_module("ieee80211_crypt_wep");
|
|
||||||
ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
|
ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
|
||||||
//set WEP40 first, it will be modified according to WEP104 or WEP40 at other place
|
/* set WEP40 first, it will be modified according to WEP104 or
|
||||||
} else if (ops == NULL && strcmp(param->u.crypt.alg, "TKIP") == 0) {
|
* WEP40 at other place */
|
||||||
request_module("ieee80211_crypt_tkip");
|
else if (ops == NULL && strcmp(param->u.crypt.alg, "TKIP") == 0)
|
||||||
ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
|
ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
|
||||||
} else if (ops == NULL && strcmp(param->u.crypt.alg, "CCMP") == 0) {
|
else if (ops == NULL && strcmp(param->u.crypt.alg, "CCMP") == 0)
|
||||||
request_module("ieee80211_crypt_ccmp");
|
|
||||||
ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
|
ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
|
||||||
}
|
|
||||||
if (ops == NULL) {
|
if (ops == NULL) {
|
||||||
printk("unknown crypto alg '%s'\n", param->u.crypt.alg);
|
printk("unknown crypto alg '%s'\n", param->u.crypt.alg);
|
||||||
param->u.crypt.err = IEEE_CRYPT_ERR_UNKNOWN_ALG;
|
param->u.crypt.err = IEEE_CRYPT_ERR_UNKNOWN_ALG;
|
||||||
|
@ -3315,11 +3312,7 @@ static int ieee80211_wpa_set_encryption(struct ieee80211_device *ieee,
|
||||||
}
|
}
|
||||||
memset(new_crypt, 0, sizeof(struct ieee80211_crypt_data));
|
memset(new_crypt, 0, sizeof(struct ieee80211_crypt_data));
|
||||||
new_crypt->ops = ops;
|
new_crypt->ops = ops;
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
|
if (new_crypt->ops)
|
||||||
if (new_crypt->ops && try_module_get(new_crypt->ops->owner))
|
|
||||||
#else
|
|
||||||
if (new_crypt->ops && try_inc_mod_count(new_crypt->ops->owner))
|
|
||||||
#endif
|
|
||||||
new_crypt->priv =
|
new_crypt->priv =
|
||||||
new_crypt->ops->init(param->u.crypt.idx);
|
new_crypt->ops->init(param->u.crypt.idx);
|
||||||
|
|
||||||
|
|
|
@ -482,15 +482,9 @@ int ieee80211_wx_set_encode(struct ieee80211_device *ieee,
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
memset(new_crypt, 0, sizeof(struct ieee80211_crypt_data));
|
memset(new_crypt, 0, sizeof(struct ieee80211_crypt_data));
|
||||||
new_crypt->ops = ieee80211_get_crypto_ops("WEP");
|
new_crypt->ops = ieee80211_get_crypto_ops("WEP");
|
||||||
if (!new_crypt->ops) {
|
if (!new_crypt->ops)
|
||||||
request_module("ieee80211_crypt_wep");
|
|
||||||
new_crypt->ops = ieee80211_get_crypto_ops("WEP");
|
new_crypt->ops = ieee80211_get_crypto_ops("WEP");
|
||||||
}
|
if (new_crypt->ops)
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
|
|
||||||
if (new_crypt->ops && try_module_get(new_crypt->ops->owner))
|
|
||||||
#else
|
|
||||||
if (new_crypt->ops && try_inc_mod_count(new_crypt->ops->owner))
|
|
||||||
#endif
|
|
||||||
new_crypt->priv = new_crypt->ops->init(key);
|
new_crypt->priv = new_crypt->ops->init(key);
|
||||||
|
|
||||||
if (!new_crypt->ops || !new_crypt->priv) {
|
if (!new_crypt->ops || !new_crypt->priv) {
|
||||||
|
@ -644,7 +638,7 @@ int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
|
||||||
struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
|
struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
|
||||||
int i, idx;
|
int i, idx;
|
||||||
int group_key = 0;
|
int group_key = 0;
|
||||||
const char *alg, *module;
|
const char *alg;
|
||||||
struct ieee80211_crypto_ops *ops;
|
struct ieee80211_crypto_ops *ops;
|
||||||
struct ieee80211_crypt_data **crypt;
|
struct ieee80211_crypt_data **crypt;
|
||||||
|
|
||||||
|
@ -711,15 +705,12 @@ int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
|
||||||
switch (ext->alg) {
|
switch (ext->alg) {
|
||||||
case IW_ENCODE_ALG_WEP:
|
case IW_ENCODE_ALG_WEP:
|
||||||
alg = "WEP";
|
alg = "WEP";
|
||||||
module = "ieee80211_crypt_wep";
|
|
||||||
break;
|
break;
|
||||||
case IW_ENCODE_ALG_TKIP:
|
case IW_ENCODE_ALG_TKIP:
|
||||||
alg = "TKIP";
|
alg = "TKIP";
|
||||||
module = "ieee80211_crypt_tkip";
|
|
||||||
break;
|
break;
|
||||||
case IW_ENCODE_ALG_CCMP:
|
case IW_ENCODE_ALG_CCMP:
|
||||||
alg = "CCMP";
|
alg = "CCMP";
|
||||||
module = "ieee80211_crypt_ccmp";
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
IEEE80211_DEBUG_WX("%s: unknown crypto alg %d\n",
|
IEEE80211_DEBUG_WX("%s: unknown crypto alg %d\n",
|
||||||
|
@ -730,10 +721,8 @@ int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
|
||||||
printk("alg name:%s\n",alg);
|
printk("alg name:%s\n",alg);
|
||||||
|
|
||||||
ops = ieee80211_get_crypto_ops(alg);
|
ops = ieee80211_get_crypto_ops(alg);
|
||||||
if (ops == NULL) {
|
if (ops == NULL)
|
||||||
request_module(module);
|
|
||||||
ops = ieee80211_get_crypto_ops(alg);
|
ops = ieee80211_get_crypto_ops(alg);
|
||||||
}
|
|
||||||
if (ops == NULL) {
|
if (ops == NULL) {
|
||||||
IEEE80211_DEBUG_WX("%s: unknown crypto alg %d\n",
|
IEEE80211_DEBUG_WX("%s: unknown crypto alg %d\n",
|
||||||
dev->name, ext->alg);
|
dev->name, ext->alg);
|
||||||
|
@ -758,7 +747,7 @@ int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
new_crypt->ops = ops;
|
new_crypt->ops = ops;
|
||||||
if (new_crypt->ops && try_module_get(new_crypt->ops->owner))
|
if (new_crypt->ops)
|
||||||
new_crypt->priv = new_crypt->ops->init(idx);
|
new_crypt->priv = new_crypt->ops->init(idx);
|
||||||
if (new_crypt->priv == NULL) {
|
if (new_crypt->priv == NULL) {
|
||||||
kfree(new_crypt);
|
kfree(new_crypt);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
config RTL8192SU
|
config RTL8192SU
|
||||||
tristate "RealTek RTL8192SU Wireless LAN NIC driver"
|
tristate "RealTek RTL8192SU Wireless LAN NIC driver"
|
||||||
depends on PCI
|
depends on PCI && WLAN
|
||||||
depends on WIRELESS_EXT
|
depends on WIRELESS_EXT
|
||||||
default N
|
default N
|
||||||
---help---
|
---help---
|
||||||
|
|
|
@ -53,10 +53,8 @@ void ieee80211_crypt_deinit_entries(struct ieee80211_device *ieee,
|
||||||
|
|
||||||
list_del(ptr);
|
list_del(ptr);
|
||||||
|
|
||||||
if (entry->ops) {
|
if (entry->ops)
|
||||||
entry->ops->deinit(entry->priv);
|
entry->ops->deinit(entry->priv);
|
||||||
module_put(entry->ops->owner);
|
|
||||||
}
|
|
||||||
kfree(entry);
|
kfree(entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -216,10 +216,8 @@ void free_ieee80211(struct net_device *dev)
|
||||||
for (i = 0; i < WEP_KEYS; i++) {
|
for (i = 0; i < WEP_KEYS; i++) {
|
||||||
struct ieee80211_crypt_data *crypt = ieee->crypt[i];
|
struct ieee80211_crypt_data *crypt = ieee->crypt[i];
|
||||||
if (crypt) {
|
if (crypt) {
|
||||||
if (crypt->ops) {
|
if (crypt->ops)
|
||||||
crypt->ops->deinit(crypt->priv);
|
crypt->ops->deinit(crypt->priv);
|
||||||
module_put(crypt->ops->owner);
|
|
||||||
}
|
|
||||||
kfree(crypt);
|
kfree(crypt);
|
||||||
ieee->crypt[i] = NULL;
|
ieee->crypt[i] = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3026,17 +3026,14 @@ static int ieee80211_wpa_set_encryption(struct ieee80211_device *ieee,
|
||||||
goto skip_host_crypt;
|
goto skip_host_crypt;
|
||||||
|
|
||||||
ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
|
ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
|
||||||
if (ops == NULL && strcmp(param->u.crypt.alg, "WEP") == 0) {
|
if (ops == NULL && strcmp(param->u.crypt.alg, "WEP") == 0)
|
||||||
request_module("ieee80211_crypt_wep");
|
|
||||||
ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
|
ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
|
||||||
//set WEP40 first, it will be modified according to WEP104 or WEP40 at other place
|
/* set WEP40 first, it will be modified according to WEP104 or
|
||||||
} else if (ops == NULL && strcmp(param->u.crypt.alg, "TKIP") == 0) {
|
* WEP40 at other place */
|
||||||
request_module("ieee80211_crypt_tkip");
|
else if (ops == NULL && strcmp(param->u.crypt.alg, "TKIP") == 0)
|
||||||
ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
|
ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
|
||||||
} else if (ops == NULL && strcmp(param->u.crypt.alg, "CCMP") == 0) {
|
else if (ops == NULL && strcmp(param->u.crypt.alg, "CCMP") == 0)
|
||||||
request_module("ieee80211_crypt_ccmp");
|
|
||||||
ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
|
ops = ieee80211_get_crypto_ops(param->u.crypt.alg);
|
||||||
}
|
|
||||||
if (ops == NULL) {
|
if (ops == NULL) {
|
||||||
printk("unknown crypto alg '%s'\n", param->u.crypt.alg);
|
printk("unknown crypto alg '%s'\n", param->u.crypt.alg);
|
||||||
param->u.crypt.err = IEEE_CRYPT_ERR_UNKNOWN_ALG;
|
param->u.crypt.err = IEEE_CRYPT_ERR_UNKNOWN_ALG;
|
||||||
|
@ -3058,7 +3055,7 @@ static int ieee80211_wpa_set_encryption(struct ieee80211_device *ieee,
|
||||||
memset(new_crypt, 0, sizeof(struct ieee80211_crypt_data));
|
memset(new_crypt, 0, sizeof(struct ieee80211_crypt_data));
|
||||||
new_crypt->ops = ops;
|
new_crypt->ops = ops;
|
||||||
|
|
||||||
if (new_crypt->ops && try_module_get(new_crypt->ops->owner))
|
if (new_crypt->ops)
|
||||||
new_crypt->priv =
|
new_crypt->priv =
|
||||||
new_crypt->ops->init(param->u.crypt.idx);
|
new_crypt->ops->init(param->u.crypt.idx);
|
||||||
|
|
||||||
|
|
|
@ -358,11 +358,9 @@ int ieee80211_wx_set_encode(struct ieee80211_device *ieee,
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
memset(new_crypt, 0, sizeof(struct ieee80211_crypt_data));
|
memset(new_crypt, 0, sizeof(struct ieee80211_crypt_data));
|
||||||
new_crypt->ops = ieee80211_get_crypto_ops("WEP");
|
new_crypt->ops = ieee80211_get_crypto_ops("WEP");
|
||||||
if (!new_crypt->ops) {
|
if (!new_crypt->ops)
|
||||||
request_module("ieee80211_crypt_wep");
|
|
||||||
new_crypt->ops = ieee80211_get_crypto_ops("WEP");
|
new_crypt->ops = ieee80211_get_crypto_ops("WEP");
|
||||||
}
|
if (new_crypt->ops)
|
||||||
if (new_crypt->ops && try_module_get(new_crypt->ops->owner))
|
|
||||||
new_crypt->priv = new_crypt->ops->init(key);
|
new_crypt->priv = new_crypt->ops->init(key);
|
||||||
|
|
||||||
if (!new_crypt->ops || !new_crypt->priv) {
|
if (!new_crypt->ops || !new_crypt->priv) {
|
||||||
|
@ -507,7 +505,7 @@ int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
|
||||||
struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
|
struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
|
||||||
int i, idx;
|
int i, idx;
|
||||||
int group_key = 0;
|
int group_key = 0;
|
||||||
const char *alg, *module;
|
const char *alg;
|
||||||
struct ieee80211_crypto_ops *ops;
|
struct ieee80211_crypto_ops *ops;
|
||||||
struct ieee80211_crypt_data **crypt;
|
struct ieee80211_crypt_data **crypt;
|
||||||
|
|
||||||
|
@ -570,15 +568,12 @@ int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
|
||||||
switch (ext->alg) {
|
switch (ext->alg) {
|
||||||
case IW_ENCODE_ALG_WEP:
|
case IW_ENCODE_ALG_WEP:
|
||||||
alg = "WEP";
|
alg = "WEP";
|
||||||
module = "ieee80211_crypt_wep";
|
|
||||||
break;
|
break;
|
||||||
case IW_ENCODE_ALG_TKIP:
|
case IW_ENCODE_ALG_TKIP:
|
||||||
alg = "TKIP";
|
alg = "TKIP";
|
||||||
module = "ieee80211_crypt_tkip";
|
|
||||||
break;
|
break;
|
||||||
case IW_ENCODE_ALG_CCMP:
|
case IW_ENCODE_ALG_CCMP:
|
||||||
alg = "CCMP";
|
alg = "CCMP";
|
||||||
module = "ieee80211_crypt_ccmp";
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
IEEE80211_DEBUG_WX("%s: unknown crypto alg %d\n",
|
IEEE80211_DEBUG_WX("%s: unknown crypto alg %d\n",
|
||||||
|
@ -589,10 +584,8 @@ int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
|
||||||
printk("alg name:%s\n",alg);
|
printk("alg name:%s\n",alg);
|
||||||
|
|
||||||
ops = ieee80211_get_crypto_ops(alg);
|
ops = ieee80211_get_crypto_ops(alg);
|
||||||
if (ops == NULL) {
|
if (ops == NULL)
|
||||||
request_module("%s", module);
|
|
||||||
ops = ieee80211_get_crypto_ops(alg);
|
ops = ieee80211_get_crypto_ops(alg);
|
||||||
}
|
|
||||||
if (ops == NULL) {
|
if (ops == NULL) {
|
||||||
IEEE80211_DEBUG_WX("%s: unknown crypto alg %d\n",
|
IEEE80211_DEBUG_WX("%s: unknown crypto alg %d\n",
|
||||||
dev->name, ext->alg);
|
dev->name, ext->alg);
|
||||||
|
@ -612,7 +605,7 @@ int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
new_crypt->ops = ops;
|
new_crypt->ops = ops;
|
||||||
if (new_crypt->ops && try_module_get(new_crypt->ops->owner))
|
if (new_crypt->ops)
|
||||||
new_crypt->priv = new_crypt->ops->init(idx);
|
new_crypt->priv = new_crypt->ops->init(idx);
|
||||||
if (new_crypt->priv == NULL) {
|
if (new_crypt->priv == NULL) {
|
||||||
kfree(new_crypt);
|
kfree(new_crypt);
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
config STLC45XX
|
|
||||||
tristate "stlc4550/4560 support"
|
|
||||||
depends on MAC80211 && WLAN_80211 && SPI_MASTER && GENERIC_HARDIRQS
|
|
||||||
---help---
|
|
||||||
This is a driver for stlc4550 and stlc4560 chipsets.
|
|
||||||
|
|
||||||
To compile this driver as a module, choose M here: the module will be
|
|
||||||
called stlc45xx. If unsure, say N.
|
|
|
@ -1 +0,0 @@
|
||||||
obj-$(CONFIG_STLC45XX) += stlc45xx.o
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,283 +0,0 @@
|
||||||
/*
|
|
||||||
* This file is part of stlc45xx
|
|
||||||
*
|
|
||||||
* Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
|
|
||||||
*
|
|
||||||
* Contact: Kalle Valo <kalle.valo@nokia.com>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* version 2 as published by the Free Software Foundation.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but
|
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
|
||||||
* 02110-1301 USA
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <linux/mutex.h>
|
|
||||||
#include <linux/list.h>
|
|
||||||
#include <net/mac80211.h>
|
|
||||||
|
|
||||||
#include "stlc45xx_lmac.h"
|
|
||||||
|
|
||||||
#define DRIVER_NAME "stlc45xx"
|
|
||||||
#define DRIVER_VERSION "0.1.3"
|
|
||||||
|
|
||||||
#define DRIVER_PREFIX DRIVER_NAME ": "
|
|
||||||
|
|
||||||
enum {
|
|
||||||
DEBUG_NONE = 0,
|
|
||||||
DEBUG_FUNC = 1 << 0,
|
|
||||||
DEBUG_IRQ = 1 << 1,
|
|
||||||
DEBUG_BH = 1 << 2,
|
|
||||||
DEBUG_RX = 1 << 3,
|
|
||||||
DEBUG_RX_CONTENT = 1 << 5,
|
|
||||||
DEBUG_TX = 1 << 6,
|
|
||||||
DEBUG_TX_CONTENT = 1 << 8,
|
|
||||||
DEBUG_TXBUFFER = 1 << 9,
|
|
||||||
DEBUG_QUEUE = 1 << 10,
|
|
||||||
DEBUG_BOOT = 1 << 11,
|
|
||||||
DEBUG_PSM = 1 << 12,
|
|
||||||
DEBUG_ALL = ~0,
|
|
||||||
};
|
|
||||||
|
|
||||||
#define DEBUG_LEVEL DEBUG_NONE
|
|
||||||
/* #define DEBUG_LEVEL DEBUG_ALL */
|
|
||||||
/* #define DEBUG_LEVEL (DEBUG_TX | DEBUG_RX | DEBUG_IRQ) */
|
|
||||||
/* #define DEBUG_LEVEL (DEBUG_TX | DEBUG_MEMREGION | DEBUG_QUEUE) */
|
|
||||||
/* #define DEBUG_LEVEL (DEBUG_MEMREGION | DEBUG_QUEUE) */
|
|
||||||
|
|
||||||
#define stlc45xx_error(fmt, arg...) \
|
|
||||||
printk(KERN_ERR DRIVER_PREFIX "ERROR " fmt "\n", ##arg)
|
|
||||||
|
|
||||||
#define stlc45xx_warning(fmt, arg...) \
|
|
||||||
printk(KERN_WARNING DRIVER_PREFIX "WARNING " fmt "\n", ##arg)
|
|
||||||
|
|
||||||
#define stlc45xx_info(fmt, arg...) \
|
|
||||||
printk(KERN_INFO DRIVER_PREFIX fmt "\n", ##arg)
|
|
||||||
|
|
||||||
#define stlc45xx_debug(level, fmt, arg...) \
|
|
||||||
do { \
|
|
||||||
if (level & DEBUG_LEVEL) \
|
|
||||||
printk(KERN_DEBUG DRIVER_PREFIX fmt "\n", ##arg); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define stlc45xx_dump(level, buf, len) \
|
|
||||||
do { \
|
|
||||||
if (level & DEBUG_LEVEL) \
|
|
||||||
print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, \
|
|
||||||
16, 1, buf, len, 1); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define MAC2STR(a) ((a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5])
|
|
||||||
#define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
|
|
||||||
|
|
||||||
/* Bit 15 is read/write bit; ON = READ, OFF = WRITE */
|
|
||||||
#define ADDR_READ_BIT_15 0x8000
|
|
||||||
|
|
||||||
#define SPI_ADRS_ARM_INTERRUPTS 0x00
|
|
||||||
#define SPI_ADRS_ARM_INT_EN 0x04
|
|
||||||
|
|
||||||
#define SPI_ADRS_HOST_INTERRUPTS 0x08
|
|
||||||
#define SPI_ADRS_HOST_INT_EN 0x0c
|
|
||||||
#define SPI_ADRS_HOST_INT_ACK 0x10
|
|
||||||
|
|
||||||
#define SPI_ADRS_GEN_PURP_1 0x14
|
|
||||||
#define SPI_ADRS_GEN_PURP_2 0x18
|
|
||||||
|
|
||||||
/* high word */
|
|
||||||
#define SPI_ADRS_DEV_CTRL_STAT 0x26
|
|
||||||
|
|
||||||
#define SPI_ADRS_DMA_DATA 0x28
|
|
||||||
|
|
||||||
#define SPI_ADRS_DMA_WRITE_CTRL 0x2c
|
|
||||||
#define SPI_ADRS_DMA_WRITE_LEN 0x2e
|
|
||||||
#define SPI_ADRS_DMA_WRITE_BASE 0x30
|
|
||||||
|
|
||||||
#define SPI_ADRS_DMA_READ_CTRL 0x34
|
|
||||||
#define SPI_ADRS_DMA_READ_LEN 0x36
|
|
||||||
#define SPI_ADRS_DMA_READ_BASE 0x38
|
|
||||||
|
|
||||||
#define SPI_CTRL_STAT_HOST_OVERRIDE 0x8000
|
|
||||||
#define SPI_CTRL_STAT_START_HALTED 0x4000
|
|
||||||
#define SPI_CTRL_STAT_RAM_BOOT 0x2000
|
|
||||||
#define SPI_CTRL_STAT_HOST_RESET 0x1000
|
|
||||||
#define SPI_CTRL_STAT_HOST_CPU_EN 0x0800
|
|
||||||
|
|
||||||
#define SPI_DMA_WRITE_CTRL_ENABLE 0x0001
|
|
||||||
#define SPI_DMA_READ_CTRL_ENABLE 0x0001
|
|
||||||
#define HOST_ALLOWED (1 << 7)
|
|
||||||
|
|
||||||
#define FIRMWARE_ADDRESS 0x20000
|
|
||||||
|
|
||||||
#define SPI_TIMEOUT 100 /* msec */
|
|
||||||
|
|
||||||
#define SPI_MAX_TX_PACKETS 32
|
|
||||||
|
|
||||||
#define SPI_MAX_PACKET_SIZE 32767
|
|
||||||
|
|
||||||
#define SPI_TARGET_INT_WAKEUP 0x00000001
|
|
||||||
#define SPI_TARGET_INT_SLEEP 0x00000002
|
|
||||||
#define SPI_TARGET_INT_RDDONE 0x00000004
|
|
||||||
|
|
||||||
#define SPI_TARGET_INT_CTS 0x00004000
|
|
||||||
#define SPI_TARGET_INT_DR 0x00008000
|
|
||||||
|
|
||||||
#define SPI_HOST_INT_READY 0x00000001
|
|
||||||
#define SPI_HOST_INT_WR_READY 0x00000002
|
|
||||||
#define SPI_HOST_INT_SW_UPDATE 0x00000004
|
|
||||||
#define SPI_HOST_INT_UPDATE 0x10000000
|
|
||||||
|
|
||||||
/* clear to send */
|
|
||||||
#define SPI_HOST_INT_CTS 0x00004000
|
|
||||||
|
|
||||||
/* data ready */
|
|
||||||
#define SPI_HOST_INT_DR 0x00008000
|
|
||||||
|
|
||||||
#define SPI_HOST_INTS_DEFAULT \
|
|
||||||
(SPI_HOST_INT_READY | SPI_HOST_INT_UPDATE | SPI_HOST_INT_SW_UPDATE)
|
|
||||||
|
|
||||||
#define TARGET_BOOT_SLEEP 50
|
|
||||||
|
|
||||||
/* The firmware buffer is divided into three areas:
|
|
||||||
*
|
|
||||||
* o config area (for control commands)
|
|
||||||
* o tx buffer
|
|
||||||
* o rx buffer
|
|
||||||
*/
|
|
||||||
#define FIRMWARE_BUFFER_START 0x20200
|
|
||||||
#define FIRMWARE_BUFFER_END 0x27c60
|
|
||||||
#define FIRMWARE_BUFFER_LEN (FIRMWARE_BUFFER_END - FIRMWARE_BUFFER_START)
|
|
||||||
#define FIRMWARE_MTU 3240
|
|
||||||
#define FIRMWARE_CONFIG_PAYLOAD_LEN 1024
|
|
||||||
#define FIRMWARE_CONFIG_START FIRMWARE_BUFFER_START
|
|
||||||
#define FIRMWARE_CONFIG_LEN (sizeof(struct s_lm_control) + \
|
|
||||||
FIRMWARE_CONFIG_PAYLOAD_LEN)
|
|
||||||
#define FIRMWARE_CONFIG_END (FIRMWARE_CONFIG_START + FIRMWARE_CONFIG_LEN - 1)
|
|
||||||
#define FIRMWARE_RXBUFFER_LEN (5 * FIRMWARE_MTU + 1024)
|
|
||||||
#define FIRMWARE_RXBUFFER_START (FIRMWARE_BUFFER_END - FIRMWARE_RXBUFFER_LEN)
|
|
||||||
#define FIRMWARE_RXBUFFER_END (FIRMWARE_RXBUFFER_START + \
|
|
||||||
FIRMWARE_RXBUFFER_LEN - 1)
|
|
||||||
#define FIRMWARE_TXBUFFER_START (FIRMWARE_BUFFER_START + FIRMWARE_CONFIG_LEN)
|
|
||||||
#define FIRMWARE_TXBUFFER_LEN (FIRMWARE_BUFFER_LEN - FIRMWARE_CONFIG_LEN - \
|
|
||||||
FIRMWARE_RXBUFFER_LEN)
|
|
||||||
#define FIRMWARE_TXBUFFER_END (FIRMWARE_TXBUFFER_START + \
|
|
||||||
FIRMWARE_TXBUFFER_LEN - 1)
|
|
||||||
|
|
||||||
#define FIRMWARE_TXBUFFER_HEADER 100
|
|
||||||
#define FIRMWARE_TXBUFFER_TRAILER 4
|
|
||||||
|
|
||||||
/* FIXME: come up with a proper value */
|
|
||||||
#define MAX_FRAME_LEN 2500
|
|
||||||
|
|
||||||
/* unit is ms */
|
|
||||||
#define TX_FRAME_LIFETIME 2000
|
|
||||||
#define TX_TIMEOUT 4000
|
|
||||||
|
|
||||||
#define SUPPORTED_CHANNELS 13
|
|
||||||
|
|
||||||
/* FIXME */
|
|
||||||
/* #define CHANNEL_CAL_LEN offsetof(struct s_lmo_scan, bratemask) - \ */
|
|
||||||
/* offsetof(struct s_lmo_scan, channel) */
|
|
||||||
#define CHANNEL_CAL_LEN 292
|
|
||||||
#define CHANNEL_CAL_ARRAY_LEN (SUPPORTED_CHANNELS * CHANNEL_CAL_LEN)
|
|
||||||
/* FIXME */
|
|
||||||
/* #define RSSI_CAL_LEN sizeof(struct s_lmo_scan) - \ */
|
|
||||||
/* offsetof(struct s_lmo_scan, rssical) */
|
|
||||||
#define RSSI_CAL_LEN 8
|
|
||||||
#define RSSI_CAL_ARRAY_LEN (SUPPORTED_CHANNELS * RSSI_CAL_LEN)
|
|
||||||
|
|
||||||
struct s_dma_regs {
|
|
||||||
unsigned short cmd;
|
|
||||||
unsigned short len;
|
|
||||||
unsigned long addr;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct stlc45xx_ie_tim {
|
|
||||||
u8 dtim_count;
|
|
||||||
u8 dtim_period;
|
|
||||||
u8 bmap_control;
|
|
||||||
u8 pvbmap[251];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct txbuffer {
|
|
||||||
/* can be removed when switched to skb queue */
|
|
||||||
struct list_head tx_list;
|
|
||||||
|
|
||||||
struct list_head buffer_list;
|
|
||||||
|
|
||||||
int start;
|
|
||||||
int frame_start;
|
|
||||||
int end;
|
|
||||||
|
|
||||||
struct sk_buff *skb;
|
|
||||||
u32 handle;
|
|
||||||
|
|
||||||
bool status_needed;
|
|
||||||
|
|
||||||
int header_len;
|
|
||||||
|
|
||||||
/* unit jiffies */
|
|
||||||
unsigned long lifetime;
|
|
||||||
};
|
|
||||||
|
|
||||||
enum fw_state {
|
|
||||||
FW_STATE_OFF,
|
|
||||||
FW_STATE_BOOTING,
|
|
||||||
FW_STATE_READY,
|
|
||||||
FW_STATE_RESET,
|
|
||||||
FW_STATE_RESETTING,
|
|
||||||
};
|
|
||||||
|
|
||||||
struct stlc45xx {
|
|
||||||
struct ieee80211_hw *hw;
|
|
||||||
struct spi_device *spi;
|
|
||||||
struct work_struct work;
|
|
||||||
struct work_struct work_reset;
|
|
||||||
struct delayed_work work_tx_timeout;
|
|
||||||
struct mutex mutex;
|
|
||||||
struct completion fw_comp;
|
|
||||||
|
|
||||||
|
|
||||||
u8 bssid[ETH_ALEN];
|
|
||||||
u8 mac_addr[ETH_ALEN];
|
|
||||||
int channel;
|
|
||||||
|
|
||||||
u8 *cal_rssi;
|
|
||||||
u8 *cal_channels;
|
|
||||||
|
|
||||||
enum fw_state fw_state;
|
|
||||||
|
|
||||||
spinlock_t tx_lock;
|
|
||||||
|
|
||||||
/* protected by tx_lock */
|
|
||||||
struct list_head txbuffer;
|
|
||||||
|
|
||||||
/* protected by tx_lock */
|
|
||||||
struct list_head tx_pending;
|
|
||||||
|
|
||||||
/* protected by tx_lock */
|
|
||||||
int tx_queue_stopped;
|
|
||||||
|
|
||||||
/* protected by mutex */
|
|
||||||
struct list_head tx_sent;
|
|
||||||
|
|
||||||
int tx_frames;
|
|
||||||
|
|
||||||
u8 *fw;
|
|
||||||
int fw_len;
|
|
||||||
|
|
||||||
bool psm;
|
|
||||||
bool associated;
|
|
||||||
int aid;
|
|
||||||
bool pspolling;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
|
@ -1,434 +0,0 @@
|
||||||
/************************************************************************
|
|
||||||
* This is the LMAC API interface header file for STLC4560. *
|
|
||||||
* Copyright (C) 2007 Conexant Systems, Inc. *
|
|
||||||
* This program is free software; you can redistribute it and/or *
|
|
||||||
* modify it under the terms of the GNU General Public License *
|
|
||||||
* as published by the Free Software Foundation; either version 2 *
|
|
||||||
* of the License, or (at your option) any later version. *
|
|
||||||
* *
|
|
||||||
* This program is distributed in the hope that it will be useful, *
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
||||||
* GNU General Public License for more details. *
|
|
||||||
* *
|
|
||||||
* You should have received a copy of the GNU General Public License *
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
|
|
||||||
*************************************************************************/
|
|
||||||
|
|
||||||
#ifndef __lmac_h__
|
|
||||||
#define __lmac_h__
|
|
||||||
|
|
||||||
#define LM_TOP_VARIANT 0x0506
|
|
||||||
#define LM_BOTTOM_VARIANT 0x0506
|
|
||||||
|
|
||||||
/*
|
|
||||||
* LMAC - UMAC interface definition:
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define LM_FLAG_CONTROL 0x8000
|
|
||||||
#define LM_FLAG_ALIGN 0x4000
|
|
||||||
|
|
||||||
#define LM_CTRL_OPSET 0x0001
|
|
||||||
|
|
||||||
#define LM_OUT_PROMISC 0x0001
|
|
||||||
#define LM_OUT_TIMESTAMP 0x0002
|
|
||||||
#define LM_OUT_SEQNR 0x0004
|
|
||||||
#define LM_OUT_BURST 0x0010
|
|
||||||
#define LM_OUT_NOCANCEL 0x0020
|
|
||||||
#define LM_OUT_CLEARTIM 0x0040
|
|
||||||
#define LM_OUT_HITCHHIKE 0x0080
|
|
||||||
#define LM_OUT_COMPRESS 0x0100
|
|
||||||
#define LM_OUT_CONCAT 0x0200
|
|
||||||
#define LM_OUT_PCS_ACCEPT 0x0400
|
|
||||||
#define LM_OUT_WAITEOSP 0x0800
|
|
||||||
|
|
||||||
|
|
||||||
#define LM_ALOFT_SP 0x10
|
|
||||||
#define LM_ALOFT_CTS 0x20
|
|
||||||
#define LM_ALOFT_RTS 0x40
|
|
||||||
#define LM_ALOFT_MASK 0x1f
|
|
||||||
#define LM_ALOFT_RATE 0x0f
|
|
||||||
|
|
||||||
#define LM_IN_FCS_GOOD 0x0001
|
|
||||||
#define LM_IN_MATCH_MAC 0x0002
|
|
||||||
#define LM_IN_MCBC 0x0004
|
|
||||||
#define LM_IN_BEACON 0x0008
|
|
||||||
#define LM_IN_MATCH_BSS 0x0010
|
|
||||||
#define LM_IN_BCAST_BSS 0x0020
|
|
||||||
#define LM_IN_DATA 0x0040
|
|
||||||
#define LM_IN_TRUNCATED 0x0080
|
|
||||||
|
|
||||||
#define LM_IN_TRANSPARENT 0x0200
|
|
||||||
|
|
||||||
#define LM_QUEUE_BEACON 0
|
|
||||||
#define LM_QUEUE_SCAN 1
|
|
||||||
#define LM_QUEUE_MGT 2
|
|
||||||
#define LM_QUEUE_MCBC 3
|
|
||||||
#define LM_QUEUE_DATA 4
|
|
||||||
#define LM_QUEUE_DATA0 4
|
|
||||||
#define LM_QUEUE_DATA1 5
|
|
||||||
#define LM_QUEUE_DATA2 6
|
|
||||||
#define LM_QUEUE_DATA3 7
|
|
||||||
|
|
||||||
#define LM_SETUP_INFRA 0x0001
|
|
||||||
#define LM_SETUP_IBSS 0x0002
|
|
||||||
#define LM_SETUP_TRANSPARENT 0x0008
|
|
||||||
#define LM_SETUP_PROMISCUOUS 0x0010
|
|
||||||
#define LM_SETUP_HIBERNATE 0x0020
|
|
||||||
#define LM_SETUP_NOACK 0x0040
|
|
||||||
#define LM_SETUP_RX_DISABLED 0x0080
|
|
||||||
|
|
||||||
#define LM_ANTENNA_0 0
|
|
||||||
#define LM_ANTENNA_1 1
|
|
||||||
#define LM_ANTENNA_DIVERSITY 2
|
|
||||||
|
|
||||||
#define LM_TX_FAILED 0x0001
|
|
||||||
#define LM_TX_PSM 0x0002
|
|
||||||
#define LM_TX_PSM_CANCELLED 0x0004
|
|
||||||
|
|
||||||
#define LM_SCAN_EXIT 0x0001
|
|
||||||
#define LM_SCAN_TRAP 0x0002
|
|
||||||
#define LM_SCAN_ACTIVE 0x0004
|
|
||||||
#define LM_SCAN_FILTER 0x0008
|
|
||||||
|
|
||||||
#define LM_PSM 0x0001
|
|
||||||
#define LM_PSM_DTIM 0x0002
|
|
||||||
#define LM_PSM_MCBC 0x0004
|
|
||||||
#define LM_PSM_CHECKSUM 0x0008
|
|
||||||
#define LM_PSM_SKIP_MORE_DATA 0x0010
|
|
||||||
#define LM_PSM_BEACON_TIMEOUT 0x0020
|
|
||||||
#define LM_PSM_HFOSLEEP 0x0040
|
|
||||||
#define LM_PSM_AUTOSWITCH_SLEEP 0x0080
|
|
||||||
#define LM_PSM_LPIT 0x0100
|
|
||||||
#define LM_PSM_BF_UCAST_SKIP 0x0200
|
|
||||||
#define LM_PSM_BF_MCAST_SKIP 0x0400
|
|
||||||
|
|
||||||
/* hfosleep */
|
|
||||||
#define LM_PSM_SLEEP_OPTION_MASK (LM_PSM_AUTOSWITCH_SLEEP | LM_PSM_HFOSLEEP)
|
|
||||||
#define LM_PSM_SLEEP_OPTION_SHIFT 6
|
|
||||||
/* hfosleepend */
|
|
||||||
#define LM_PSM_BF_OPTION_MASK (LM_PSM_BF_MCAST_SKIP | LM_PSM_BF_UCAST_SKIP)
|
|
||||||
#define LM_PSM_BF_OPTION_SHIFT 9
|
|
||||||
|
|
||||||
|
|
||||||
#define LM_PRIVACC_WEP 0x01
|
|
||||||
#define LM_PRIVACC_TKIP 0x02
|
|
||||||
#define LM_PRIVACC_MICHAEL 0x04
|
|
||||||
#define LM_PRIVACC_CCX_KP 0x08
|
|
||||||
#define LM_PRIVACC_CCX_MIC 0x10
|
|
||||||
#define LM_PRIVACC_AES_CCMP 0x20
|
|
||||||
|
|
||||||
/* size of s_lm_descr in words */
|
|
||||||
#define LM_DESCR_SIZE_WORDS 11
|
|
||||||
|
|
||||||
#ifndef __ASSEMBLER__
|
|
||||||
|
|
||||||
enum {
|
|
||||||
LM_MODE_CLIENT = 0,
|
|
||||||
LM_MODE_AP
|
|
||||||
};
|
|
||||||
|
|
||||||
struct s_lm_descr {
|
|
||||||
uint16_t modes;
|
|
||||||
uint16_t flags;
|
|
||||||
uint32_t buffer_start;
|
|
||||||
uint32_t buffer_end;
|
|
||||||
uint8_t header;
|
|
||||||
uint8_t trailer;
|
|
||||||
uint8_t tx_queues;
|
|
||||||
uint8_t tx_depth;
|
|
||||||
uint8_t privacy;
|
|
||||||
uint8_t rx_keycache;
|
|
||||||
uint8_t tim_size;
|
|
||||||
uint8_t pad1;
|
|
||||||
uint8_t rates[16];
|
|
||||||
uint32_t link;
|
|
||||||
uint16_t mtu;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
struct s_lm_control {
|
|
||||||
uint16_t flags;
|
|
||||||
uint16_t length;
|
|
||||||
uint32_t handle;
|
|
||||||
uint16_t oid;
|
|
||||||
uint16_t pad;
|
|
||||||
/* uint8_t data[]; */
|
|
||||||
};
|
|
||||||
|
|
||||||
enum {
|
|
||||||
LM_PRIV_NONE = 0,
|
|
||||||
LM_PRIV_WEP,
|
|
||||||
LM_PRIV_TKIP,
|
|
||||||
LM_PRIV_TKIPMICHAEL,
|
|
||||||
LM_PRIV_CCX_WEPMIC,
|
|
||||||
LM_PRIV_CCX_KPMIC,
|
|
||||||
LM_PRIV_CCX_KP,
|
|
||||||
LM_PRIV_AES_CCMP
|
|
||||||
};
|
|
||||||
|
|
||||||
enum {
|
|
||||||
LM_DECRYPT_NONE,
|
|
||||||
LM_DECRYPT_OK,
|
|
||||||
LM_DECRYPT_NOKEY,
|
|
||||||
LM_DECRYPT_NOMICHAEL,
|
|
||||||
LM_DECRYPT_NOCKIPMIC,
|
|
||||||
LM_DECRYPT_FAIL_WEP,
|
|
||||||
LM_DECRYPT_FAIL_TKIP,
|
|
||||||
LM_DECRYPT_FAIL_MICHAEL,
|
|
||||||
LM_DECRYPT_FAIL_CKIPKP,
|
|
||||||
LM_DECRYPT_FAIL_CKIPMIC,
|
|
||||||
LM_DECRYPT_FAIL_AESCCMP
|
|
||||||
};
|
|
||||||
|
|
||||||
struct s_lm_data_out {
|
|
||||||
uint16_t flags;
|
|
||||||
uint16_t length;
|
|
||||||
uint32_t handle;
|
|
||||||
uint16_t aid;
|
|
||||||
uint8_t rts_retries;
|
|
||||||
uint8_t retries;
|
|
||||||
uint8_t aloft[8];
|
|
||||||
uint8_t aloft_ctrl;
|
|
||||||
uint8_t crypt_offset;
|
|
||||||
uint8_t keytype;
|
|
||||||
uint8_t keylen;
|
|
||||||
uint8_t key[16];
|
|
||||||
uint8_t queue;
|
|
||||||
uint8_t backlog;
|
|
||||||
uint16_t durations[4];
|
|
||||||
uint8_t antenna;
|
|
||||||
uint8_t cts;
|
|
||||||
int16_t power;
|
|
||||||
uint8_t pad[2];
|
|
||||||
/*uint8_t data[];*/
|
|
||||||
};
|
|
||||||
|
|
||||||
#define LM_RCPI_INVALID (0xff)
|
|
||||||
|
|
||||||
struct s_lm_data_in {
|
|
||||||
uint16_t flags;
|
|
||||||
uint16_t length;
|
|
||||||
uint16_t frequency;
|
|
||||||
uint8_t antenna;
|
|
||||||
uint8_t rate;
|
|
||||||
uint8_t rcpi;
|
|
||||||
uint8_t sq;
|
|
||||||
uint8_t decrypt;
|
|
||||||
uint8_t rssi_raw;
|
|
||||||
uint32_t clock[2];
|
|
||||||
/*uint8_t data[];*/
|
|
||||||
};
|
|
||||||
|
|
||||||
union u_lm_data {
|
|
||||||
struct s_lm_data_out out;
|
|
||||||
struct s_lm_data_in in;
|
|
||||||
};
|
|
||||||
|
|
||||||
enum {
|
|
||||||
LM_OID_SETUP = 0,
|
|
||||||
LM_OID_SCAN = 1,
|
|
||||||
LM_OID_TRAP = 2,
|
|
||||||
LM_OID_EDCF = 3,
|
|
||||||
LM_OID_KEYCACHE = 4,
|
|
||||||
LM_OID_PSM = 6,
|
|
||||||
LM_OID_TXCANCEL = 7,
|
|
||||||
LM_OID_TX = 8,
|
|
||||||
LM_OID_BURST = 9,
|
|
||||||
LM_OID_STATS = 10,
|
|
||||||
LM_OID_LED = 13,
|
|
||||||
LM_OID_TIMER = 15,
|
|
||||||
LM_OID_NAV = 20,
|
|
||||||
LM_OID_PCS = 22,
|
|
||||||
LM_OID_BT_BALANCER = 28,
|
|
||||||
LM_OID_GROUP_ADDRESS_TABLE = 30,
|
|
||||||
LM_OID_ARPTABLE = 31,
|
|
||||||
LM_OID_BT_OPTIONS = 35
|
|
||||||
};
|
|
||||||
|
|
||||||
enum {
|
|
||||||
LM_FRONTEND_UNKNOWN = 0,
|
|
||||||
LM_FRONTEND_DUETTE3,
|
|
||||||
LM_FRONTEND_DUETTE2,
|
|
||||||
LM_FRONTEND_FRISBEE,
|
|
||||||
LM_FRONTEND_CROSSBOW,
|
|
||||||
LM_FRONTEND_LONGBOW
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#define INVALID_LPF_BANDWIDTH 0xffff
|
|
||||||
#define INVALID_OSC_START_DELAY 0xffff
|
|
||||||
|
|
||||||
struct s_lmo_setup {
|
|
||||||
uint16_t flags;
|
|
||||||
uint8_t macaddr[6];
|
|
||||||
uint8_t bssid[6];
|
|
||||||
uint8_t antenna;
|
|
||||||
uint8_t rx_align;
|
|
||||||
uint32_t rx_buffer;
|
|
||||||
uint16_t rx_mtu;
|
|
||||||
uint16_t frontend;
|
|
||||||
uint16_t timeout;
|
|
||||||
uint16_t truncate;
|
|
||||||
uint32_t bratemask;
|
|
||||||
uint8_t sbss_offset;
|
|
||||||
uint8_t mcast_window;
|
|
||||||
uint8_t rx_rssi_threshold;
|
|
||||||
uint8_t rx_ed_threshold;
|
|
||||||
uint32_t ref_clock;
|
|
||||||
uint16_t lpf_bandwidth;
|
|
||||||
uint16_t osc_start_delay;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
struct s_lmo_scan {
|
|
||||||
uint16_t flags;
|
|
||||||
uint16_t dwell;
|
|
||||||
uint8_t channel[292];
|
|
||||||
uint32_t bratemask;
|
|
||||||
uint8_t aloft[8];
|
|
||||||
uint8_t rssical[8];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
enum {
|
|
||||||
LM_TRAP_SCAN = 0,
|
|
||||||
LM_TRAP_TIMER,
|
|
||||||
LM_TRAP_BEACON_TX,
|
|
||||||
LM_TRAP_FAA_RADIO_ON,
|
|
||||||
LM_TRAP_FAA_RADIO_OFF,
|
|
||||||
LM_TRAP_RADAR,
|
|
||||||
LM_TRAP_NO_BEACON,
|
|
||||||
LM_TRAP_TBTT,
|
|
||||||
LM_TRAP_SCO_ENTER,
|
|
||||||
LM_TRAP_SCO_EXIT
|
|
||||||
};
|
|
||||||
|
|
||||||
struct s_lmo_trap {
|
|
||||||
uint16_t event;
|
|
||||||
uint16_t frequency;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct s_lmo_timer {
|
|
||||||
uint32_t interval;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct s_lmo_nav {
|
|
||||||
uint32_t period;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
struct s_lmo_edcf_queue;
|
|
||||||
|
|
||||||
struct s_lmo_edcf {
|
|
||||||
uint8_t flags;
|
|
||||||
uint8_t slottime;
|
|
||||||
uint8_t sifs;
|
|
||||||
uint8_t eofpad;
|
|
||||||
struct s_lmo_edcf_queue {
|
|
||||||
uint8_t aifs;
|
|
||||||
uint8_t pad0;
|
|
||||||
uint16_t cwmin;
|
|
||||||
uint16_t cwmax;
|
|
||||||
uint16_t txop;
|
|
||||||
} queues[8];
|
|
||||||
uint8_t mapping[4];
|
|
||||||
uint16_t maxburst;
|
|
||||||
uint16_t round_trip_delay;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct s_lmo_keycache {
|
|
||||||
uint8_t entry;
|
|
||||||
uint8_t keyid;
|
|
||||||
uint8_t address[6];
|
|
||||||
uint8_t pad[2];
|
|
||||||
uint8_t keytype;
|
|
||||||
uint8_t keylen;
|
|
||||||
uint8_t key[24];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
struct s_lm_interval;
|
|
||||||
|
|
||||||
struct s_lmo_psm {
|
|
||||||
uint16_t flags;
|
|
||||||
uint16_t aid;
|
|
||||||
struct s_lm_interval {
|
|
||||||
uint16_t interval;
|
|
||||||
uint16_t periods;
|
|
||||||
} intervals[4];
|
|
||||||
/* uint16_t pad; */
|
|
||||||
uint8_t beacon_rcpi_skip_max;
|
|
||||||
uint8_t rcpi_delta_threshold;
|
|
||||||
uint8_t nr;
|
|
||||||
uint8_t exclude[1];
|
|
||||||
};
|
|
||||||
|
|
||||||
#define MC_FILTER_ADDRESS_NUM 4
|
|
||||||
|
|
||||||
struct s_lmo_group_address_table {
|
|
||||||
uint16_t filter_enable;
|
|
||||||
uint16_t num_address;
|
|
||||||
uint8_t macaddr_list[MC_FILTER_ADDRESS_NUM][6];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct s_lmo_txcancel {
|
|
||||||
uint32_t address[1];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
struct s_lmo_tx {
|
|
||||||
uint8_t flags;
|
|
||||||
uint8_t retries;
|
|
||||||
uint8_t rcpi;
|
|
||||||
uint8_t sq;
|
|
||||||
uint16_t seqctrl;
|
|
||||||
uint8_t antenna;
|
|
||||||
uint8_t pad;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct s_lmo_burst {
|
|
||||||
uint8_t flags;
|
|
||||||
uint8_t queue;
|
|
||||||
uint8_t backlog;
|
|
||||||
uint8_t pad;
|
|
||||||
uint16_t durations[32];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct s_lmo_stats {
|
|
||||||
uint32_t valid;
|
|
||||||
uint32_t fcs;
|
|
||||||
uint32_t abort;
|
|
||||||
uint32_t phyabort;
|
|
||||||
uint32_t rts_success;
|
|
||||||
uint32_t rts_fail;
|
|
||||||
uint32_t timestamp;
|
|
||||||
uint32_t time_tx;
|
|
||||||
uint32_t noisefloor;
|
|
||||||
uint32_t sample_noise[8];
|
|
||||||
uint32_t sample_cca;
|
|
||||||
uint32_t sample_tx;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
struct s_lmo_led {
|
|
||||||
uint16_t flags;
|
|
||||||
uint16_t mask[2];
|
|
||||||
uint16_t delay/*[2]*/;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
struct s_lmo_bt_balancer {
|
|
||||||
uint16_t prio_thresh;
|
|
||||||
uint16_t acl_thresh;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
struct s_lmo_arp_table {
|
|
||||||
uint16_t filter_enable;
|
|
||||||
uint32_t ipaddr;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* __ASSEMBLER__ */
|
|
||||||
|
|
||||||
#endif /* __lmac_h__ */
|
|
|
@ -1332,7 +1332,6 @@ device_release_WPADEV(pDevice);
|
||||||
free_netdev(pDevice->dev);
|
free_netdev(pDevice->dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
kfree(pDevice);
|
|
||||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "device_disconnect3.. \n");
|
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "device_disconnect3.. \n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
config W35UND
|
config W35UND
|
||||||
tristate "IS89C35 WLAN USB driver"
|
tristate "IS89C35 WLAN USB driver"
|
||||||
depends on MAC80211 && WLAN_80211 && USB && EXPERIMENTAL
|
depends on MAC80211 && WLAN && USB && EXPERIMENTAL
|
||||||
default n
|
default n
|
||||||
---help---
|
---help---
|
||||||
This is highly experimental driver for Winbond WIFI card.
|
This is highly experimental driver for Winbond WIFI card.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
config PRISM2_USB
|
config PRISM2_USB
|
||||||
tristate "Prism2.5/3 USB driver"
|
tristate "Prism2.5/3 USB driver"
|
||||||
depends on WLAN_80211 && USB && WIRELESS_EXT
|
depends on WLAN && USB && WIRELESS_EXT
|
||||||
default n
|
default n
|
||||||
---help---
|
---help---
|
||||||
This is the wlan-ng prism 2.5/3 USB driver for a wide range of
|
This is the wlan-ng prism 2.5/3 USB driver for a wide range of
|
||||||
|
|
Loading…
Reference in New Issue