Changeset 31409


Ignore:
Timestamp:
Feb 15, 2017, 7:49:46 PM (5 days ago)
Author:
brainslayer
Message:

more corrections for ad

Location:
src/router
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/router/httpd/visuals/ejs.c

    r31408 r31409  
    23342334        char ssid[32];
    23352335
    2336         sprintf(ssid, "%s_ssid", nvram_safe_get("wifi_display"));
     2336        char *ifname = nvram_safe_get("wifi_display");
     2337        if (has_ad(ifname))
     2338            ifname = "ath2";
     2339        sprintf(ssid, "%s_ssid", ifname);
     2340        fprintf(stderr, "get ssid from %s = %s\n",ssid,nvram_safe_get(ssid));
    23372341        tf_webWriteESCNV(wp, ssid);
    23382342
     
    23412345        char mode[32];
    23422346
    2343         sprintf(mode, "%s_mode", nvram_safe_get("wifi_display"));
     2347        char *ifname = nvram_safe_get("wifi_display");
     2348        if (has_ad(ifname))
     2349            ifname = "ath2";
     2350        sprintf(mode, "%s_mode", ifname);
    23442351
    23452352        websWrite(wp, "<script type=\"text/javascript\">");
     
    23692376        char m[32];
    23702377
    2371         strncpy(m, nvram_safe_get("wifi_display"), 4);
     2378        char *ifname = nvram_safe_get("wifi_display");
     2379        if (has_ad(ifname))
     2380            ifname = "ath2";
     2381        strncpy(m, ifname, 4);
    23722382        m[4] = 0;
    23732383        sprintf(mode, "%s_net_mode", m);
  • src/router/httpd/visuals/status.c

    r30528 r31409  
    380380        char wifmac[32];
    381381
    382         sprintf(wifmac, "%s_hwaddr", nvram_safe_get("wifi_display"));
     382        char *ifname = nvram_safe_get("wifi_display");
     383        if (has_ad(ifname))
     384            ifname = "ath2";
     385        sprintf(wifmac, "%s_hwaddr", ifname);
    383386
    384387        websWrite(wp, "%s", nvram_safe_get(wifmac));
  • src/router/httpd/visuals/wireless_madwifi.c

    r31373 r31409  
    447447        char *prefix = nvram_safe_get("wifi_display");
    448448        int channel = wifi_getchannel(prefix);
    449 
    450449        if (channel > 0 && channel < 1000) {
    451450                struct wifi_interface *interface = wifi_getfreq(prefix);
  • src/router/libutils/mac80211info.c

    r31402 r31409  
    17491749                dev = "giwifi";
    17501750        int devidx = if_nametoindex(dev);
    1751 
    17521751        NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, devidx);
    17531752        if (unl_genl_request_single(&unl, msg, &msg) < 0)
  • src/router/libutils/wl.c

    r31402 r31409  
    15971597        struct iwreq wrq;
    15981598
     1599       
    15991600#ifdef HAVE_ATH9K
     1601        if (has_ad(ifname))
     1602                return mac80211_get_interface("giwifi");
    16001603        if (is_ath9k(ifname)) {
    16011604                return mac80211_get_interface(ifname);
Note: See TracChangeset for help on using the changeset viewer.