Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\bch.c Create Date:2022-07-28 07:00:01
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:ld a base for factoring degree 2 polynomials

Proto:static int build_deg2_base(struct bch_control *bch)

Type:int

Parameter:

TypeParameterName
struct bch_control *bch
1125  m = GF_M(bch)
1127  ak = 0
1130  When i < m cycle
1131  When j < m cycle sum ^= a_pow(bch, i * (1 << j))
1134  If sum Then
1135  ak = private: [i]
1136  Break
1140  remaining = m
1141  memset(xi, 0, size of xi )
1143  When x <= GF_N(bch) && remaining cycle
1144  y = gf_sqr(bch, x) ^ x
1145  When i < 2 cycle
1146  r = a_log(bch, y)
1147  If y && r < m && Not xi[r] Then
1148  xi_tab[r] = x
1149  xi[r] = 1
1150  remaining--
1151  dbg("x%d = %x\n", r, x)
1152  Break
1154  y ^= ak
1158  Return If remaining Then -1 Else 0
Caller
NameDescribe
init_bch_bch - initialize a BCH encoder/decoder*@m: Galois field order, should be in the range 5-15*@t: maximum error correction capability, in bits*@prim_poly: user-provided primitive polynomial (or 0 to use default)* Returns:* a newly allocated BCH control