Lines Matching refs:pin
212 unsigned int wps_pin_checksum(unsigned int pin) in wps_pin_checksum() argument
215 while (pin) { in wps_pin_checksum()
216 accum += 3 * (pin % 10); in wps_pin_checksum()
217 pin /= 10; in wps_pin_checksum()
218 accum += pin % 10; in wps_pin_checksum()
219 pin /= 10; in wps_pin_checksum()
231 unsigned int wps_pin_valid(unsigned int pin) in wps_pin_valid() argument
233 return wps_pin_checksum(pin / 10) == (pin % 10); in wps_pin_valid()
241 int wps_generate_pin(unsigned int *pin) in wps_generate_pin() argument
251 *pin = val * 10 + wps_pin_checksum(val); in wps_generate_pin()
256 int wps_pin_str_valid(const char *pin) in wps_pin_str_valid() argument
261 p = pin; in wps_pin_str_valid()
267 len = p - pin; in wps_pin_str_valid()