aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/linux/modules/w1.mk
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2019-10-22 19:04:27 +0200
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2019-11-06 13:17:25 +0100
commitd2b9333ea90ed89069879b4a676211c72c859f9b (patch)
treeef6468a3d5684c4e6656b0357ec170fee0550325 /package/kernel/linux/modules/w1.mk
parentf4026ad24d0374bdb8704e8b6ec38e9fd85f5e0e (diff)
downloadupstream-d2b9333ea90ed89069879b4a676211c72c859f9b.tar.gz
upstream-d2b9333ea90ed89069879b4a676211c72c859f9b.tar.bz2
upstream-d2b9333ea90ed89069879b4a676211c72c859f9b.zip
ramips: remove default case for MAC address assignment
So far, MAC address assignment in ramips has contained a default case, which defined wan_mac = eth0 + 1 for _every_ device not having an explicit case there. This is not desirable, as many device supporters will just not care or know about this definition, so another MAC address will be introduced by accident. In some cases the wan_mac is assigned although it is not needed, in other cases even addresses not dedicated to the device will be used (e.g. wan_mac actually is eth0 - 1, but during support nobody cared, so eth0 + 1 is used now, which might actually belong to another device ...). Thus, in this PR the former default case is converted to an explicit case. This one comprises all devices not being accounted for by other cases, reduced by those not having wan at all. The big number of entries for this node might be another indication that many of them wouldn't actually be there if there hadn't been default wan_mac setup. In exchange, the current "do nothing" case can be removed, as it will be the new default case. The devices being put in the newly created explicit case were determined as follows: 1. Create a list of all devices based on the DTS files. 2. Remove all devices already having an explicit entry setting their address. 3. Remove all devices that only have lan set up in the first part of 02_network: mt7620: - alfa-network,tube-e4g - asus,rp-n53 - buffalo,wmr-300 - comfast,cf-wr800n - edimax,ew-7476rpc - edimax,ew-7478ac - elecom,wrh-300cr - hnet,c108 - kimax,u25awf-h1 - kimax,u35wf - kingston,mlw221 - kingston,mlwg2 - microduino,microwrt - netgear,ex2700 - netgear,ex3700 - netgear,wn3000rp-v3 - planex,cs-qr10 - planex,mzk-ex300np - planex,mzk-ex750np - ravpower,wd03 - sercomm,na930 - yukai,bocco - zbtlink,zbt-cpe102 - zte,q7 mt7621: - gnubee,gb-pc1 - gnubee,gb-pc2 - linksys,re6500 - mikrotik,rbm11g - netgear,ex6150 - thunder,timecloud - tplink,re350-v1 - tplink,re650-v1 mt76x8: - alfa-network,awusfree1 - d-team,pbr-d1 - glinet,vixmini - vocore,vocore2-lite - tama,w06 - tplink,tl-mr3020-v3 - tplink,tl-wa801nd-v5 - tplink,tl-wr802n-v4 - tplink,tl-wr902ac-v3 - vocore,vocore2 - widora,neo-16m - widora,neo-32m rt288x: - buffalo,wli-tx4-ag300n - dlink,dap-1522-a1 rt305x: - allnet,all0256n-4m - allnet,all0256n-8m - allnet,all5002 - allnet,all5003 - alphanetworks,asl26555-16m - alphanetworks,asl26555-8m - asus,wl-330n - aximcom,mr-102n - dlink,dcs-930 - easyacc,wizard-8800 - hame,mpr-a2 - hootoo,ht-tm02 - huawei,d105 - intenso,memory2move - planex,mzk-dp150n - rt305x dlink,dcs-930l-b1 - sparklan,wcr-150gn - tenda,3g150b - tenda,3g300m - tenda,w150m - trendnet,tew-638apb-v2 - unbranded,a5-v11 - vocore,vocore-16m - vocore,vocore-8m - wansview,ncs601w - zorlik,zl5900v2 rt3883: - loewe,wmdr-143n - omnima,hpm 4. Put the remaining devices in the new case. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'package/kernel/linux/modules/w1.mk')
0 files changed, 0 insertions, 0 deletions
t-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
/*
 * The MIT License (MIT)
 *
 * Copyright (c) 2014 Matt Allen
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

package org.sufficientlysecure.keychain.ui.widget;

import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;

/**
 * Created by matt on 04/07/2014.
 * https://github.com/matt-allen/android-password-strength-indicator
 */
public class PasswordStrengthBarView extends PasswordStrengthView {

    public PasswordStrengthBarView(Context context, AttributeSet attrs) {
        super(context, attrs);
        mMinHeight = 80;
        mMinWidth = 300;
    }

    @Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
        generateIndicatorColor();
        // Default to full width
        int indWidth = mIndicatorWidth;
        // If score, leave it as full - can cause it to become
        // less than full width in this calculation
        if (mCurrentScore < 20) indWidth = (mIndicatorWidth / 20) * mCurrentScore;
        // Draw indicator
        canvas.drawRect(
                getPaddingLeft(),
                getPaddingTop(),
                indWidth,
                mIndicatorHeight,
                mIndicatorPaint
        );
        // Draw guides if true
        if (mShowGuides) {
            // TODO: Try and do this with a loop, for efficiency
            // Draw bottom guide border
            float positionY = getHeight() - getPaddingBottom() - getPaddingTop();
            float notchHeight = (float) (positionY * 0.8);
            canvas.drawLine(
                    getPaddingLeft(),
                    positionY,
                    getWidth() - getPaddingRight(),
                    positionY,
                    mGuidePaint);
            // Show left-most notch
            canvas.drawLine(
                    getPaddingLeft(),
                    positionY,
                    getPaddingLeft(),
                    notchHeight,
                    mGuidePaint
            );
            // Show middle-left notch
            canvas.drawLine(
                    (float) (mIndicatorWidth * 0.25) + getPaddingLeft(),
                    positionY,
                    (float) (mIndicatorWidth * 0.25) + getPaddingLeft(),
                    notchHeight,
                    mGuidePaint
            );
            // Show the middle notch
            canvas.drawLine(
                    (float) (mIndicatorWidth * 0.5) + getPaddingLeft(),
                    positionY,
                    (float) (mIndicatorWidth * 0.5) + getPaddingLeft(),
                    notchHeight,
                    mGuidePaint
            );
            // Show the middle-right notch
            canvas.drawLine(
                    (float) (mIndicatorWidth * 0.75) + getPaddingLeft(),
                    positionY,
                    (float) (mIndicatorWidth * 0.75) + getPaddingLeft(),
                    notchHeight,
                    mGuidePaint
            );
            // Show the right-most notch
            canvas.drawLine(
                    mIndicatorWidth + getPaddingLeft(),
                    positionY,
                    mIndicatorWidth + getPaddingLeft(),
                    notchHeight,
                    mGuidePaint
            );
        }
    }
}