kernel/wlan: Re-fix printf issues in debug messages.
authorSascha Wildner <saw@online.de>
Tue, 3 Feb 2015 22:11:25 +0000 (23:11 +0100)
committerSascha Wildner <saw@online.de>
Tue, 3 Feb 2015 22:21:15 +0000 (23:21 +0100)
sys/netproto/802_11/ieee80211_input.h
sys/netproto/802_11/wlan/ieee80211_ddb.c
sys/netproto/802_11/wlan/ieee80211_hostap.c
sys/netproto/802_11/wlan/ieee80211_ht.c
sys/netproto/802_11/wlan/ieee80211_hwmp.c
sys/netproto/802_11/wlan/ieee80211_proto.c
sys/netproto/802_11/wlan/ieee80211_scan.c
sys/netproto/802_11/wlan/ieee80211_sta.c
sys/netproto/802_11/wlan/ieee80211_tdma.c

index 1e7aab9..1f95fe5 100644 (file)
@@ -45,8 +45,8 @@
 #define        IEEE80211_VERIFY_LENGTH(_len, _minlen, _action) do {            \
        if ((_len) < (_minlen)) {                                       \
                IEEE80211_DISCARD(vap, IEEE80211_MSG_ELEMID,            \
-                   wh, NULL, "ie too short, got %d, expected %d",      \
-                   (_len), (_minlen));                                 \
+                   wh, NULL, "ie too short, got %ld, expected %ld",    \
+                   (long)(_len), (long)(_minlen));                     \
                vap->iv_stats.is_rx_elem_toosmall++;                    \
                _action;                                                \
        }                                                               \
