mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-02 07:28:21 +00:00
u80211_drv: bump
This commit is contained in:
@@ -81,8 +81,8 @@ typedef struct {
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
// allocates a buffer of 'size' bytes
|
// allocates a buffer of 'size' bytes
|
||||||
// on success '*buffer' points at the start of the writable 802.11 frame region
|
// on success '*buffer' points at the start of the writable 802.11 frame region
|
||||||
int (*allocate_tx_buffer)(size_t size, void **buffer);
|
int (*allocate_tx_buffer)(u80211_drv_device_handle_t device, size_t size, void **buffer);
|
||||||
void (*free_tx_buffer)(void *buffer);
|
void (*free_tx_buffer)(u80211_drv_device_handle_t device, void *buffer);
|
||||||
// transmits the bytes and consumes buffer including on failure
|
// transmits the bytes and consumes buffer including on failure
|
||||||
int (*transmit)(void *device, void *buffer, size_t size, size_t current_offset, const u80211_drv_transmit_options_t *options);
|
int (*transmit)(void *device, void *buffer, size_t size, size_t current_offset, const u80211_drv_transmit_options_t *options);
|
||||||
// sets the rf channel number the device will rx/tx on
|
// sets the rf channel number the device will rx/tx on
|
||||||
|
|||||||
@@ -367,8 +367,8 @@ int u80211_drv_rtl8188eu_set_tx_power(u80211_drv_rtl8188eu_t *rtl8188eu, uint8_t
|
|||||||
int u80211_drv_rtl8188eu_set_channel(u80211_drv_rtl8188eu_t *rtl8188eu, uint8_t channel);
|
int u80211_drv_rtl8188eu_set_channel(u80211_drv_rtl8188eu_t *rtl8188eu, uint8_t channel);
|
||||||
int u80211_drv_rtl8188eu_set_key(u80211_drv_rtl8188eu_t *rtl8188eu, const u80211_drv_key_t *key);
|
int u80211_drv_rtl8188eu_set_key(u80211_drv_rtl8188eu_t *rtl8188eu, const u80211_drv_key_t *key);
|
||||||
int u80211_drv_rtl8188eu_del_key(u80211_drv_rtl8188eu_t *rtl8188eu, uint8_t index);
|
int u80211_drv_rtl8188eu_del_key(u80211_drv_rtl8188eu_t *rtl8188eu, uint8_t index);
|
||||||
int u80211_drv_rtl8188eu_tx_buffer_allocate(size_t size, void **buffer);
|
int u80211_drv_rtl8188eu_tx_buffer_allocate(u80211_drv_device_handle_t device, size_t size, void **buffer);
|
||||||
void u80211_drv_rtl8188eu_tx_buffer_free(void *buffer);
|
void u80211_drv_rtl8188eu_tx_buffer_free(u80211_drv_device_handle_t device, void *buffer);
|
||||||
int u80211_drv_rtl8188eu_transmit(u80211_drv_rtl8188eu_t *rtl8188eu, void *buffer, size_t size, size_t current_offset, const u80211_drv_transmit_options_t *options);
|
int u80211_drv_rtl8188eu_transmit(u80211_drv_rtl8188eu_t *rtl8188eu, void *buffer, size_t size, size_t current_offset, const u80211_drv_transmit_options_t *options);
|
||||||
int u80211_drv_rtl8188eu_rx_start(u80211_drv_rtl8188eu_t *rtl8188eu);
|
int u80211_drv_rtl8188eu_rx_start(u80211_drv_rtl8188eu_t *rtl8188eu);
|
||||||
|
|
||||||
|
|||||||
@@ -142,7 +142,8 @@ static int build_descriptor(const uint8_t *frame, size_t frame_size, const u8021
|
|||||||
return U80211_DRV_STATUS_SUCCESS;
|
return U80211_DRV_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
int u80211_drv_rtl8188eu_tx_buffer_allocate(size_t size, void **buffer) {
|
int u80211_drv_rtl8188eu_tx_buffer_allocate(u80211_drv_device_handle_t device, size_t size, void **buffer) {
|
||||||
|
(void)device;
|
||||||
if (size > U80211_DRV_80211_MAX_MPDU_SIZE)
|
if (size > U80211_DRV_80211_MAX_MPDU_SIZE)
|
||||||
return U80211_DRV_STATUS_INVALID_ARGUMENT;
|
return U80211_DRV_STATUS_INVALID_ARGUMENT;
|
||||||
|
|
||||||
@@ -155,7 +156,8 @@ int u80211_drv_rtl8188eu_tx_buffer_allocate(size_t size, void **buffer) {
|
|||||||
return U80211_DRV_STATUS_SUCCESS;
|
return U80211_DRV_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
void u80211_drv_rtl8188eu_tx_buffer_free(void *buffer) {
|
void u80211_drv_rtl8188eu_tx_buffer_free(u80211_drv_device_handle_t device, void *buffer) {
|
||||||
|
(void)device;
|
||||||
u80211_drv_kernel_free((uint8_t *)buffer - RTL8188EU_TX_DESCRIPTOR_SIZE);
|
u80211_drv_kernel_free((uint8_t *)buffer - RTL8188EU_TX_DESCRIPTOR_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -185,6 +187,6 @@ int u80211_drv_rtl8188eu_transmit(u80211_drv_rtl8188eu_t *rtl8188eu, void *buffe
|
|||||||
status = U80211_DRV_STATUS_UNKNOWN_ERROR;
|
status = U80211_DRV_STATUS_UNKNOWN_ERROR;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
u80211_drv_rtl8188eu_tx_buffer_free(buffer);
|
u80211_drv_rtl8188eu_tx_buffer_free(rtl8188eu->device, buffer);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ typedef struct {
|
|||||||
|
|
||||||
static const u80211_drv_match_table_entry_t match_table[] = {
|
static const u80211_drv_match_table_entry_t match_table[] = {
|
||||||
{0x20013310, 0xffffff, u80211_drv_rtl8188eu_init, "DWA-123 (Revision D1, rtl8188eu driver)"},
|
{0x20013310, 0xffffff, u80211_drv_rtl8188eu_init, "DWA-123 (Revision D1, rtl8188eu driver)"},
|
||||||
|
{0x0bda8179, 0xffffff, u80211_drv_rtl8188eu_init, "Realtek RTL8188EUS (rtl8188eu driver)"}
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MATCH_TABLE_ENTRIES (sizeof(match_table) / sizeof(*match_table))
|
#define MATCH_TABLE_ENTRIES (sizeof(match_table) / sizeof(*match_table))
|
||||||
|
|||||||
@@ -98,12 +98,12 @@ static int allocate_tx_buffer(void *driver_data, size_t size, u80211_tx_buffer_d
|
|||||||
|
|
||||||
buffer_descriptor->size = size;
|
buffer_descriptor->size = size;
|
||||||
buffer_descriptor->current_offset = size;
|
buffer_descriptor->current_offset = size;
|
||||||
return u80211_drv_status_to_u80211_status(wlan->ops->allocate_tx_buffer(size, &buffer_descriptor->data));
|
return u80211_drv_status_to_u80211_status(wlan->ops->allocate_tx_buffer(wlan->driver_handle, size, &buffer_descriptor->data));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int free_tx_buffer(void *driver_data, u80211_tx_buffer_descriptor_t *buffer_descriptor) {
|
static int free_tx_buffer(void *driver_data, u80211_tx_buffer_descriptor_t *buffer_descriptor) {
|
||||||
wlan_device_t *wlan = driver_data;
|
wlan_device_t *wlan = driver_data;
|
||||||
wlan->ops->free_tx_buffer(buffer_descriptor->data);
|
wlan->ops->free_tx_buffer(wlan->driver_handle, buffer_descriptor->data);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,7 +137,7 @@ static int transmit(void *driver_data, u80211_tx_buffer_descriptor_t *buffer_des
|
|||||||
};
|
};
|
||||||
int status = convert_cipher(options->cipher, &drv_options.cipher);
|
int status = convert_cipher(options->cipher, &drv_options.cipher);
|
||||||
if (status != U80211_STATUS_SUCCESS) {
|
if (status != U80211_STATUS_SUCCESS) {
|
||||||
wlan->ops->free_tx_buffer(buffer_descriptor->data);
|
wlan->ops->free_tx_buffer(wlan->driver_handle, buffer_descriptor->data);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user