aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlwin Beukers <alwin@broadcom.com>2011-10-12 14:51:30 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-10-14 14:48:19 -0400
commit53a2277d2ad411b440d2f102ced7bebef42c2fd7 (patch)
treeedb01de1b3e008a3d191864e70ec88aa897b162e
parent3de67818e7e7ef95c8f7eac665dd29454c07b48b (diff)
brcm80211: moved function brcmu_mkiovar
Moved the brcmu_mkiovar function into fmac, adjusting the name accordingly. Reported-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/dhd.h3
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c39
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c6
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c24
-rw-r--r--drivers/net/wireless/brcm80211/brcmutil/utils.c20
-rw-r--r--drivers/net/wireless/brcm80211/include/brcmu_utils.h3
6 files changed, 48 insertions, 47 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd.h b/drivers/net/wireless/brcm80211/brcmfmac/dhd.h
index 951910e7ead2..4645766b4070 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd.h
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd.h
@@ -680,6 +680,9 @@ struct bcmevent_name {
680 680
681extern const struct bcmevent_name bcmevent_names[]; 681extern const struct bcmevent_name bcmevent_names[];
682 682
683extern uint brcmf_c_mkiovar(char *name, char *data, uint datalen,
684 char *buf, uint len);
685
683/* Indication from bus module regarding presence/insertion of dongle. 686/* Indication from bus module regarding presence/insertion of dongle.
684 * Return struct brcmf_pub pointer, used as handle to OS module in later calls. 687 * Return struct brcmf_pub pointer, used as handle to OS module in later calls.
685 * Returned structure should have bus and prot pointers filled in. 688 * Returned structure should have bus and prot pointers filled in.
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c
index a43b3daa76ae..891826197f96 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c
@@ -65,6 +65,26 @@ struct msgtrace_hdr {
65 because of trace overflow */ 65 because of trace overflow */
66} __packed; 66} __packed;
67 67
68
69uint
70brcmf_c_mkiovar(char *name, char *data, uint datalen, char *buf, uint buflen)
71{
72 uint len;
73
74 len = strlen(name) + 1;
75
76 if ((len + datalen) > buflen)
77 return 0;
78
79 strncpy(buf, name, buflen);
80
81 /* append data onto the end of the name string */
82 memcpy(&buf[len], data, datalen);
83 len += datalen;
84
85 return len;
86}
87
68void brcmf_c_init(void) 88void brcmf_c_init(void)
69{ 89{
70 /* Init global variables at run-time, not as part of the declaration. 90 /* Init global variables at run-time, not as part of the declaration.
@@ -607,7 +627,7 @@ brcmf_c_pktfilter_offload_enable(struct brcmf_pub *drvr, char *arg, int enable,
607 627
608 /* Contorl the master mode */ 628 /* Contorl the master mode */
609 mmode_le = cpu_to_le32(master_mode); 629 mmode_le = cpu_to_le32(master_mode);
610 brcmu_mkiovar("pkt_filter_mode", (char *)&mmode_le, 4, buf, 630 brcmf_c_mkiovar("pkt_filter_mode", (char *)&mmode_le, 4, buf,
611 sizeof(buf)); 631 sizeof(buf));
612 rc = brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, buf, 632 rc = brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, buf,
613 sizeof(buf)); 633 sizeof(buf));
@@ -756,7 +776,7 @@ static void brcmf_c_arp_offload_set(struct brcmf_pub *drvr, int arp_mode)
756 char iovbuf[32]; 776 char iovbuf[32];
757 int retcode; 777 int retcode;
758 778
759 brcmu_mkiovar("arp_ol", (char *)&arp_mode, 4, iovbuf, sizeof(iovbuf)); 779 brcmf_c_mkiovar("arp_ol", (char *)&arp_mode, 4, iovbuf, sizeof(iovbuf));
760 retcode = brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, 780 retcode = brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR,
761 iovbuf, sizeof(iovbuf)); 781 iovbuf, sizeof(iovbuf));
762 retcode = retcode >= 0 ? 0 : retcode; 782 retcode = retcode >= 0 ? 0 : retcode;
@@ -773,7 +793,8 @@ static void brcmf_c_arp_offload_enable(struct brcmf_pub *drvr, int arp_enable)
773 char iovbuf[32]; 793 char iovbuf[32];
774 int retcode; 794 int retcode;
775 795
776 brcmu_mkiovar("arpoe", (char *)&arp_enable, 4, iovbuf, sizeof(iovbuf)); 796 brcmf_c_mkiovar("arpoe", (char *)&arp_enable, 4,
797 iovbuf, sizeof(iovbuf));
777 retcode = brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, 798 retcode = brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR,
778 iovbuf, sizeof(iovbuf)); 799 iovbuf, sizeof(iovbuf));
779 retcode = retcode >= 0 ? 0 : retcode; 800 retcode = retcode >= 0 ? 0 : retcode;
@@ -812,33 +833,33 @@ int brcmf_c_preinit_dcmds(struct brcmf_pub *drvr)
812 /* query for 'ver' to get version info from firmware */ 833 /* query for 'ver' to get version info from firmware */
813 memset(buf, 0, sizeof(buf)); 834 memset(buf, 0, sizeof(buf));
814 ptr = buf; 835 ptr = buf;
815 brcmu_mkiovar("ver", NULL, 0, buf, sizeof(buf)); 836 brcmf_c_mkiovar("ver", NULL, 0, buf, sizeof(buf));
816 brcmf_proto_cdc_query_dcmd(drvr, 0, BRCMF_C_GET_VAR, buf, sizeof(buf)); 837 brcmf_proto_cdc_query_dcmd(drvr, 0, BRCMF_C_GET_VAR, buf, sizeof(buf));
817 strsep(&ptr, "\n"); 838 strsep(&ptr, "\n");
818 /* Print fw version info */ 839 /* Print fw version info */
819 brcmf_dbg(ERROR, "Firmware version = %s\n", buf); 840 brcmf_dbg(ERROR, "Firmware version = %s\n", buf);
820 841
821 /* Match Host and Dongle rx alignment */ 842 /* Match Host and Dongle rx alignment */
822 brcmu_mkiovar("bus:txglomalign", (char *)&dongle_align, 4, iovbuf, 843 brcmf_c_mkiovar("bus:txglomalign", (char *)&dongle_align, 4, iovbuf,
823 sizeof(iovbuf)); 844 sizeof(iovbuf));
824 brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, iovbuf, 845 brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, iovbuf,
825 sizeof(iovbuf)); 846 sizeof(iovbuf));
826 847
827 /* disable glom option per default */ 848 /* disable glom option per default */
828 brcmu_mkiovar("bus:txglom", (char *)&glom, 4, iovbuf, sizeof(iovbuf)); 849 brcmf_c_mkiovar("bus:txglom", (char *)&glom, 4, iovbuf, sizeof(iovbuf));
829 brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, iovbuf, 850 brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, iovbuf,
830 sizeof(iovbuf)); 851 sizeof(iovbuf));
831 852
832 /* Setup timeout if Beacons are lost and roam is off to report 853 /* Setup timeout if Beacons are lost and roam is off to report
833 link down */ 854 link down */
834 brcmu_mkiovar("bcn_timeout", (char *)&bcn_timeout, 4, iovbuf, 855 brcmf_c_mkiovar("bcn_timeout", (char *)&bcn_timeout, 4, iovbuf,
835 sizeof(iovbuf)); 856 sizeof(iovbuf));
836 brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, iovbuf, 857 brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, iovbuf,
837 sizeof(iovbuf)); 858 sizeof(iovbuf));
838 859
839 /* Enable/Disable build-in roaming to allowed ext supplicant to take 860 /* Enable/Disable build-in roaming to allowed ext supplicant to take
840 of romaing */ 861 of romaing */
841 brcmu_mkiovar("roam_off", (char *)&roaming, 4, 862 brcmf_c_mkiovar("roam_off", (char *)&roaming, 4,
842 iovbuf, sizeof(iovbuf)); 863 iovbuf, sizeof(iovbuf));
843 brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, iovbuf, 864 brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, iovbuf,
844 sizeof(iovbuf)); 865 sizeof(iovbuf));
@@ -847,7 +868,7 @@ int brcmf_c_preinit_dcmds(struct brcmf_pub *drvr)
847 brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_UP, (char *)&up, sizeof(up)); 868 brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_UP, (char *)&up, sizeof(up));
848 869
849 /* Setup event_msgs */ 870 /* Setup event_msgs */
850 brcmu_mkiovar("event_msgs", drvr->eventmask, BRCMF_EVENTING_MASK_LEN, 871 brcmf_c_mkiovar("event_msgs", drvr->eventmask, BRCMF_EVENTING_MASK_LEN,
851 iovbuf, sizeof(iovbuf)); 872 iovbuf, sizeof(iovbuf));
852 brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, iovbuf, 873 brcmf_proto_cdc_set_dcmd(drvr, 0, BRCMF_C_SET_VAR, iovbuf,
853 sizeof(iovbuf)); 874 sizeof(iovbuf));
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
index c61ffe4bfaf0..a45554af6b0d 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
@@ -203,7 +203,7 @@ static void _brcmf_set_multicast_list(struct work_struct *work)
203 203
204 dcmd_le_value = cpu_to_le32(dcmd_value); 204 dcmd_le_value = cpu_to_le32(dcmd_value);
205 205
206 if (!brcmu_mkiovar 206 if (!brcmf_c_mkiovar
207 ("allmulti", (void *)&dcmd_le_value, 207 ("allmulti", (void *)&dcmd_le_value,
208 sizeof(dcmd_le_value), buf, buflen)) { 208 sizeof(dcmd_le_value), buf, buflen)) {
209 brcmf_dbg(ERROR, "%s: mkiovar failed for allmulti, datalen %d buflen %u\n", 209 brcmf_dbg(ERROR, "%s: mkiovar failed for allmulti, datalen %d buflen %u\n",
@@ -259,7 +259,7 @@ _brcmf_set_mac_address(struct work_struct *work)
259 setmacaddr_work); 259 setmacaddr_work);
260 260
261 brcmf_dbg(TRACE, "enter\n"); 261 brcmf_dbg(TRACE, "enter\n");
262 if (!brcmu_mkiovar("cur_etheraddr", (char *)drvr_priv->macvalue, 262 if (!brcmf_c_mkiovar("cur_etheraddr", (char *)drvr_priv->macvalue,
263 ETH_ALEN, buf, 32)) { 263 ETH_ALEN, buf, 32)) {
264 brcmf_dbg(ERROR, "%s: mkiovar failed for cur_etheraddr\n", 264 brcmf_dbg(ERROR, "%s: mkiovar failed for cur_etheraddr\n",
265 brcmf_ifname(&drvr_priv->pub, 0)); 265 brcmf_ifname(&drvr_priv->pub, 0));
@@ -1083,7 +1083,7 @@ int brcmf_bus_start(struct brcmf_pub *drvr)
1083 return -ENODEV; 1083 return -ENODEV;
1084 } 1084 }
1085 1085
1086 brcmu_mkiovar("event_msgs", drvr->eventmask, BRCMF_EVENTING_MASK_LEN, 1086 brcmf_c_mkiovar("event_msgs", drvr->eventmask, BRCMF_EVENTING_MASK_LEN,
1087 iovbuf, sizeof(iovbuf)); 1087 iovbuf, sizeof(iovbuf));
1088 brcmf_proto_cdc_query_dcmd(drvr, 0, BRCMF_C_GET_VAR, iovbuf, 1088 brcmf_proto_cdc_query_dcmd(drvr, 0, BRCMF_C_GET_VAR, iovbuf,
1089 sizeof(iovbuf)); 1089 sizeof(iovbuf));
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
index 857b3287e04b..5eddabe5228a 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
@@ -437,7 +437,7 @@ static s32 brcmf_dev_intvar_set(struct net_device *ndev, s8 *name, s32 val)
437 __le32 val_le; 437 __le32 val_le;
438 438
439 val_le = cpu_to_le32(val); 439 val_le = cpu_to_le32(val);
440 len = brcmu_mkiovar(name, (char *)(&val_le), sizeof(val_le), buf, 440 len = brcmf_c_mkiovar(name, (char *)(&val_le), sizeof(val_le), buf,
441 sizeof(buf)); 441 sizeof(buf));
442 BUG_ON(!len); 442 BUG_ON(!len);
443 443
@@ -460,7 +460,7 @@ brcmf_dev_intvar_get(struct net_device *ndev, s8 *name, s32 *retval)
460 s32 err = 0; 460 s32 err = 0;
461 461
462 len = 462 len =
463 brcmu_mkiovar(name, (char *)(&data_null), 0, (char *)(&var), 463 brcmf_c_mkiovar(name, (char *)(&data_null), 0, (char *)(&var),
464 sizeof(var.buf)); 464 sizeof(var.buf));
465 BUG_ON(!len); 465 BUG_ON(!len);
466 err = brcmf_exec_dcmd(ndev, BRCMF_C_GET_VAR, &var, len); 466 err = brcmf_exec_dcmd(ndev, BRCMF_C_GET_VAR, &var, len);
@@ -508,7 +508,7 @@ brcmf_dev_iovar_setbuf(struct net_device *ndev, s8 * iovar, void *param,
508{ 508{
509 s32 iolen; 509 s32 iolen;
510 510
511 iolen = brcmu_mkiovar(iovar, param, paramlen, bufptr, buflen); 511 iolen = brcmf_c_mkiovar(iovar, param, paramlen, bufptr, buflen);
512 BUG_ON(!iolen); 512 BUG_ON(!iolen);
513 513
514 return brcmf_exec_dcmd(ndev, BRCMF_C_SET_VAR, bufptr, iolen); 514 return brcmf_exec_dcmd(ndev, BRCMF_C_SET_VAR, bufptr, iolen);
@@ -520,7 +520,7 @@ brcmf_dev_iovar_getbuf(struct net_device *ndev, s8 * iovar, void *param,
520{ 520{
521 s32 iolen; 521 s32 iolen;
522 522
523 iolen = brcmu_mkiovar(iovar, param, paramlen, bufptr, buflen); 523 iolen = brcmf_c_mkiovar(iovar, param, paramlen, bufptr, buflen);
524 BUG_ON(!iolen); 524 BUG_ON(!iolen);
525 525
526 return brcmf_exec_dcmd(ndev, BRCMF_C_GET_VAR, bufptr, buflen); 526 return brcmf_exec_dcmd(ndev, BRCMF_C_GET_VAR, bufptr, buflen);
@@ -2554,7 +2554,7 @@ brcmf_dev_bufvar_set(struct net_device *ndev, s8 *name, s8 *buf, s32 len)
2554 struct brcmf_cfg80211_priv *cfg_priv = ndev_to_cfg(ndev); 2554 struct brcmf_cfg80211_priv *cfg_priv = ndev_to_cfg(ndev);
2555 u32 buflen; 2555 u32 buflen;
2556 2556
2557 buflen = brcmu_mkiovar(name, buf, len, cfg_priv->dcmd_buf, 2557 buflen = brcmf_c_mkiovar(name, buf, len, cfg_priv->dcmd_buf,
2558 WL_DCMD_LEN_MAX); 2558 WL_DCMD_LEN_MAX);
2559 BUG_ON(!buflen); 2559 BUG_ON(!buflen);
2560 2560
@@ -2570,7 +2570,7 @@ brcmf_dev_bufvar_get(struct net_device *ndev, s8 *name, s8 *buf,
2570 u32 len; 2570 u32 len;
2571 s32 err = 0; 2571 s32 err = 0;
2572 2572
2573 len = brcmu_mkiovar(name, NULL, 0, cfg_priv->dcmd_buf, 2573 len = brcmf_c_mkiovar(name, NULL, 0, cfg_priv->dcmd_buf,
2574 WL_DCMD_LEN_MAX); 2574 WL_DCMD_LEN_MAX);
2575 BUG_ON(!len); 2575 BUG_ON(!len);
2576 err = brcmf_exec_dcmd(ndev, BRCMF_C_GET_VAR, cfg_priv->dcmd_buf, 2576 err = brcmf_exec_dcmd(ndev, BRCMF_C_GET_VAR, cfg_priv->dcmd_buf,
@@ -3513,8 +3513,8 @@ static s32 brcmf_dongle_eventmsg(struct net_device *ndev)
3513 WL_TRACE("Enter\n"); 3513 WL_TRACE("Enter\n");
3514 3514
3515 /* Setup event_msgs */ 3515 /* Setup event_msgs */
3516 brcmu_mkiovar("event_msgs", eventmask, BRCMF_EVENTING_MASK_LEN, iovbuf, 3516 brcmf_c_mkiovar("event_msgs", eventmask, BRCMF_EVENTING_MASK_LEN,
3517 sizeof(iovbuf)); 3517 iovbuf, sizeof(iovbuf));
3518 err = brcmf_exec_dcmd(ndev, BRCMF_C_GET_VAR, iovbuf, sizeof(iovbuf)); 3518 err = brcmf_exec_dcmd(ndev, BRCMF_C_GET_VAR, iovbuf, sizeof(iovbuf));
3519 if (err) { 3519 if (err) {
3520 WL_ERR("Get event_msgs error (%d)\n", err); 3520 WL_ERR("Get event_msgs error (%d)\n", err);
@@ -3542,8 +3542,8 @@ static s32 brcmf_dongle_eventmsg(struct net_device *ndev)
3542 setbit(eventmask, BRCMF_E_JOIN_START); 3542 setbit(eventmask, BRCMF_E_JOIN_START);
3543 setbit(eventmask, BRCMF_E_SCAN_COMPLETE); 3543 setbit(eventmask, BRCMF_E_SCAN_COMPLETE);
3544 3544
3545 brcmu_mkiovar("event_msgs", eventmask, BRCMF_EVENTING_MASK_LEN, iovbuf, 3545 brcmf_c_mkiovar("event_msgs", eventmask, BRCMF_EVENTING_MASK_LEN,
3546 sizeof(iovbuf)); 3546 iovbuf, sizeof(iovbuf));
3547 err = brcmf_exec_dcmd(ndev, BRCMF_C_SET_VAR, iovbuf, sizeof(iovbuf)); 3547 err = brcmf_exec_dcmd(ndev, BRCMF_C_SET_VAR, iovbuf, sizeof(iovbuf));
3548 if (err) { 3548 if (err) {
3549 WL_ERR("Set event_msgs error (%d)\n", err); 3549 WL_ERR("Set event_msgs error (%d)\n", err);
@@ -3571,7 +3571,7 @@ brcmf_dongle_roam(struct net_device *ndev, u32 roamvar, u32 bcn_timeout)
3571 */ 3571 */
3572 if (roamvar) { 3572 if (roamvar) {
3573 bcn_to_le = cpu_to_le32(bcn_timeout); 3573 bcn_to_le = cpu_to_le32(bcn_timeout);
3574 brcmu_mkiovar("bcn_timeout", (char *)&bcn_to_le, 3574 brcmf_c_mkiovar("bcn_timeout", (char *)&bcn_to_le,
3575 sizeof(bcn_to_le), iovbuf, sizeof(iovbuf)); 3575 sizeof(bcn_to_le), iovbuf, sizeof(iovbuf));
3576 err = brcmf_exec_dcmd(ndev, BRCMF_C_SET_VAR, 3576 err = brcmf_exec_dcmd(ndev, BRCMF_C_SET_VAR,
3577 iovbuf, sizeof(iovbuf)); 3577 iovbuf, sizeof(iovbuf));
@@ -3587,7 +3587,7 @@ brcmf_dongle_roam(struct net_device *ndev, u32 roamvar, u32 bcn_timeout)
3587 */ 3587 */
3588 WL_INFO("Internal Roaming = %s\n", roamvar ? "Off" : "On"); 3588 WL_INFO("Internal Roaming = %s\n", roamvar ? "Off" : "On");
3589 roamvar_le = cpu_to_le32(roamvar); 3589 roamvar_le = cpu_to_le32(roamvar);
3590 brcmu_mkiovar("roam_off", (char *)&roamvar_le, 3590 brcmf_c_mkiovar("roam_off", (char *)&roamvar_le,
3591 sizeof(roamvar_le), iovbuf, sizeof(iovbuf)); 3591 sizeof(roamvar_le), iovbuf, sizeof(iovbuf));
3592 err = brcmf_exec_dcmd(ndev, BRCMF_C_SET_VAR, iovbuf, sizeof(iovbuf)); 3592 err = brcmf_exec_dcmd(ndev, BRCMF_C_SET_VAR, iovbuf, sizeof(iovbuf));
3593 if (err) { 3593 if (err) {
diff --git a/drivers/net/wireless/brcm80211/brcmutil/utils.c b/drivers/net/wireless/brcm80211/brcmutil/utils.c
index b612742ad5c9..d3ab7f5f0ef9 100644
--- a/drivers/net/wireless/brcm80211/brcmutil/utils.c
+++ b/drivers/net/wireless/brcm80211/brcmutil/utils.c
@@ -438,23 +438,3 @@ int brcmu_format_hex(char *str, const void *bytes, int len)
438} 438}
439EXPORT_SYMBOL(brcmu_format_hex); 439EXPORT_SYMBOL(brcmu_format_hex);
440#endif /* defined(BCMDBG) */ 440#endif /* defined(BCMDBG) */
441
442uint brcmu_mkiovar(char *name, char *data, uint datalen, char *buf, uint buflen)
443{
444 uint len;
445
446 len = strlen(name) + 1;
447
448 if ((len + datalen) > buflen)
449 return 0;
450
451 strncpy(buf, name, buflen);
452
453 /* append data onto the end of the name string */
454 memcpy(&buf[len], data, datalen);
455 len += datalen;
456
457 return len;
458}
459EXPORT_SYMBOL(brcmu_mkiovar);
460
diff --git a/drivers/net/wireless/brcm80211/include/brcmu_utils.h b/drivers/net/wireless/brcm80211/include/brcmu_utils.h
index c19490c138d8..f8664b20ccc3 100644
--- a/drivers/net/wireless/brcm80211/include/brcmu_utils.h
+++ b/drivers/net/wireless/brcm80211/include/brcmu_utils.h
@@ -200,7 +200,4 @@ extern int brcmu_format_flags(const struct brcmu_bit_desc *bd, u32 flags,
200extern int brcmu_format_hex(char *str, const void *bytes, int len); 200extern int brcmu_format_hex(char *str, const void *bytes, int len);
201#endif 201#endif
202 202
203extern uint brcmu_mkiovar(char *name, char *data, uint datalen,
204 char *buf, uint len);
205
206#endif /* _BRCMU_UTILS_H_ */ 203#endif /* _BRCMU_UTILS_H_ */