staging: wilc1000: remove variable tx_buffer_size
This patch removes unnecessary two variables tx_buffer_size and just use LINUX_TX_SIZE as argument. Signed-off-by: Glen Lee <glen.lee@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
187f1ef192
commit
7015b5db07
3 changed files with 2 additions and 6 deletions
|
@ -1056,7 +1056,6 @@ void linux_to_wlan(wilc_wlan_inp_t *nwi, linux_wlan_t *nic)
|
||||||
PRINT_D(INIT_DBG, "Linux to Wlan services ...\n");
|
PRINT_D(INIT_DBG, "Linux to Wlan services ...\n");
|
||||||
|
|
||||||
nwi->os_context.os_private = (void *)nic;
|
nwi->os_context.os_private = (void *)nic;
|
||||||
nwi->os_context.tx_buffer_size = LINUX_TX_SIZE;
|
|
||||||
nwi->os_context.txq_critical_section = (void *)&g_linux_wlan->txq_cs;
|
nwi->os_context.txq_critical_section = (void *)&g_linux_wlan->txq_cs;
|
||||||
#if defined(MEMORY_STATIC)
|
#if defined(MEMORY_STATIC)
|
||||||
nwi->os_context.rx_buffer_size = LINUX_RX_SIZE;
|
nwi->os_context.rx_buffer_size = LINUX_RX_SIZE;
|
||||||
|
|
|
@ -58,7 +58,6 @@ typedef struct {
|
||||||
/**
|
/**
|
||||||
* TX buffer
|
* TX buffer
|
||||||
**/
|
**/
|
||||||
u32 tx_buffer_size;
|
|
||||||
u8 *tx_buffer;
|
u8 *tx_buffer;
|
||||||
u32 tx_buffer_offset;
|
u32 tx_buffer_offset;
|
||||||
|
|
||||||
|
@ -873,7 +872,7 @@ static int wilc_wlan_handle_txq(u32 *pu32TxqCount)
|
||||||
if (vmm_sz & 0x3) { /* has to be word aligned */
|
if (vmm_sz & 0x3) { /* has to be word aligned */
|
||||||
vmm_sz = (vmm_sz + 4) & ~0x3;
|
vmm_sz = (vmm_sz + 4) & ~0x3;
|
||||||
}
|
}
|
||||||
if ((sum + vmm_sz) > p->tx_buffer_size) {
|
if ((sum + vmm_sz) > LINUX_TX_SIZE) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
PRINT_D(TX_DBG, "VMM Size AFTER alignment = %d\n", vmm_sz);
|
PRINT_D(TX_DBG, "VMM Size AFTER alignment = %d\n", vmm_sz);
|
||||||
|
@ -1970,7 +1969,6 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup)
|
||||||
memcpy((void *)&g_wlan.io_func, (void *)&inp->io_func, sizeof(wilc_wlan_io_func_t));
|
memcpy((void *)&g_wlan.io_func, (void *)&inp->io_func, sizeof(wilc_wlan_io_func_t));
|
||||||
g_wlan.txq_lock = inp->os_context.txq_critical_section;
|
g_wlan.txq_lock = inp->os_context.txq_critical_section;
|
||||||
|
|
||||||
g_wlan.tx_buffer_size = inp->os_context.tx_buffer_size;
|
|
||||||
#if defined (MEMORY_STATIC)
|
#if defined (MEMORY_STATIC)
|
||||||
g_wlan.rx_buffer_size = inp->os_context.rx_buffer_size;
|
g_wlan.rx_buffer_size = inp->os_context.rx_buffer_size;
|
||||||
#endif
|
#endif
|
||||||
|
@ -2017,7 +2015,7 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup)
|
||||||
* alloc tx, rx buffer
|
* alloc tx, rx buffer
|
||||||
**/
|
**/
|
||||||
if (g_wlan.tx_buffer == NULL)
|
if (g_wlan.tx_buffer == NULL)
|
||||||
g_wlan.tx_buffer = kmalloc(g_wlan.tx_buffer_size, GFP_KERNEL);
|
g_wlan.tx_buffer = kmalloc(LINUX_TX_SIZE, GFP_KERNEL);
|
||||||
PRINT_D(TX_DBG, "g_wlan.tx_buffer = %p\n", g_wlan.tx_buffer);
|
PRINT_D(TX_DBG, "g_wlan.tx_buffer = %p\n", g_wlan.tx_buffer);
|
||||||
|
|
||||||
if (g_wlan.tx_buffer == NULL) {
|
if (g_wlan.tx_buffer == NULL) {
|
||||||
|
|
|
@ -107,7 +107,6 @@ typedef struct {
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
void *os_private;
|
void *os_private;
|
||||||
u32 tx_buffer_size;
|
|
||||||
void *txq_critical_section;
|
void *txq_critical_section;
|
||||||
#if defined(MEMORY_STATIC)
|
#if defined(MEMORY_STATIC)
|
||||||
u32 rx_buffer_size;
|
u32 rx_buffer_size;
|
||||||
|
|
Loading…
Add table
Reference in a new issue