diff options
Diffstat (limited to 'drivers/staging/wlags49_h2')
-rw-r--r-- | drivers/staging/wlags49_h2/hcf.h | 22 | ||||
-rw-r--r-- | drivers/staging/wlags49_h2/sta_h2.c | 4 | ||||
-rw-r--r-- | drivers/staging/wlags49_h2/wl_priv.c | 9 |
3 files changed, 19 insertions, 16 deletions
diff --git a/drivers/staging/wlags49_h2/hcf.h b/drivers/staging/wlags49_h2/hcf.h index 2abeaa1..71b4465 100644 --- a/drivers/staging/wlags49_h2/hcf.h +++ b/drivers/staging/wlags49_h2/hcf.h @@ -372,22 +372,22 @@ typedef IFB_STRCT* IFBP; /********************** W C I F U N C T I O N S P R O T O T Y P E S ******************************/ /***********************************************************************************************************/ -EXTERN_C int hcf_action (IFBP ifbp, hcf_16 cmd ); -EXTERN_C int hcf_connect (IFBP ifbp, hcf_io io_base ); -EXTERN_C int hcf_get_info (IFBP ifbp, LTVP ltvp ); -EXTERN_C int hcf_service_nic (IFBP ifbp, wci_bufp bufp, unsigned int len ); -EXTERN_C int hcf_cntl (IFBP ifbp, hcf_16 cmd ); -EXTERN_C int hcf_put_info (IFBP ifbp, LTVP ltvp ); -EXTERN_C int hcf_rcv_msg (IFBP ifbp, DESC_STRCT *descp, unsigned int offset ); -EXTERN_C int hcf_send_msg (IFBP ifbp, DESC_STRCT *dp, hcf_16 tx_cntl ); +EXTERN_C int hcf_action(IFBP ifbp, hcf_16 cmd); +EXTERN_C int hcf_connect(IFBP ifbp, hcf_io io_base); +EXTERN_C int hcf_get_info(IFBP ifbp, LTVP ltvp); +EXTERN_C int hcf_service_nic(IFBP ifbp, wci_bufp bufp, unsigned int len); +EXTERN_C int hcf_cntl(IFBP ifbp, hcf_16 cmd); +EXTERN_C int hcf_put_info(IFBP ifbp, LTVP ltvp); +EXTERN_C int hcf_rcv_msg(IFBP ifbp, DESC_STRCT *descp, unsigned int offset); +EXTERN_C int hcf_send_msg(IFBP ifbp, DESC_STRCT *dp, hcf_16 tx_cntl); #if HCF_DMA -EXTERN_C void hcf_dma_tx_put (IFBP ifbp, DESC_STRCT *d, hcf_16 tx_cntl ); +EXTERN_C void hcf_dma_tx_put(IFBP ifbp, DESC_STRCT *d, hcf_16 tx_cntl); EXTERN_C DESC_STRCT* hcf_dma_tx_get (IFBP ifbp ); EXTERN_C DESC_STRCT* hcf_dma_rx_get (IFBP ifbp ); -EXTERN_C void hcf_dma_rx_put (IFBP ifbp, DESC_STRCT *d ); +EXTERN_C void hcf_dma_rx_put(IFBP ifbp, DESC_STRCT *d); #endif // HCF_DMA #if (HCF_ASSERT) & HCF_ASSERT_LNK_MSF_RTN -EXTERN_C void msf_assert (unsigned int line_number, hcf_16 trace, hcf_32 qual ); +EXTERN_C void msf_assert(unsigned int line_number, hcf_16 trace, hcf_32 qual); #endif // HCF_ASSERT_LNK_MSF_RTN #endif // HCF_H diff --git a/drivers/staging/wlags49_h2/sta_h2.c b/drivers/staging/wlags49_h2/sta_h2.c index 19bed81..25ac76f 100644 --- a/drivers/staging/wlags49_h2/sta_h2.c +++ b/drivers/staging/wlags49_h2/sta_h2.c @@ -4472,8 +4472,8 @@ memimage fw_image = { "FUPU7D37dhfwci\001C", /* signature, <format number>, C/Bin type */ (CFG_PROG_STRCT *) fw_image_code, 0x000F368E, - 00000000, /* (dummy) pdaplug */ - 00000000, /* (dummy) priplug */ + NULL, /* (dummy) pdaplug */ + NULL, /* (dummy) priplug */ (CFG_RANGE20_STRCT *) fw_image_infocompat, (CFG_IDENTITY_STRCT *) fw_image_infoidentity, }; diff --git a/drivers/staging/wlags49_h2/wl_priv.c b/drivers/staging/wlags49_h2/wl_priv.c index c97e0e1..7e10dcd 100644 --- a/drivers/staging/wlags49_h2/wl_priv.c +++ b/drivers/staging/wlags49_h2/wl_priv.c @@ -570,6 +570,7 @@ int wvlan_uil_put_info(struct uilreq *urq, struct wl_private *lp) ltv_t *pLtv; bool_t ltvAllocated = FALSE; ENCSTRCT sEncryption; + size_t len; #ifdef USE_WDS hcf_16 hcfPort = HCF_PORT_0; @@ -686,7 +687,8 @@ int wvlan_uil_put_info(struct uilreq *urq, struct wl_private *lp) break; case CFG_CNF_OWN_NAME: memset(lp->StationName, 0, sizeof(lp->StationName)); - memcpy((void *)lp->StationName, (void *)&pLtv->u.u8[2], (size_t)pLtv->u.u16[0]); + len = min_t(size_t, pLtv->u.u16[0], sizeof(lp->StationName)); + strlcpy(lp->StationName, &pLtv->u.u8[2], len); pLtv->u.u16[0] = CNV_INT_TO_LITTLE(pLtv->u.u16[0]); break; case CFG_CNF_LOAD_BALANCING: @@ -1783,6 +1785,7 @@ int wvlan_set_station_nickname(struct net_device *dev, { struct wl_private *lp = wl_priv(dev); unsigned long flags; + size_t len; int ret = 0; /*------------------------------------------------------------------------*/ @@ -1793,8 +1796,8 @@ int wvlan_set_station_nickname(struct net_device *dev, wl_lock(lp, &flags); memset(lp->StationName, 0, sizeof(lp->StationName)); - - memcpy(lp->StationName, extra, wrqu->data.length); + len = min_t(size_t, wrqu->data.length, sizeof(lp->StationName)); + strlcpy(lp->StationName, extra, len); /* Commit the adapter parameters */ wl_apply(lp); |