index 8a53b12..6ca93fd 100644 (file)
@@ -889,7 +889,7 @@ _db_show_mesh(const struct ieee80211_mesh_state *ms)
        db_printf("routing table:\n");
        i = 0;
        TAILQ_FOREACH(rt, &ms->ms_routes, rt_next) {
-               db_printf("entry %d:\tdest: %6D nexthop: %6D metric: %u", i,
+               db_printf("entry %d:\tdest: %6D nexthop: %6D metric: %p", i,
                    rt->rt_dest, ":", rt->rt_nexthop, ":", rt->rt_metric);
 
                db_printf("\tlifetime: %u lastseq: %u priv: %p\n",
index 2469813..f507af5 100644 (file)
@@ -1048,7 +1048,7 @@ hostap_auth_shared(struct ieee80211_node *ni, struct ieee80211_frame *wh,
                if ((frm[1] + 2) > (efrm - frm)) {
                        IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_AUTH,
                            ni->ni_macaddr, "shared key auth",
-                           "ie %d/%d too long",
+                           "ie %d/%ld too long",
                            frm[0], (frm[1] + 2) - (efrm - frm));
                        vap->iv_stats.is_rx_bad_auth++;
                        estatus = IEEE80211_STATUS_CHALLENGE;
@@ -1640,7 +1640,7 @@ htcapmismatch(struct ieee80211_node *ni, const struct ieee80211_frame *wh,
        int reassoc, int resp)
 {
        IEEE80211_NOTE_MAC(ni->ni_vap, IEEE80211_MSG_ANY, wh->i_addr2,
-           "deny %s request, %s missing HT ie", reassoc ? "reassoc" : "assoc");
+           "deny %s request, missing HT ie", reassoc ? "reassoc" : "assoc");
        /* XXX no better code */
        IEEE80211_SEND_MGMT(ni, resp, IEEE80211_STATUS_MISSING_HT_CAPS);
        ieee80211_node_leave(ni);
index d17dd13..04fbfa2 100644 (file)
@@ -1954,8 +1954,8 @@ ht_recv_action_ba_addba_response(struct ieee80211_node *ni,
                IEEE80211_DISCARD_MAC(vap,
                    IEEE80211_MSG_ACTION | IEEE80211_MSG_11N,
                    ni->ni_macaddr, "ADDBA response",
-                   "policy mismatch: expecting %s, "
-                   "received %s, tid %d code %d",
+                   "policy mismatch: expecting %d, "
+                   "received %d, tid %d code %d",
                    tap->txa_flags & IEEE80211_AGGR_IMMEDIATE,
                    policy, tid, code);
                vap->iv_stats.is_addba_badpolicy++;
index 5c31b1c..113c350 100644 (file)
@@ -929,7 +929,7 @@ hwmp_update_transmitter(struct ieee80211vap *vap, struct ieee80211_node *ni,
            rttran->rt_metric > metric)
        {
                IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, ni,
-                   "%s path to transmiter %6D of %s, metric %d:%d",
+                   "%s path to transmitter %6D of %s, metric %d:%d",
                    rttran->rt_flags & IEEE80211_MESHRT_FLAGS_VALID ?
                    "prefer" : "update", ni->ni_macaddr, ":", hwmp_frame,
                    rttran->rt_metric, metric);
index ba3235d..b382ee7 100644 (file)
@@ -603,7 +603,8 @@ ieee80211_fix_rate(struct ieee80211_node *ni,
             fixedrate != ucastrate)) {
                IEEE80211_NOTE(vap, IEEE80211_MSG_XRATE | IEEE80211_MSG_11N, ni,
                    "%s: flags 0x%x okrate %d error %d fixedrate 0x%x "
-                   "ucastrate %x\n", __func__, fixedrate, ucastrate, flags);
+                   "ucastrate %x\n", __func__, flags, okrate, error,
+                   fixedrate, ucastrate);
                return badrate | IEEE80211_RATE_BASIC;
        } else
                return RV(okrate);
index b1568a6..029cdd8 100644 (file)
@@ -490,7 +490,7 @@ ieee80211_check_scan(struct ieee80211vap *vap, int flags,
        scan = ieee80211_scanner_get(vap->iv_opmode);
        if (scan == NULL) {
                IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN,
-                   "%s: no scanner support for %s mode\n",
+                   "%s: no scanner support for %d mode\n",
                    __func__, vap->iv_opmode);
                /* XXX stat */
                return 0;
@@ -589,7 +589,7 @@ ieee80211_bg_scan(struct ieee80211vap *vap, int flags)
        scan = ieee80211_scanner_get(vap->iv_opmode);
        if (scan == NULL) {
                IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN,
-                   "%s: no scanner support for %s mode\n",
+                   "%s: no scanner support for %d mode\n",
                    __func__, vap->iv_opmode);
                /* XXX stat */
                return 0;
@@ -607,7 +607,7 @@ ieee80211_bg_scan(struct ieee80211vap *vap, int flags)
                duration = IEEE80211_SCAN_OFFCHANNEL;
 
                IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN,
-                   "%s: %s scan, ticks %u duration %lu\n", __func__,
+                   "%s: %s scan, ticks %u duration %l\n", __func__,
                    ss->ss_flags & IEEE80211_SCAN_ACTIVE ? "active" : "passive",
                    ticks, duration);
 
@@ -1249,7 +1249,7 @@ ieee80211_scan_pickchannel(struct ieee80211com *ic, int flags)
        if (ss->ss_ops->scan_pickchan == NULL) {
                IEEE80211_DPRINTF(ss->ss_vap, IEEE80211_MSG_SCAN,
                    "%s: scan module does not support picking a channel, "
-                   "opmode %s\n", __func__, ss->ss_vap->iv_opmode);
+                   "opmode %d\n", __func__, ss->ss_vap->iv_opmode);
                return NULL;
        }
        return ss->ss_ops->scan_pickchan(ss, flags);
index 3ab339b..660984c 100644 (file)
@@ -1021,7 +1021,7 @@ sta_auth_shared(struct ieee80211_node *ni, struct ieee80211_frame *wh,
                if ((frm[1] + 2) > (efrm - frm)) {
                        IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_AUTH,
                            ni->ni_macaddr, "shared key auth",
-                           "ie %d/%d too long",
+                           "ie %d/%ld too long",
                            frm[0], (frm[1] + 2) - (efrm - frm));
                        vap->iv_stats.is_rx_bad_auth++;
                        estatus = IEEE80211_STATUS_CHALLENGE;
@@ -1226,7 +1226,7 @@ ieee80211_parse_csaparams(struct ieee80211vap *vap, uint8_t *frm,
                        IEEE80211_NOTE_FRAME(vap, IEEE80211_MSG_DOTH, wh,
                            "CSA ie mismatch, initial ie <%d,%d,%d>, "
                            "this ie <%d,%d,%d>", ic->ic_csa_mode,
-                           ic->ic_csa_newchan, ic->ic_csa_count,
+                           ic->ic_csa_newchan->ic_ieee, ic->ic_csa_count,
                            csa->csa_mode, csa->csa_newchan, csa->csa_count);
                        ieee80211_csa_cancelswitch(ic);
                } else {
index 71729bc..918f7bf 100644 (file)
@@ -611,7 +611,7 @@ tdma_process_params(struct ieee80211_node *ni, const u_int8_t *ie,
                            "slot %u collision rxtsf %llu tsf %llu\n",
                            tdma->tdma_slot,
                            (unsigned long long) le64toh(ni->ni_tstamp.tsf),
-                           vap->iv_bss->ni_tstamp.tsf);
+                           (unsigned long long) vap->iv_bss->ni_tstamp.tsf);
                        setbit(ts->tdma_inuse, tdma->tdma_slot);
 
                        (void) tdma_update(vap, tdma, ni, 1);