Changeset 9bc41d0 in rtems-libbsd


Ignore:
Timestamp:
Dec 12, 2016, 9:51:42 AM (3 years ago)
Author:
Christian Mauderer <Christian.Mauderer@…>
Branches:
fd86c091b97759106da7355ce1dd81ebe030e285, f020f08430150c1656a0ad0a1de13699db9b980b
Children:
0cbb715
Parents:
bce3e5e
git-author:
Christian Mauderer <Christian.Mauderer@…> (12/12/16 09:51:42)
git-committer:
Christian Mauderer <Christian.Mauderer@…> (01/17/17 11:50:58)
Message:

lib80211/regdomain: Port to RTEMS.

Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • Makefile.todo

    rbce3e5e r9bc41d0  
    2828GENERATED += $(LOCAL_SRC)/mmcbus_if.c
    2929GENERATED += $(LOCAL_SRC)/urtwn-rtl8192cfwT.fw.c
     30GENERATED += rtemsbsd/include/machine/rtems-bsd-regdomain.h
     31GENERATED += rtemsbsd/rtems/rtems-bsd-regdomain.c
    3032
    3133all: $(GENERATED)
     
    149151            < $< > $@ || rm -f $@
    150152
     153rtemsbsd/include/machine/rtems-bsd-regdomain.h: $(FREEBSD_SRC)/etc/regdomain.xml
     154        rtems-bin2c -H $< $@
     155
     156rtemsbsd/rtems/rtems-bsd-regdomain.c: $(FREEBSD_SRC)/etc/regdomain.xml
     157        rtems-bin2c -C $< $@
     158
    151159clean:
    152160        rm $(GENERATED)
  • freebsd/lib/lib80211/lib80211_regdomain.c

    rbce3e5e r9bc41d0  
    2929#endif /* not lint */
    3030
     31#ifdef __rtems__
     32/* We need some functions from kernel name space */
     33#define sbuf_bcat       _bsd_sbuf_bcat
     34#define sbuf_finish     _bsd_sbuf_finish
     35#define sbuf_data       _bsd_sbuf_data
     36#define sbuf_len        _bsd_sbuf_len
     37#define sbuf_delete     _bsd_sbuf_delete
     38#define sbuf_new        _bsd_sbuf_new
     39#endif /* __rtems__ */
    3140#include <sys/types.h>
    3241#include <rtems/bsd/sys/errno.h>
     
    4857
    4958#include <net80211/_ieee80211.h>
     59#ifdef __rtems__
     60#include <machine/rtems-bsd-regdomain.h>
     61#endif /* __rtems__ */
    5062
    5163#define MAXLEVEL        20
     
    628640        rdp = calloc(1, sizeof(struct regdata));
    629641
     642#ifndef __rtems__
    630643        fd = open(_PATH_REGDOMAIN, O_RDONLY);
    631644        if (fd < 0) {
     
    653666                return NULL;
    654667        }
     668#else /* __rtems__ */
     669        sb.st_size = regdomain_xml_size;
     670        xml = regdomain_xml;
     671#endif /* __rtems__ */
    655672        if (lib80211_regdomain_readconfig(rdp, xml, sb.st_size) != 0) {
    656673#ifdef DEBUG
     
    662679                return NULL;
    663680        }
     681#ifndef __rtems__
    664682        munmap(xml, sb.st_size);
    665683        close(fd);
     684#endif /* __rtems__ */
    666685
    667686        return rdp;
  • libbsd.py

    rbce3e5e r9bc41d0  
    20372037        ],
    20382038        mm.generator['source']('-D__DBINTERFACE_PRIVATE -DINET6')
     2039    )
     2040    mod.addRTEMSHeaderFiles(
     2041        [
     2042            'include/machine/rtems-bsd-regdomain.h',
     2043        ]
     2044    )
     2045    mod.addRTEMSSourceFiles(
     2046        [
     2047            'rtems/rtems-bsd-regdomain.c',
     2048        ],
     2049        mm.generator['source']()
    20392050    )
    20402051    mod.addUserSpaceSourceFiles(
  • libbsd_waf.py

    rbce3e5e r9bc41d0  
    11811181              'rtemsbsd/rtems/rtems-bsd-rc-conf-pf.c',
    11821182              'rtemsbsd/rtems/rtems-bsd-rc-conf.c',
     1183              'rtemsbsd/rtems/rtems-bsd-regdomain.c',
    11831184              'rtemsbsd/rtems/rtems-bsd-shell-arp.c',
    11841185              'rtemsbsd/rtems/rtems-bsd-shell-dhcpcd.c',
Note: See TracChangeset for help on using the changeset viewer.