It is a bit tricky to update the AP module inside the Cisco ISR 877 Series.
1st, assign an IP address to the VLAN of the router
interface vlan 1
ip address x.x.x.x y.y.y.y
no shut
2nd, assign the wlan-ap 0 interface with IP unnumbered
interface wlan-ap 0
ip unnumbered vlan 1
3nd, access the wlan-ap 0 module console
service-module wlan-ap 0 session
4th, assign an IP address to BVI0/BVI1 interface
interface BVI0
ip address z.z.z.z y.y.y.y
no shut
5th, get the IOS image from the tftp
archive download-sw tftp://x.x.x.x/ios.version.tar
6th, write mem and reload
wr mem
reload