Wifi connection issue

inxi -F:

System:
  Host: hpnotebook Kernel: 5.10.52-1-MANJARO x86_64 bits: 64 
  Desktop: Xfce 4.16.0 Distro: Manjaro Linux 
Machine:
  Type: Laptop System: Hewlett-Packard product: HP Notebook 
  v: Type1ProductConfigId serial: <superuser required> 
  Mobo: Hewlett-Packard model: 80C2 v: 96.02 serial: <superuser required> 
  UEFI: Insyde v: F.02 date: 03/24/2015 
Battery:
  ID-1: BAT1 charge: 30.9 Wh (100.0%) condition: 30.9/41.4 Wh (74.7%) 
CPU:
  Info: Dual Core model: Intel Core i5-5200U bits: 64 type: MT MCP cache: 
  L2: 3 MiB 
  Speed: 2379 MHz min/max: 500/2700 MHz Core speeds (MHz): 1: 2379 2: 2464 
  3: 2388 4: 2396 
Graphics:
  Device-1: Intel HD Graphics 5500 driver: i915 v: kernel 
  Device-2: AMD Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / 
  Radeon 520 Mobile] 
  driver: radeon v: kernel 
  Device-3: Chicony HP Truevision HD type: USB driver: uvcvideo 
  Display: x11 server: X.Org 1.20.11 driver: loaded: ati,intel,radeon 
  unloaded: modesetting resolution: 1366x768~60Hz 
  OpenGL: renderer: Mesa Intel HD Graphics 5500 (BDW GT2) v: 4.6 Mesa 21.1.5 
Audio:
  Device-1: Intel Broadwell-U Audio driver: snd_hda_intel 
  Device-2: Intel Wildcat Point-LP High Definition Audio 
  driver: snd_hda_intel 
  Sound Server-1: ALSA v: k5.10.52-1-MANJARO running: yes 
  Sound Server-2: PulseAudio v: 14.2 running: yes 
Network:
  Device-1: Realtek RTL810xE PCI Express Fast Ethernet driver: r8169 
  IF: enp2s0 state: up speed: 100 Mbps duplex: full mac: <>
  Device-2: Broadcom BCM43142 802.11b/g/n driver: wl 
  IF: wlp4s0 state: dormant mac:<>
  IF-ID-1: pan1 state: down mac: <>
Bluetooth:
  Device-1: Broadcom BCM43142A0 Bluetooth 4.0 type: USB driver: btusb 
  Report: bt-adapter ID: hci0 rfk-id: 1 state: down 
  bt-service: enabled,running rfk-block: hardware: no software: yes 
  address: <>
Drives:
  Local Storage: total: 931.51 GiB used: 24.33 GiB (2.6%) 
  ID-1: /dev/sda vendor: Seagate model: ST1000LM024 HN-M101MBB 
  size: 931.51 GiB 
Partition:
  ID-1: / size: 103.71 GiB used: 24.23 GiB (23.4%) fs: ext4 dev: /dev/sda8 
  ID-2: /boot/efi size: 256 MiB used: 104 MiB (40.6%) fs: vfat 
  dev: /dev/sda2 
Swap:
  ID-1: swap-1 type: partition size: 2 GiB used: 1 MiB (0.0%) dev: /dev/sda7 
Sensors:
  System Temperatures: cpu: 50.5 C mobo: N/A gpu: radeon temp: 50.0 C 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 206 Uptime: 2h 6m Memory: 3.75 GiB used: 2.61 GiB (69.4%) 
  Shell: Bash inxi: 3.3.06 

When I try to connect to the wifi on my router through my laptop it repeateadly asks for password and doesnt connect. Sometimes it connects to the wifi and I am able to access the internet but randomly disconnects and asks for password. Ethernet works. This is probably not a driver issue as my laptop connects seamlessly to other wifi devices like mobile hotspot without any issue.
I have tried removing the network in ‘advanced network configuration’ application in xfce. Same problem persists.
Thanks

The wifi state is showing as dormant:

  Dormant Mode - A state in which the mobile restricts its ability
  to receive normal IP traffic by reducing monitoring of radio
  channels.  This allows the mobile to save power and reduces
  signaling load on the network.

Try turning off power saving to the wireless interface. See this page as a guide:

At that point of time I was connected to ethernet and not to wifi. When connected to wifi:

Network:
  Device-1: Realtek RTL810xE PCI Express Fast Ethernet driver: r8169 
  IF: enp2s0 state: down mac: <>
  Device-2: Broadcom BCM43142 802.11b/g/n driver: wl 
  IF: wlp4s0 state: up mac: <>
  IF-ID-1: pan1 state: down mac: <>

It connects to router wifi sometimes according to its wish. restarting network manager helps sometimes. Sometimes it connects but disconnects later and repeatedly asks for password.
But I never faced a problem connecting it to different mobile hotspots.

It still may be a power saving issue. You did not indicate if you are dual booting Windows. If you are, Windows needs to be shutdown completely (no hibernation, no sleep). Windows fastboot needs to be disabled as well.

Ive been dual booting windows8. But Ive turned fast startup off since the beginning because I was unable to write to partitions.

I switched to kernel 5.13.5 and Im still was having the issue so I switched to 5.10.53.

I have Broadcom BCM43142 802.11b/g/n too, and initially the laptop really really really doesn’t want to connect.
The modem makes it easy to create a 2nd connection, so I set the 1st (and best) as the primary option, whereas the 2nd as the alternative. It seems to toggle between them until it finally manages to connect and it stays connected.

No idea what do to make it run smoother.
Wired connections, whether through a USB 4g stick, or through Ethernet, works with no hiccups.

Sometimes I plug in a signal booster for the laptop, and when I use that to connect, it seems work as well, but it’s kind of a gamble because sometimes it works but at fairly slow speed.