Changeset dcba819 in mainline


Ignore:
Timestamp:
2015-04-23T23:42:32Z (10 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
055a68a, 86cf96d, bf1733d3
Parents:
749fe15b (diff), 8a64320e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

initial merge of the AR9271 USB WiFi driver (e.g. TL-WN722N)
initial merge of the IEEE 802.11 stack
(thx Jan Kolarik)

Files:
34 added
14 edited

Legend:

Unmodified
Added
Removed
  • boot/Makefile

    r749fe15b rdcba819  
    115115                cp "$(USPACE_PATH)/$(DRVS_PATH)/$$file_dir/$$file_name/$$file_name.dev" "$(DIST_PATH)/$(DRVS_PATH)/$$file_name/" ; \
    116116        done
     117        for file in $(RD_DRVS_FW) ; do \
     118                file_dir="`dirname "$$file"`" ; \
     119                file_name="`basename "$$file"`" ; \
     120                cp "$(USPACE_PATH)/$(DRVS_PATH)/$$file_dir/$$file_name/$$file_name.fw" "$(DIST_PATH)/$(DRVS_PATH)/$$file_name/" ; \
     121        done
    117122        if ls $(DIST_OVERLAY_PATH)/* >/dev/null; then \
    118123                cp -r -L $(DIST_OVERLAY_PATH)/* "$(DIST_PATH)"; \
  • boot/Makefile.common

    r749fe15b rdcba819  
    139139        nic/rtl8139 \
    140140        nic/rtl8169 \
     141        nic/ar9271 \
    141142        block/ahci
    142143
    143144RD_DRV_CFG =
     145
     146RD_DRVS_FW_NON_ESSENTIAL = \
     147        nic/ar9271
    144148
    145149RD_LIBS =
     
    223227        $(USPACE_PATH)/app/viewer/viewer \
    224228        $(USPACE_PATH)/app/df/df \
    225         $(USPACE_PATH)/app/fontviewer/fontviewer
     229        $(USPACE_PATH)/app/fontviewer/fontviewer \
     230        $(USPACE_PATH)/app/wifi_supplicant/wifi_supplicant
    226231
    227232RD_TESTS = \
     
    247252RD_APPS = $(RD_APPS_ESSENTIAL)
    248253RD_DRVS = $(RD_DRVS_ESSENTIAL)
     254RD_DRVS_FW = $(RD_DRVS_FW_ESSENTIAL)
    249255else
    250256RD_SRVS = $(RD_SRVS_ESSENTIAL) $(RD_SRVS_NON_ESSENTIAL)
    251257RD_APPS = $(RD_APPS_ESSENTIAL) $(RD_APPS_NON_ESSENTIAL)
    252258RD_DRVS = $(RD_DRVS_ESSENTIAL) $(RD_DRVS_NON_ESSENTIAL)
     259RD_DRVS_FW = $(RD_DRVS_FW_ESSENTIAL) $(RD_DRVS_FW_NON_ESSENTIAL)
    253260endif
    254261
  • uspace/Makefile

    r749fe15b rdcba819  
    9494        app/wavplay \
    9595        app/websrv \
     96        app/wifi_supplicant \
    9697        srv/audio/hound \
    9798        srv/clipboard \
     
    164165        drv/nic/rtl8139 \
    165166        drv/nic/rtl8169 \
     167        drv/nic/ar9271 \
    166168        drv/platform/icp
    167169
     
    218220        lib/fs \
    219221        lib/block \
     222        lib/crypto \
    220223        lib/clui \
    221224        lib/fmtutil \
     
    248251        lib/posix \
    249252        lib/mbr \
    250         lib/gpt
     253        lib/gpt \
     254        lib/ieee80211
    251255
    252256LIBC_BUILD = $(addsuffix .build,$(LIBC))
  • uspace/Makefile.common

    r749fe15b rdcba819  
    120120LIBPOSIX_PREFIX = $(LIB_PREFIX)/posix
    121121
     122LIBCRYPTO_PREFIX = $(LIB_PREFIX)/crypto
    122123LIBBLOCK_PREFIX = $(LIB_PREFIX)/block
    123124LIBFS_PREFIX = $(LIB_PREFIX)/fs
     
    143144LIBNET_PREFIX = $(LIB_PREFIX)/net
    144145LIBNIC_PREFIX = $(LIB_PREFIX)/nic
     146LIBIEEE80211_PREFIX = $(LIB_PREFIX)/ieee80211
    145147LIBMINIX_PREFIX = $(LIB_PREFIX)/minix
    146148LIBCOMPRESS_PREFIX = $(LIB_PREFIX)/compress
  • uspace/lib/c/generic/dhcp.c

    r749fe15b rdcba819  
    8484}
    8585
     86int dhcp_discover(sysarg_t link_id)
     87{
     88        async_exch_t *exch = async_exchange_begin(dhcp_sess);
     89
     90        int rc = async_req_1_0(exch, DHCP_DISCOVER, link_id);
     91        async_exchange_end(exch);
     92
     93        return rc;
     94}
     95
    8696/** @}
    8797 */
  • uspace/lib/c/include/inet/dhcp.h

    r749fe15b rdcba819  
    4141extern int dhcp_link_add(sysarg_t);
    4242extern int dhcp_link_remove(sysarg_t);
     43extern int dhcp_discover(sysarg_t);
    4344
    4445#endif
  • uspace/lib/c/include/ipc/dev_iface.h

    r749fe15b rdcba819  
    4848        /** Network interface controller interface */
    4949        NIC_DEV_IFACE,
     50               
     51        /** IEEE 802.11 interface controller interface */
     52        IEEE80211_DEV_IFACE,
    5053       
    5154        /** Interface provided by any PCI device. */
  • uspace/lib/c/include/ipc/dhcp.h

    r749fe15b rdcba819  
    4141typedef enum {
    4242        DHCP_LINK_ADD = IPC_FIRST_USER_METHOD,
    43         DHCP_LINK_REMOVE
     43        DHCP_LINK_REMOVE,
     44        DHCP_DISCOVER
    4445} dhcp_request_t;
    4546
  • uspace/lib/drv/Makefile

    r749fe15b rdcba819  
    4848        generic/remote_char_dev.c \
    4949        generic/remote_nic.c \
     50        generic/remote_ieee80211.c \
    5051        generic/remote_usb.c \
    5152        generic/remote_pci.c \
  • uspace/lib/drv/generic/dev_iface.c

    r749fe15b rdcba819  
    4646#include "remote_battery_dev.h"
    4747#include "remote_nic.h"
     48#include "remote_ieee80211.h"
    4849#include "remote_usb.h"
    4950#include "remote_usbhc.h"
     
    6263                [CHAR_DEV_IFACE] = &remote_char_dev_iface,
    6364                [NIC_DEV_IFACE] = &remote_nic_iface,
     65                [IEEE80211_DEV_IFACE] = &remote_ieee80211_iface,
    6466                [PCI_DEV_IFACE] = &remote_pci_iface,
    6567                [USB_DEV_IFACE] = &remote_usb_iface,
  • uspace/srv/locsrv/locsrv.c

    r749fe15b rdcba819  
    13571357        cat = category_new("nic");
    13581358        categ_dir_add_cat(&cdir, cat);
     1359       
     1360        cat = category_new("ieee80211");
     1361        categ_dir_add_cat(&cdir, cat);
    13591362
    13601363        cat = category_new("visualizer");
  • uspace/srv/net/dhcp/dhcp.c

    r749fe15b rdcba819  
    418418}
    419419
     420static int dhcp_discover_proc(dhcp_link_t *dlink)
     421{
     422        dlink->state = ds_selecting;
     423
     424        int rc = dhcp_send_discover(dlink);
     425        if (rc != EOK)
     426                return EIO;
     427
     428        dlink->retries_left = dhcp_discover_retries;
     429       
     430        if ((dlink->timeout->state == fts_not_set) ||
     431            (dlink->timeout->state == fts_fired))
     432                fibril_timer_set(dlink->timeout, dhcp_discover_timeout_val,
     433                    dhcpsrv_discover_timeout, dlink);
     434       
     435        return rc;
     436}
     437
    420438int dhcpsrv_link_add(service_id_t link_id)
    421439{
     
    459477        }
    460478
    461         dlink->state = ds_selecting;
    462 
    463479        log_msg(LOG_DEFAULT, LVL_DEBUG, "Send DHCPDISCOVER");
    464         rc = dhcp_send_discover(dlink);
     480        rc = dhcp_discover_proc(dlink);
    465481        if (rc != EOK) {
    466482                log_msg(LOG_DEFAULT, LVL_ERROR, "Error sending DHCPDISCOVER.");
     
    469485                goto error;
    470486        }
    471 
    472         dlink->retries_left = dhcp_discover_retries;
    473         fibril_timer_set(dlink->timeout, dhcp_discover_timeout_val,
    474             dhcpsrv_discover_timeout, dlink);
    475487
    476488        list_append(&dlink->links, &dhcp_links);
     
    487499{
    488500        return ENOTSUP;
     501}
     502
     503int dhcpsrv_discover(service_id_t link_id)
     504{
     505        log_msg(LOG_DEFAULT, LVL_DEBUG, "dhcpsrv_link_add(%zu)", link_id);
     506       
     507        dhcp_link_t *dlink = dhcpsrv_link_find(link_id);
     508       
     509        if (dlink == NULL) {
     510                log_msg(LOG_DEFAULT, LVL_NOTE, "Link %zu doesn't exist",
     511                    link_id);
     512                return EINVAL;
     513        }
     514       
     515        return dhcp_discover_proc(dlink);
    489516}
    490517
  • uspace/srv/net/dhcp/dhcp.h

    r749fe15b rdcba819  
    4343extern int dhcpsrv_link_add(service_id_t);
    4444extern int dhcpsrv_link_remove(service_id_t);
     45extern int dhcpsrv_discover(service_id_t);
    4546
    4647#endif
  • uspace/srv/net/dhcp/main.c

    r749fe15b rdcba819  
    109109}
    110110
     111static void dhcp_discover_srv(ipc_callid_t callid, ipc_call_t *call)
     112{
     113        sysarg_t link_id;
     114        int rc;
     115
     116        log_msg(LOG_DEFAULT, LVL_DEBUG, "dhcp_discover_srv()");
     117
     118        link_id = IPC_GET_ARG1(*call);
     119
     120        rc = dhcpsrv_discover(link_id);
     121        async_answer_0(callid, rc);
     122}
     123
    111124static void dhcp_client_conn(ipc_callid_t iid, ipc_call_t *icall, void *arg)
    112125{
     
    133146                case DHCP_LINK_REMOVE:
    134147                        dhcp_link_remove_srv(callid, &call);
     148                        break;
     149                case DHCP_DISCOVER:
     150                        dhcp_discover_srv(callid, &call);
    135151                        break;
    136152                default:
Note: See TracChangeset for help on using the changeset viewer.